Re: T5 Community -- Apache Tapestry Query

2011-03-08 Thread ael
Can you add the another IDE Intergration which is Netbeans on Tapestry 5
Community Page?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Community-Apache-Tapestry-Query-tp3413561p3414790.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 Community -- Apache Tapestry Query

2011-03-08 Thread Ulrich Stärk
WHAT?

On 08.03.2011 07:23, ael wrote:
> Hi
> 
> I visit the  http://tapestry.apache.org/community.html tapestry community
> site  then if possible additional IDE Integration for Tapestry 5 which is my
> favorite Netbeans.
> 
> Thanks :)
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Community-Apache-Tapestry-Query-tp3413561p3413561.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 Community -- Apache Tapestry Query

2011-03-07 Thread ael
Hi

I visit the  http://tapestry.apache.org/community.html tapestry community
site  then if possible additional IDE Integration for Tapestry 5 which is my
favorite Netbeans.

Thanks :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Community-Apache-Tapestry-Query-tp3413561p3413561.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: onActivate called before onSuccessFrom

2011-02-24 Thread jqzone
I met this problem before , I change the onActivatereturn type to void .

2011/2/17 Alessandro Badin 

>
> Hello guys,
>
> What about I have something like this:
>
>Object onActivate() {
>condition = service.findSomething();
>return (condition == null) ? OtherPage.class : null;
>}
>
> Thanks.
> Alessandro Badin
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-onActivate-called-before-onSuccessFrom-tp2430026p3389328.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 : Zone / Tapestry.windowUnloaded / Download link

2011-02-22 Thread raulmt

There is an issue on jira about this problem:
https://issues.apache.org/jira/browse/TAP5-1115

Maybe you should vote for it ;)

The workaround I used was also target="_blank". But if you us
Content-disposition: attachment it will open a new tab/window but the
browser will close it just before showing the download file dialog, so it is
just like a "blink"…

Regards,
Raul.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp4169833p6053565.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: T5: UploadedFile problem

2011-02-22 Thread LLTYK

Hit your app with IE and it'll return something. Newer versions of IE
actually return "c:\fakepath".
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-UploadedFile-problem-tp6052426p6053186.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: T5: UploadedFile problem

2011-02-22 Thread Newham, Cameron
Thanks Thiago.

Although that begs the question as to why there is a getFilePath().

c.


-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 22 February 2011 14:22
To: Tapestry users
Subject: Re: T5: UploadedFile problem

On Tue, 22 Feb 2011 11:01:22 -0300, Newham, Cameron   
wrote:

> Hi,

Hi!

> I notice that: getFileName() and getFilePath()
> of UploadedFile return the same thing (the name of the file) on Windows.
> This seems to be a bug. I'd like to get the path - is there any way to
> do this?

It isn't a bug. For security reasons, browsers usually don't report the  
path.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: UploadedFile problem

2011-02-22 Thread Thiago H. de Paula Figueiredo
On Tue, 22 Feb 2011 11:01:22 -0300, Newham, Cameron   
wrote:



Hi,


Hi!


I notice that: getFileName() and getFilePath()
of UploadedFile return the same thing (the name of the file) on Windows.
This seems to be a bug. I'd like to get the path - is there any way to
do this?


It isn't a bug. For security reasons, browsers usually don't report the  
path.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: UploadedFile problem

2011-02-22 Thread Newham, Cameron
Hi,

 

I notice that:

 

getFileName()

 

and

 

getFilePath()

 

of UploadedFile return the same thing (the name of the file) on Windows.
This seems to be a bug. I'd like to get the path - is there any way to
do this?

 

 

Thanks,

c.

 



Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Howard Lewis Ship
That's something that's much more interesting for me ... long running
processes that can push updates (such as a progress bar) to a client.

On Mon, Feb 21, 2011 at 10:38 AM, Josh Canfield  wrote:
>> Is Tapestry going to support the Servlet 3.0 and it's specification for web
>> fragments? I mean, load itself without the need for us to speficy it's
>> filter in the app's web.xml?
>
> The other thing that I'd love to get into Tapestry is the support for
> long running requests using request.startAsync(). I've done some
> prototyping with the Jetty library but it's a ways from being able to
> add to the core.
>
> @Async(timeout="5 minutes")
> void onSomeLongEvent() {
>
> }
>
>
> Josh
>
> On Mon, Feb 21, 2011 at 7:51 AM, Everton Agner  wrote:
>> Hey!
>>
>> Is Tapestry going to support the Servlet 3.0 and it's specification for web
>> fragments? I mean, load itself without the need for us to speficy it's
>> filter in the app's web.xml?
>>
>> I'm anxious to see it trully "zero configuration"! I guess this is the only
>> thing left for it, even though it's far from a hardcore config right now.
>>
>> If it's already done, my bad. I was "away" from tapestry for a while, and
>> haven't found info related to this subject...
>>
>> Thanks!
>>
>> ___
>> Everton Agner Ramos
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Josh Canfield
> Is Tapestry going to support the Servlet 3.0 and it's specification for web
> fragments? I mean, load itself without the need for us to speficy it's
> filter in the app's web.xml?

The other thing that I'd love to get into Tapestry is the support for
long running requests using request.startAsync(). I've done some
prototyping with the Jetty library but it's a ways from being able to
add to the core.

@Async(timeout="5 minutes")
void onSomeLongEvent() {

}


Josh

On Mon, Feb 21, 2011 at 7:51 AM, Everton Agner  wrote:
> Hey!
>
> Is Tapestry going to support the Servlet 3.0 and it's specification for web
> fragments? I mean, load itself without the need for us to speficy it's
> filter in the app's web.xml?
>
> I'm anxious to see it trully "zero configuration"! I guess this is the only
> thing left for it, even though it's far from a hardcore config right now.
>
> If it's already done, my bad. I was "away" from tapestry for a while, and
> haven't found info related to this subject...
>
> Thanks!
>
> ___
> Everton Agner Ramos
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread 9902468

Hi,

Tomcat 7, Jetty 8, Glassfish 3.0.1 + 3.1, JBOSS AS 6.0 support 3.0 spec.
(Just a list from my memory, if I made a mistake please correct me.) If you
know more, please add to the list, I really would like to know. :)

 - Ville
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Tapestry-and-Servlet-3-0-web-fragments-zero-configuration-tp3394320p3394441.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 12:51:31 -0300, Everton Agner   
wrote:



Hey!


Hi!

Is Tapestry going to support the Servlet 3.0 and it's specification for  
web fragments? I mean, load itself without the need for us to speficy  
it's

filter in the app's web.xml?


I don't know, but there's an issue to be solved: how Tapestry will get the  
base package, as it's currently informed as a servlet filter parameter?  
I'm not saying this isn't solvable (of course it is). I'm just saying that  
this isn't that easy. :) And what servlet containers are already  
implementing the Servlet 3.0 specification? Just curious. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Everton Agner
Hey!

Is Tapestry going to support the Servlet 3.0 and it's specification for web
fragments? I mean, load itself without the need for us to speficy it's
filter in the app's web.xml?

I'm anxious to see it trully "zero configuration"! I guess this is the only
thing left for it, even though it's far from a hardcore config right now.

If it's already done, my bad. I was "away" from tapestry for a while, and
haven't found info related to this subject...

Thanks!

___
Everton Agner Ramos


Re: T5 : Zone / Tapestry.windowUnloaded / Download link

2011-02-17 Thread Magnus Kvalheim
Yes, we've experienced same problem and resorted to use target="_blank" as
we didn't have the time to come up with something more creative.

A better solution would be welcomed though :)

On Thu, Feb 17, 2011 at 3:05 PM, Richard Kolísek
wrote:

>
> same problem here
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp2436863p3389487.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 : Zone / Tapestry.windowUnloaded / Download link

2011-02-17 Thread Richard Kolísek

same problem here
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp2436863p3389487.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: onActivate called before onSuccessFrom

2011-02-17 Thread Alessandro Badin

Hello guys,

What about I have something like this:

Object onActivate() {
condition = service.findSomething();
return (condition == null) ? OtherPage.class : null;
}

Thanks.
Alessandro Badin
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-onActivate-called-before-onSuccessFrom-tp2430026p3389328.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: accessing a service from a contributed class

2011-02-14 Thread Thiago H. de Paula Figueiredo
On Mon, 14 Feb 2011 01:05:40 -0200, Kalle Korhonen  
 wrote:



On Sun, Feb 13, 2011 at 6:55 PM, Thiago H. de Paula Figueiredo
 wrote:

On Mon, 14 Feb 2011 00:16:33 -0200, Angelo C. 
wrote:

is this possible?

Yes, as long as the contributed object is an service itself.


Is that a fact Thiago?


Yes, but I forgot to mention that you can use the addInstance() methods of  
the contribution interfaces. This way, the instantiation of the class and  
the injection are automatic.



I'm surprised by that. I would have assumed you
would have needed to inject Services object into the contributeAlias()
as an argument and then pass it on.


The contributed object, in your scenario, is a service. :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: accessing a service from a contributed class

2011-02-14 Thread Angelo C.

Hi Igor,

Thanks for reply. how to build the baseURL service in such a way that
Service can be injected and it can be used to contributeAlias?


Igor Drobiazko wrote:
> 
> You assumtion ic correct. The code above is not going to work as
> BaseURLSource implementation is bult manually and not by Tapestry.
> 
> 

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-accessing-a-service-from-a-contributed-class-tp3383911p3384139.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: accessing a service from a contributed class

2011-02-13 Thread Igor Drobiazko
You assumtion ic correct. The code above is not going to work as
BaseURLSource implementation is bult manually and not by Tapestry.

On Mon, Feb 14, 2011 at 4:05 AM, Kalle Korhonen
wrote:

> On Sun, Feb 13, 2011 at 6:55 PM, Thiago H. de Paula Figueiredo
>  wrote:
> > On Mon, 14 Feb 2011 00:16:33 -0200, Angelo C. 
> > wrote:
> >> is this possible?
> > Yes, as long as the contributed object is an service itself.
>
> Is that a fact Thiago? I'm surprised by that. I would have assumed you
> would have needed to inject Services object into the contributeAlias()
> as an argument and then pass it on.
>
> Kalle
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Re: t5: accessing a service from a contributed class

2011-02-13 Thread Angelo C.

it is a registered service, but it's null when call.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-accessing-a-service-from-a-contributed-class-tp3383911p3383969.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: accessing a service from a contributed class

2011-02-13 Thread Kalle Korhonen
On Sun, Feb 13, 2011 at 6:55 PM, Thiago H. de Paula Figueiredo
 wrote:
> On Mon, 14 Feb 2011 00:16:33 -0200, Angelo C. 
> wrote:
>> is this possible?
> Yes, as long as the contributed object is an service itself.

Is that a fact Thiago? I'm surprised by that. I would have assumed you
would have needed to inject Services object into the contributeAlias()
as an argument and then pass it on.

Kalle

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: accessing a service from a contributed class

2011-02-13 Thread Thiago H. de Paula Figueiredo
On Mon, 14 Feb 2011 00:16:33 -0200, Angelo C.   
wrote:



is this possible?


Yes, as long as the contributed object is an service itself.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: accessing a service from a contributed class

2011-02-13 Thread Angelo C.

is this possible? in the following code, services is always null, tips?
public  static void contributeAlias(Configuration
configuration)
{

BaseURLSource source = new BaseURLSource()
{

@Inject
private Services services;

public String getBaseURL(boolean secure)
{
String protocol = secure ? "https" : "http";
return String.format("%s://www.%s", protocol,
services.getDomain());
}
};

configuration.add(AliasContribution.create(BaseURLSource.class,
source));
}
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-accessing-a-service-from-a-contributed-class-tp3383911p3383911.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: ServiceOverride and base_url

2011-02-13 Thread Angelo C.

Hi,
   is there a sample use of ServiceOverride? like overriding the base_url?
thanks,
Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-ServiceOverride-and-base-url-tp3383887p3383887.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: ServiceOverride and base_url

2011-02-13 Thread Angelo C.

Hi,
   is there a sample use of ServiceOverride? like overriding the base_url?
thanks,
Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-ServiceOverride-and-base-url-tp3383886p3383886.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: clear cookie when browser closes

2011-02-11 Thread Joost Schouten (ml)
 From the Cookie javadoc at 
http://download.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge(int):



 setMaxAge

public void*setMaxAge*(int expiry)

   Sets the maximum age in seconds for this Cookie.

   A positive value indicates that the cookie will expire after that
   many seconds have passed. Note that the value is the /maximum/ age
   when the cookie will expire, not the cookie's current age.

   A negative value means that the cookie is not stored persistently
   and will be deleted when the Web browser exits. A zero value causes
   the cookie to be deleted.

   *Parameters:*
   |expiry| - an integer specifying the maximum age of the cookie
   in seconds; if negative, means the cookie is not stored; if
   zero, deletes the cookie
   *See Also:*
   |getMaxAge()|
   


Cheers,
Joost


On 11/02/11 4:37 AM, Angelo C. wrote:

Hi,
I'd like to write a cookie to the browser and it will be cleared when
browser closes, possible? thanks,
A.C.



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: clear cookie when browser closes

2011-02-10 Thread del
If you do not require the cookie to set on a computer/browser for  
certain length of time (few hours to few months), you can simply use  
session. Session is a safer option as some browsers block cookies. By  
the end of a session, use unset to remove the session value. Sessio  
will end automatically when the browser closed.




Hi,
I'd like to write a cookie to the browser and it will be cleared when
browser closes, possible? thanks,
A.C.
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-clear-cookie-when-browser-closes-tp3380592p3380592.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: clear cookie when browser closes

2011-02-10 Thread Angelo C.

Hi,
I'd like to write a cookie to the browser and it will be cleared when
browser closes, possible? thanks,
A.C.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-clear-cookie-when-browser-closes-tp3380592p3380592.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: setting locale without changing url

2011-02-10 Thread Gillespie59

You can set your locale with the PersistentLocale service

@Inject
private PersistentLocale persistentLocaleService;

Locale newLocale = new Locale("el");
persistentLocaleService.set(newLocale); 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-setting-locale-without-changing-url-tp3379090p3379106.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: setting locale without changing url

2011-02-10 Thread Angelo C.

Hi,

T5 has this locale support: 

explicit www.example.com/en

implicit www.example.com, in this case, it depends on the locale sent by the
browser, is there a way that a program can set the locale 
based on certain conditions (a certain domain or IPs) without going the
explicit way?

Thanks,

Angelo 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-setting-locale-without-changing-url-tp3379090p3379090.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 Component Select ID Example.

2011-02-07 Thread ael
r (T obj : list) {
optionModelList.add(new 
OptionModelImpl(nvl(labelFieldAdapter.get(obj)),
idFieldAdapter.get(obj)));
}
return optionModelList;
}

public List getList() {
return list;
}

private String nvl(Object o) {
if (o == null)
return "";
else
return o.toString();
}
}



Userbean.java



public class Userbean {

Long uid;
String username;
String userpassword;

public Userbean(Long uid, String username, String userpassword) {
this.uid = uid;
this.username = username;
this.userpassword = userpassword;
}

public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getUserpassword() {
return userpassword;
}
public void setUserpassword(String userpassword) {
    this.userpassword = userpassword;
}
}




Note: This example will use the select component of Tapestry5 then will
return the ID.

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Component-Select-ID-Example-tp3375346p3375346.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 05.02.2011 00:22, Benny Law wrote:

> Thanks Stephan, I got it working now.

You're welcome.

> I wonder if built-in support for this has been requested as an enhancement?

It has been asked a couple of times on this list, but since now my
workaround was the only way I got it working.

Regards
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Benny Law
Thanks Stephan, I got it working now.
I wonder if built-in support for this has been requested as an enhancement?

Benny

On Fri, Feb 4, 2011 at 12:59 PM, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:

> On 04.02.2011 17:44, Benny Law wrote:
>
> > Thanks for providing this solution. I tried to implement this, but got
> stuck
> > on the last step. Could you tell me how you "set the saved controlName to
> > the component"? I couldn't find a public setter for this property. I
> > searched the whole class hierarchy for TextField and couldn't find
> anything.
> > Do I need to create a wrapper for it? Thanks.
>
> Sorry, I forgot. You need to implement a simple field (implementing
> Field) which passes the methods
>
> public void setControlName(String controlName);
> public String getControlName();
>
> to the public. Insert it in your tml and inject it in your java class,
> acting as a dummy for the validation.
>
> HTH
>  Stephan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 04.02.2011 17:44, Benny Law wrote:

> Thanks for providing this solution. I tried to implement this, but got stuck
> on the last step. Could you tell me how you "set the saved controlName to
> the component"? I couldn't find a public setter for this property. I
> searched the whole class hierarchy for TextField and couldn't find anything.
> Do I need to create a wrapper for it? Thanks.

Sorry, I forgot. You need to implement a simple field (implementing
Field) which passes the methods

public void setControlName(String controlName);
public String getControlName();

to the public. Insert it in your tml and inject it in your java class,
acting as a dummy for the validation.

HTH
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Benny Law
Hi Stephan,

Thanks for providing this solution. I tried to implement this, but got stuck
on the last step. Could you tell me how you "set the saved controlName to
the component"? I couldn't find a public setter for this property. I
searched the whole class hierarchy for TextField and couldn't find anything.
Do I need to create a wrapper for it? Thanks.

Benny

On Fri, Feb 4, 2011 at 4:30 AM, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:

> On 02.02.2011 16:39, Benny Law wrote:
>
> > Yes, I am doing cross-field validation (e.g. quantity is required if
> another
> > property of the item has a certain value) and that's why it has to be
> done
> > in onValidateForm(), or at least that's what I think.
>
> We have a similar issue in our application. You can solve yours like this:
>
> - Inject the textfield in your page
> - In onValidateFromQuantatiy(String), store quantity.getControlName
>  in a Map
> - In onValidateForm, proceed with your validation. To record an error,
>  set the saved controlName to the component and push it into
>  recordError
>
> HTH
>  Stephan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 02.02.2011 16:39, Benny Law wrote:

> Yes, I am doing cross-field validation (e.g. quantity is required if another
> property of the item has a certain value) and that's why it has to be done
> in onValidateForm(), or at least that's what I think.

We have a similar issue in our application. You can solve yours like this:

- Inject the textfield in your page
- In onValidateFromQuantatiy(String), store quantity.getControlName
  in a Map
- In onValidateForm, proceed with your validation. To record an error,
  set the saved controlName to the component and push it into
  recordError

HTH
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: T5: getting json value in tml

2011-02-04 Thread WINDEY Pieter AWL-IT
Never done this before,
But ${js.get('name1')}  should show you your value.
See http://www.json.org/javadoc/org/json/JSONObject.html for more info


-Original Message-
From: Angelo C. [mailto:angelochen...@gmail.com]
Sent: Friday 4 February 2011 03:51
To: users@tapestry.apache.org
Subject: T5: getting json value in tml


Hi,

How to get the value of a json object in tml file, following does not work:

in page class:

public JSONObject getJS() {
   JSONObject js = new JSONObject();
   js.put("name1","123");
   return js;
}


in the tmp,

 ${js} // this shows key/value pair
 ${js.name1}  // does not show anything

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370385.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg
- 1130 Brussels - Belgium
RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872
Bankrekening-Compte Bancaire-Bank Account 310-0269424-44
BIC BBRUBEBB - IBAN BE55 3100 2694 2444

"The information contained in this e-mail and any attachment thereto is 
confidential and may contain information which is protected by intellectual 
property rights.
This information is intended for the exclusive use of the recipient(s) named 
above.
This e-mail does not constitute any binding relationship or offer toward any of 
the addressees.
If you are not one of the addressees , one of their employees or a proxy holder 
entitled to hand over this message to the addressee(s), any use of the 
information contained herein (e.g. reproduction, divulgation, communication or 
distribution,...) is prohibited.
If you have received this message in error, please notify the sender and 
destroy it immediately after.
The integrity and security of this message cannot be guaranteed and it may be 
subject to data corruption, interception and unauthorized amendment, for which 
we accept no liability."


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: getting json value in tml

2011-02-04 Thread Angelo C.

turned out it has to be:
${js.get('name1')}
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370676.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: getting json value in tml

2011-02-03 Thread Angelo C.

Hi,

How to get the value of a json object in tml file, following does not work:

in page class:

public JSONObject getJS() {
   JSONObject js = new JSONObject();
   js.put("name1","123");
   return js;
}


in the tmp, 

 ${js} // this shows key/value pair
 ${js.name1}  // does not show anything

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370385.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: t5: adding http header

2011-02-03 Thread Wechsung, Wulf
Hello Angelo,

best use a request Filter. For example:

public class IEStandardModeHeader implements RequestFilter {


private static final String HEADER_KEY = "X-UA-Compatible";

@Override
public boolean service(Request request, Response response,
RequestHandler handler) throws IOException {

response.setHeader(HEADER_KEY, "IE=8");
return handler.service(request, response);   

}

}

To activate the filter you need to contribute it in AppModule:

public static void contributeRequestHandler(
OrderedConfiguration configuration) {
Configuration.add(...);
}


Hope this helps!

Kind Regards,
Wulf

-Original Message-
From: Angelo C. [mailto:angelochen...@gmail.com] 
Sent: Donnerstag, 3. Februar 2011 12:10
To: users@tapestry.apache.org
Subject: t5: adding http header


Hi,

I need to add some http headers into response, like 
Access-Control-Allow-Origin: "*", how to achieve this? Thanks,

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-adding-http-header-tp3369097p3369097.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: adding http header

2011-02-03 Thread Thiago H. de Paula Figueiredo
On Thu, 03 Feb 2011 09:10:11 -0200, Angelo C.   
wrote:



Hi,


Hi!


I need to add some http headers into response, like
Access-Control-Allow-Origin: "*", how to achieve this? Thanks,


The better way depends on which pages do you want to do this. If it's all,  
create a RequestFilter and use the Response's setHeader(String name,  
String value) method. If it's just one, @Inject Response and use the same  
method.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: adding http header

2011-02-03 Thread Angelo C.

Hi,

I need to add some http headers into response, like 
Access-Control-Allow-Origin: "*", how to achieve this? Thanks,

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-adding-http-header-tp3369097p3369097.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Recording errors for fields in a loop

2011-02-02 Thread Benny Law
Yes, I am doing cross-field validation (e.g. quantity is required if another
property of the item has a certain value) and that's why it has to be done
in onValidateForm(), or at least that's what I think.

Benny

On Wed, Feb 2, 2011 at 10:32 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Why don't you use onPrepareFromQuantity(Integer quantity) instead? Does
> this validation require other fields to be checked?
>
>
> On Wed, 02 Feb 2011 12:49:58 -0200, Benny Law 
> wrote:
>
>  The following code illustrates what I am doing:
>>
>> 
>>
>>
>>
>> 
>>
>> @InjectComponent private Form form;
>> @InjectComponent private TextField quantity;
>> @Property private Item item;
>>
>> void onValidateForm() {
>>for (Item i: getItems()) {
>>if (...cross-field check...) {
>>form.recordError( quantity, "Error message");
>>}
>>}
>> }
>>
>> What I find is that when I get to onValidateForm(), the injected quantity
>> field is always the last instance (the one bound to the last item). I need
>> a
>> way to get the instance that matches the current item in the for loop.
>>
>> Hope that clarifies my question. Thanks.
>>
>> Benny
>>
>>
>> On Wed, Feb 2, 2011 at 6:21 AM, Thiago H. de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>  On Wed, 02 Feb 2011 02:26:45 -0200, Benny Law 
>>> wrote:
>>>
>>>  Hi,
>>>


>>> Hi!
>>>
>>>  I have a loop inside a form that renders a textfield and some other
>>>
 controls. When I am doing cross field validations in the ValidateForm
 event while iterating over a collection (the source of the loop), I
 would
 like to record error messages against the form with the field in error
 to
 get the
 normal error highlighting. How can I get to the field in this case since
 I
 can't use normal injection?


>>> Why not? Even when inside a loop, you don't have more than one instance
>>> of
>>> a given component. Example:
>>>
>>> 
>>>   
>>> 
>>>
>>> You have only one instance of the TextField with t:id "title", regardless
>>> of the number of iterations.
>>>
>>> I don't know if this solves your problem, but at least I'm trying to help
>>> you figure it out. ;)
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>>> and instructor
>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>> http://www.arsmachina.com.br
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
> Coordenador e professor da Especialização em Engenharia de Software com
> Ênfase em Java da Faculdade Pitágoras
>
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Recording errors for fields in a loop

2011-02-02 Thread Thiago H. de Paula Figueiredo
Why don't you use onPrepareFromQuantity(Integer quantity) instead? Does  
this validation require other fields to be checked?


On Wed, 02 Feb 2011 12:49:58 -0200, Benny Law   
wrote:



The following code illustrates what I am doing:







@InjectComponent private Form form;
@InjectComponent private TextField quantity;
@Property private Item item;

void onValidateForm() {
for (Item i: getItems()) {
if (...cross-field check...) {
form.recordError( quantity, "Error message");
}
}
}

What I find is that when I get to onValidateForm(), the injected quantity
field is always the last instance (the one bound to the last item). I  
need a

way to get the instance that matches the current item in the for loop.

Hope that clarifies my question. Thanks.

Benny


On Wed, Feb 2, 2011 at 6:21 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:


On Wed, 02 Feb 2011 02:26:45 -0200, Benny Law 
wrote:

 Hi,




Hi!

 I have a loop inside a form that renders a textfield and some other

controls. When I am doing cross field validations in the ValidateForm
event while iterating over a collection (the source of the loop), I  
would
like to record error messages against the form with the field in error  
to

get the
normal error highlighting. How can I get to the field in this case  
since I

can't use normal injection?



Why not? Even when inside a loop, you don't have more than one instance  
of

a given component. Example:


   


You have only one instance of the TextField with t:id "title",  
regardless

of the number of iterations.

I don't know if this solves your problem, but at least I'm trying to  
help

you figure it out. ;)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Recording errors for fields in a loop

2011-02-02 Thread Benny Law
The following code illustrates what I am doing:







@InjectComponent private Form form;
@InjectComponent private TextField quantity;
@Property private Item item;

void onValidateForm() {
for (Item i: getItems()) {
if (...cross-field check...) {
form.recordError( quantity, "Error message");
}
}
}

What I find is that when I get to onValidateForm(), the injected quantity
field is always the last instance (the one bound to the last item). I need a
way to get the instance that matches the current item in the for loop.

Hope that clarifies my question. Thanks.

Benny


On Wed, Feb 2, 2011 at 6:21 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 02 Feb 2011 02:26:45 -0200, Benny Law 
> wrote:
>
>  Hi,
>>
>
> Hi!
>
>  I have a loop inside a form that renders a textfield and some other
>> controls. When I am doing cross field validations in the ValidateForm
>> event while iterating over a collection (the source of the loop), I would
>> like to record error messages against the form with the field in error to
>> get the
>> normal error highlighting. How can I get to the field in this case since I
>> can't use normal injection?
>>
>
> Why not? Even when inside a loop, you don't have more than one instance of
> a given component. Example:
>
> 
>
> 
>
> You have only one instance of the TextField with t:id "title", regardless
> of the number of iterations.
>
> I don't know if this solves your problem, but at least I'm trying to help
> you figure it out. ;)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Recording errors for fields in a loop

2011-02-02 Thread Thiago H. de Paula Figueiredo
On Wed, 02 Feb 2011 02:26:45 -0200, Benny Law   
wrote:



Hi,


Hi!


I have a loop inside a form that renders a textfield and some other
controls. When I am doing cross field validations in the ValidateForm  
event while iterating over a collection (the source of the loop), I  
would like to record error messages against the form with the field in  
error to get the
normal error highlighting. How can I get to the field in this case since  
I can't use normal injection?


Why not? Even when inside a loop, you don't have more than one instance of  
a given component. Example:






You have only one instance of the TextField with t:id "title", regardless  
of the number of iterations.


I don't know if this solves your problem, but at least I'm trying to help  
you figure it out. ;)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: Recording errors for fields in a loop

2011-02-01 Thread Benny Law
Hi,

I have a loop inside a form that renders a textfield and some other
controls. When I am doing cross field validations in the ValidateForm event
while iterating over a collection (the source of the loop), I would like to
record error messages against the form with the field in error to get the
normal error highlighting. How can I get to the field in this case since I
can't use normal injection?

Thanks in advance,

Benny


Re: Struggling with Ajax in T5 ...

2011-01-31 Thread LLTYK

The key part of zone updater that does what you want is this:
  void afterRender() {
String url = resources.createEventLink(event, context).toAbsoluteURI();
...
renderSupport.addScript("%sZoneUpdater = new ZoneUpdater(%s)", prefix,
spec.toString());
  }


This is the interface from Tapestry to Javascript. The string in the
addScript call is literal javascript (except for the %s) that's added to the
bottom of the page.

You are basically looking for the right url to hit from javascript that will
trigger your Tapestry method. createEventLink generates this url
('createEventLink("register", "placeholderforputtingstudentid")'), addScript
will pass it to the Javascript, and in there "zoneManager.updateFromUrl"
proceeds to ping that url. Another way to ping urls from js is with
Prototype:
http://www.prototypejs.org/api/ajax/request

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Struggling-with-Ajax-in-T5-tp5970312p5976916.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Struggling with Ajax in T5 ...

2011-01-30 Thread Inge Solvoll
Hi!

I haven't read all of this thread, but I have one suggestion: You should
"hijack" your onclick handlers with javascript to do additional work before
or after calling the original onclick. Don't know how experienced you are
with javascript, but it will look something like this:

var oldOnclick = firstButton.onclick;
firstButton.bind('click', myOwnOnclickListener);
var myOwnOnClickListener = function(event) {
  // My own code here
  oldOnclick();
}


On Fri, Jan 28, 2011 at 6:30 PM, Jessica Sobieski <
jessica.sobie...@gmail.com> wrote:

> Hi Thiago -
>
> > Which buttons? I'm not following you.
>
> To answer your question, I'm talking about these buttons in my template:
>
> Student Registration
> 
> 
> 
>
> These input buttons come from an HTML stored in a database. I can't change
> that design, and these buttons must call register(studentId) javascript
> function.
>
> So what kind of JavaScript code can I use to connect register(studentId)
> function with the page class registerStudent method?
>
> Adam
>
> On Fri, Jan 28, 2011 at 10:34 AM, Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> > On Fri, 28 Jan 2011 13:57:16 -0200, Jessica Sobieski <
> > jessica.sobie...@gmail.com> wrote:
> >
> >  Hello boys!
> >>
> >
> > Hi!
> >
> >
> >  1) I don't control how buttons are generated, therefore they must call
> >> register(studentId) javascript. No way around it.
> >>
> >
> > Which buttons? I'm not following you.
> >
> >
> >>public String getStudent() {
> >>return student.getName();
> >>}
> >> }
> >>
> >> Here is my question:
> >>
> >> 2) I must somehow call Tapestry from register(studentId) method. I am
> >> both, clueless and frustrated as to how to do it.
> >>
> >
> > Just ask us. :)
> >
> > Define an event name for it. My example will use "register". Use the
> > JavaScript code in
> > http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html to
> > correctly handle zone updates. Use a query parameter to pass information.
> > Your code will look like this (not tested):
> >
> >
> > public class StudentCourse {
> >
> >@Inject @Id("confirmation") private Block confirmationBlock;
> >
> >@Inject private StudentDao studentDao;
> >
> >private Student student;
> >
> >@OnEvent("register") // without this annotation,
> >Object registerStudent(@RequestParameter("id") Integer studentId) {
> >
> >student = studentDao.register(studentId);
> >return confirmationBlock;
> >}
> >
> >public String getStudent() {
> >return student.getName();
> >}
> > }
> >
> > This is probably a not complete solution, but at least I gave you some
> > hints. :) I hope it helps.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> > and instructor
> > Owner, Ars Machina Tecnologia da Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: Struggling with Ajax in T5 ...

2011-01-28 Thread Thiago H. de Paula Figueiredo
On Fri, 28 Jan 2011 15:30:31 -0200, Jessica Sobieski  
 wrote:



Hi Thiago -


Hi!


So what kind of JavaScript code can I use to connect register(studentId)
function with the page class registerStudent method?


See http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html  
for an example.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Struggling with Ajax in T5 ...

2011-01-28 Thread Jessica Sobieski
Hi Thiago -

> Which buttons? I'm not following you.

To answer your question, I'm talking about these buttons in my template:

Student Registration




These input buttons come from an HTML stored in a database. I can't change
that design, and these buttons must call register(studentId) javascript
function.

So what kind of JavaScript code can I use to connect register(studentId)
function with the page class registerStudent method?

Adam

On Fri, Jan 28, 2011 at 10:34 AM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 28 Jan 2011 13:57:16 -0200, Jessica Sobieski <
> jessica.sobie...@gmail.com> wrote:
>
>  Hello boys!
>>
>
> Hi!
>
>
>  1) I don't control how buttons are generated, therefore they must call
>> register(studentId) javascript. No way around it.
>>
>
> Which buttons? I'm not following you.
>
>
>>public String getStudent() {
>>return student.getName();
>>}
>> }
>>
>> Here is my question:
>>
>> 2) I must somehow call Tapestry from register(studentId) method. I am
>> both, clueless and frustrated as to how to do it.
>>
>
> Just ask us. :)
>
> Define an event name for it. My example will use "register". Use the
> JavaScript code in
> http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html to
> correctly handle zone updates. Use a query parameter to pass information.
> Your code will look like this (not tested):
>
>
> public class StudentCourse {
>
>@Inject @Id("confirmation") private Block confirmationBlock;
>
>@Inject private StudentDao studentDao;
>
>private Student student;
>
>@OnEvent("register") // without this annotation,
>Object registerStudent(@RequestParameter("id") Integer studentId) {
>
>student = studentDao.register(studentId);
>return confirmationBlock;
>}
>
>public String getStudent() {
>return student.getName();
>}
> }
>
> This is probably a not complete solution, but at least I gave you some
> hints. :) I hope it helps.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Struggling with Ajax in T5 ...

2011-01-28 Thread Thiago H. de Paula Figueiredo
On Fri, 28 Jan 2011 13:57:16 -0200, Jessica Sobieski  
 wrote:



Hello boys!


Hi!


1) I don't control how buttons are generated, therefore they must call
register(studentId) javascript. No way around it.


Which buttons? I'm not following you.



public String getStudent() {
return student.getName();
}
}

Here is my question:

2) I must somehow call Tapestry from register(studentId) method. I am  
both, clueless and frustrated as to how to do it.


Just ask us. :)

Define an event name for it. My example will use "register". Use the  
JavaScript code in  
http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html to  
correctly handle zone updates. Use a query parameter to pass information.  
Your code will look like this (not tested):


public class StudentCourse {

@Inject @Id("confirmation") private Block confirmationBlock;

@Inject private StudentDao studentDao;

private Student student;

@OnEvent("register") // without this annotation,
Object registerStudent(@RequestParameter("id") Integer studentId) {
student = studentDao.register(studentId);
return confirmationBlock;
}

public String getStudent() {
return student.getName();
}
}

This is probably a not complete solution, but at least I gave you some  
hints. :) I hope it helps.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: news feed

2011-01-28 Thread pieter

maybe this can help you

http://blog.bolkey.com/2010/05/creating-a-news-feed-in-tapestry-5/
http://blog.bolkey.com/2010/05/creating-a-news-feed-in-tapestry-5/ 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-news-feed-tp3355405p3361070.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: t5: 5.2.4 and IE8

2011-01-25 Thread Wechsung, Wulf
Hello Donny, Hello Angelo,

today I faced exactly the same issue and wasted hours on google before finding 
and implementing your fix. Thanks for sharing!

IE8 really is a piece of work ... wasted hours yesterday trying to force it to 
not display my intranet site in compatibility mode because the meta tag that 
should do this doesn't work. The solution for this btw is to set a header via 
RequestFilter:

In service():
response.setHeader("X-UA-Compatible", "IE=8");


Once I accomplished that, the Javascript errors started to appear ... 

I know it's not exactly t5-only specific but maybe there could be a section on 
the t5 site "IE8 and you" that collects these workarounds.


Kind Regards,
Wulf

-Original Message-
From: Donny Nadolny [mailto:donny.nado...@gmail.com] 
Sent: Dienstag, 18. Januar 2011 14:06
To: Tapestry users
Subject: Re: t5: 5.2.4 and IE8

Hi Angelo,

I had this exact problem - jQuery and Prototype don't work out in IE8 (I
vaguely remember reading something about IE8 trying to be smart and load/run
scripts in parallel, which cause problems). Sometimes prototype code would
run, but $ would be referencing jQuery even though I had called noConflict
on jQuery.

Here's my solution, which I'm using in my app right now:
 - Download the un-minified source of jQuery, whichever version you're using
 - Modify it so that it never assigns the $ variable in the first place (in
version 1.4.3 it's line 901: "return (window.jQuery = window.$ = jQuery);
just remove the " = window.$" part.
 - Minify it (I used yahoo's javascript compressor -
http://developer.yahoo.com/yui/compressor/)
And then everything works.

You can grab it from my site if you like (
http://www.deliverthedeals.com/js/jquery-1.4.3.min.js) to verify that it
works. My version has an extra line at the end though, which assigns jQuery
to $j.

Donny

On Tue, Jan 18, 2011 at 6:09 AM, Angelo C.  wrote:

>
> Thanks for the code. It seems to me, T5.2.4 app with jQuery will fail in IE
> 8, from what I found out in Google, running jQuery's noConflict() ahead of
> Prototype might solve the problem, but with this issue:
> https://issues.apache.org/jira/browse/TAP5-1416 , jQuery is not combined
> into the single js file, there is no way to call nonConflict() ahead of
> Prototype, that seems the problem.
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-tp3345797p3346002.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: news feed

2011-01-24 Thread Thiago H. de Paula Figueiredo
On Mon, 24 Jan 2011 20:35:15 -0200, Angelo C.   
wrote:



Hi,


Hi!

I'd like to  do something like twitter, it shows how many new tweets  
without viewer refreshing the screen, what's the t5 way of doing this?  
Thanks,


One way is to write some JavaScript that periodically requests an URL that  
trigger an event handler method that returns a JSONObject or JSONArray and  
then updates the DOM with the new items.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: news feed

2011-01-24 Thread Angelo C.

Hi,

I'd like to  do something like twitter, it shows how many new tweets without
viewer refreshing the screen, what's the t5 way of doing this? Thanks,

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-news-feed-tp3355405p3355405.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: how to use @Secure in an app?

2011-01-23 Thread Angelo C.

putting following in AppModule seems working:

 public static void contributeAlias(Configuration
configuration)
{
BaseURLSource source = new BaseURLSource()
{
public String getBaseURL(boolean secure)
{
String protocol = secure ? "https" : "http";
int port = secure ? 8443 : 8080;
return String.format("%s://www.sample.com:%d", protocol,
port);
}
};
configuration.add(AliasContribution.create(BaseURLSource.class,
source));
}

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-how-to-use-Secure-in-an-app-tp3353434p3353553.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: how to use @Secure in an app?

2011-01-22 Thread Angelo C.

Hi,

I use @Secure in class login, after validating the user program returns to a
non secured page:

@Secure
public class Login {

Class onSuccess() {
// user got validated here
return MainPage.class;
}
}   

and I always get following exception, how to return to a non secured page
from @Secure page? Thanks,

Angelo

2011-01-23 15:30:00.696::WARN:  EXCEPTION 
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:615)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-how-to-use-Secure-in-an-app-tp3353434p3353434.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: @Secure and jetty

2011-01-22 Thread Martin Strand
If you want Jetty to listen on port 8080 too, you will need to add a  
connector for that:





  implementation="org.mortbay.jetty.security.SslSocketConnector">

...
  

  
 8080
  




http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin

On Sat, 22 Jan 2011 10:36:00 +0100, Angelo C.   
wrote:




Hi,

i can access pages annotated with @Secure like:
https://localhost:8443/login
but I can't access plain connection in the same app:  
http://localhost:8080
if I set tapestry.secure-page to true and access https://localhost:8443  
and

all other pages it works.
anything I need to adjust? following is my pom's jetty part:

implementation="org.mortbay.jetty.security.SslSocketConnector">

8443
3
/etc/keystore
pwd123
pwd123
 /etc/keystore
pwd123

thanks.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: @Secure and jetty

2011-01-22 Thread Angelo C.

Hi,

i can access pages annotated with @Secure like:
https://localhost:8443/login
but I can't access plain connection in the same app: http://localhost:8080
if I set tapestry.secure-page to true and access https://localhost:8443 and
all other pages it works.
anything I need to adjust? following is my pom's jetty part:


8443
3
/etc/keystore
pwd123
pwd123
 /etc/keystore
pwd123

thanks.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-Secure-and-jetty-tp3352684p3352684.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
I found a solution ...

1down voteaccepted

You need a more specific selector to override... BP is pretty general though
so that shouldnt be an issue for example:

table.no-zebra tbody tr:nth-child(even) td,
table.no-zebra tbody tr.even td {
  background: transparent;
}

you can replace transparent with whatever color to make all rows a solid
color.

2011/1/20 Gunnar Eketrapp 

> Aha ! Thanks for the info ...
>
> Then it must be the Blueprint CSS framework that does this ... but striped
> they are ...
>
> I added a beautiful picture and I hope that is not against the list rules
> .-)
>
>
> /Gunnar
>
> 2011/1/20 Thiago H. de Paula Figueiredo 
>
> On Thu, 20 Jan 2011 11:53:41 -0200, Gunnar Eketrapp <
>> gunnar.eketr...@gmail.com> wrote:
>>
>>  Hi!
>>>
>>
>> Hi!
>>
>>  I have used rowClass to mark "bad" rows in one of my grids applied the
>>> following css
>>>
>>> .invalid  {
>>>background-color: #FBE3E4;
>>> }
>>>
>>> It works but only  for the rows with white background 
>>>
>>> How does T5 do the striping ? I guess with some smart .js cause when
>>> inspecting the page with chrome everything seems fine.
>>>
>>
>> I've never seen T5 do striping by itself. I haven't used 5.2 yet (sigh),
>> so I think it's done by CSS.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
Aha ! Thanks for the info ...

Then it must be the Blueprint CSS framework that does this ... but striped
they are ...

I added a beautiful picture and I hope that is not against the list rules
.-)


/Gunnar

2011/1/20 Thiago H. de Paula Figueiredo 

> On Thu, 20 Jan 2011 11:53:41 -0200, Gunnar Eketrapp <
> gunnar.eketr...@gmail.com> wrote:
>
>  Hi!
>>
>
> Hi!
>
>  I have used rowClass to mark "bad" rows in one of my grids applied the
>> following css
>>
>> .invalid  {
>>background-color: #FBE3E4;
>> }
>>
>> It works but only  for the rows with white background 
>>
>> How does T5 do the striping ? I guess with some smart .js cause when
>> inspecting the page with chrome everything seems fine.
>>
>
> I've never seen T5 do striping by itself. I haven't used 5.2 yet (sigh), so
> I think it's done by CSS.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Re: T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Thiago H. de Paula Figueiredo
On Thu, 20 Jan 2011 11:53:41 -0200, Gunnar Eketrapp  
 wrote:



Hi!


Hi!


I have used rowClass to mark "bad" rows in one of my grids applied the
following css

.invalid  {
background-color: #FBE3E4;
}

It works but only  for the rows with white background 

How does T5 do the striping ? I guess with some smart .js cause when
inspecting the page with chrome everything seems fine.


I've never seen T5 do striping by itself. I haven't used 5.2 yet (sigh),  
so I think it's done by CSS.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
Hi!

I have used rowClass to mark "bad" rows in one of my grids applied the
following css

.invalid  {
background-color: #FBE3E4;
}

It works but only  for the rows with white background 

How does T5 do the striping ? I guess with some smart .js cause when
inspecting the page with chrome everything seems fine.

I.e. the  should have this red/pink background but it doesn't ... it has
this blue/gray background that is applied to each second row in the grid.

Is there some easy way to fix this?

Thanks in advance,
Gunnar Eketrapp


Re: t5: 5.2.4 and IE8

2011-01-19 Thread Donny Nadolny
That's how I had it before, it doesn't work. I tried adding it to the end of
the normal minified jQuery, and that worked on most browsers (I tested FF
3.6, IE 6, IE 7, and some version of chrome), but it doesn't work on IE 8. I
got errors in Tapestry's JS when jQuery was included even with noConflict,
and it seems like Angelo experienced it too.

On Wed, Jan 19, 2011 at 1:10 PM, LLTYK  wrote:

>
> I suspect you simply need to add noConflict to the end of the jquery js
> (without having to reminify). As long as it is in the same file it'll
> satisfy IE8.
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/t5-5-2-4-and-IE8-tp5934819p5940730.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: t5: 5.2.4 and IE8

2011-01-19 Thread LLTYK

I suspect you simply need to add noConflict to the end of the jquery js
(without having to reminify). As long as it is in the same file it'll
satisfy IE8.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/t5-5-2-4-and-IE8-tp5934819p5940730.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Resurrected: T5 Rendering a column as text box in a grid when the columnName is dynamic

2011-01-19 Thread LLTYK

Any tapestry identifiers in tml are not dynamically changeable.

First step would be programmatically creating the bean model in the java
code, and passing that to the grid. Customizing those dynamic blocks can be
tricky though, probably involving PropertyEditBlocks in the appmodule or
something.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Resurrected-T5-Rendering-a-column-as-text-box-in-a-grid-when-the-columnName-is-dynamic-tp5940109p5940318.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Resurrected: T5 Rendering a column as text box in a grid when the columnName is dynamic

2011-01-19 Thread Dávið Klein Sundsskarð
Hi,

This entry from 2008 very well describes my problem. Any ideas?
---
http://tapestry.1045711.n5.nabble.com/T5-Rendering-a-column-as-text-box-in-a-grid-when-the-columnName-is-dynamic-td2417938.html

Hello, 

 I have a T5 Grid which can have dynamic number of columns. I am using the 
model to add/delete the columns. I can get it to work perfect if it is a text 
field. I actually want some of those columns to be a text box. Since the 
columns are generated dynamically, i am not able to specify the cellName in the 
.tml file like 

 
 
 

I tried to use a variable for the parameter name like 

 
 
 

but it didnot work for me. 

If anyone can let me know how I could render a column programatically when the 
column name is known only at runtime, i would greatly appreciate it. 

Thanks, 
Rajesh Vargheese 



Re: t5: 5.2.4 and IE8

2011-01-18 Thread Angelo C.

works! you saved my day, thanks for sharing!
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-tp3345797p3346241.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Suspending and restoring a form in T5

2011-01-18 Thread Benny Law
Thanks Norman for your ideas. I will explore them and see what makes the
most sense in my case. I was hoping that there would be something in
Tapestry that I could utilize to make it easier, but I guess not.

Regards,
Benny

On Mon, Jan 17, 2011 at 4:27 PM, Norman Franke  wrote:

> You could use JavaScript to hide the form and use AJAX to put something
> else there. Or create a new absolutely positioned DIV that covers the entire
> contents of the form and use AJAX to do whatever. A sort of easy way is to
> put all your content in a single DIV and just hide that and have another DIV
> that you can then show, with optional AJAX update.
>
> Along these lines, I've used the ModalBox dialog library to display a
> dialog where the user can lookup stuff and hide it when they select whatever
> they want. When they click on the desired item, I auto fill that into the
> desired field on the original form.
>
> Otherwise, I'd serialize the form values into a large hidden text field in
> a separate, but hidden form, and submit that. Store that in the session.
> Then restore later. Google for a prototype-compatible Form deserialization
> routing, I recall needing one a while go and found one.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
>
> On Jan 15, 2011, at 1:14 PM, Benny Law wrote:
>
>  I am developing a mobile application with Tapestry 5. Sometimes, when
>> entering data on a form, I need to display another page (some kind of
>> look-up) where the user can eventually select some value that needs to be
>> brought back to the original form. For desktop web applications, I could
>> implement the look-up page with an iframe so that the user doesn't need to
>> leave the original form. Now, with the mobile application where I can't
>> use
>> iframe, I need some way to suspend the form, saving the state of the form
>> as
>> is without validating anything. Upon returning from the look-up page, I
>> need
>> to restore the form to the state it was in when the user opened the
>> look-up
>> page. What is the best way to do this in Tapestry?
>>
>> Benny
>>
>
>


Re: Suspending and restoring a form in T5

2011-01-18 Thread Benny Law
Thanks Norman for your ideas. I will explore them and see what makes the
most sense in my case. I was hoping that there would be something in
Tapestry that I could utilize to make it easier, but I guess not.

Regards,
Benny

On Mon, Jan 17, 2011 at 4:27 PM, Norman Franke  wrote:

> You could use JavaScript to hide the form and use AJAX to put something
> else there. Or create a new absolutely positioned DIV that covers the entire
> contents of the form and use AJAX to do whatever. A sort of easy way is to
> put all your content in a single DIV and just hide that and have another DIV
> that you can then show, with optional AJAX update.
>
> Along these lines, I've used the ModalBox dialog library to display a
> dialog where the user can lookup stuff and hide it when they select whatever
> they want. When they click on the desired item, I auto fill that into the
> desired field on the original form.
>
> Otherwise, I'd serialize the form values into a large hidden text field in
> a separate, but hidden form, and submit that. Store that in the session.
> Then restore later. Google for a prototype-compatible Form deserialization
> routing, I recall needing one a while go and found one.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
>
> On Jan 15, 2011, at 1:14 PM, Benny Law wrote:
>
>  I am developing a mobile application with Tapestry 5. Sometimes, when
>> entering data on a form, I need to display another page (some kind of
>> look-up) where the user can eventually select some value that needs to be
>> brought back to the original form. For desktop web applications, I could
>> implement the look-up page with an iframe so that the user doesn't need to
>> leave the original form. Now, with the mobile application where I can't
>> use
>> iframe, I need some way to suspend the form, saving the state of the form
>> as
>> is without validating anything. Upon returning from the look-up page, I
>> need
>> to restore the form to the state it was in when the user opened the
>> look-up
>> page. What is the best way to do this in Tapestry?
>>
>> Benny
>>
>
>


Re: t5: 5.2.4 and IE8

2011-01-18 Thread Donny Nadolny
Hi Angelo,

I had this exact problem - jQuery and Prototype don't work out in IE8 (I
vaguely remember reading something about IE8 trying to be smart and load/run
scripts in parallel, which cause problems). Sometimes prototype code would
run, but $ would be referencing jQuery even though I had called noConflict
on jQuery.

Here's my solution, which I'm using in my app right now:
 - Download the un-minified source of jQuery, whichever version you're using
 - Modify it so that it never assigns the $ variable in the first place (in
version 1.4.3 it's line 901: "return (window.jQuery = window.$ = jQuery);
just remove the " = window.$" part.
 - Minify it (I used yahoo's javascript compressor -
http://developer.yahoo.com/yui/compressor/)
And then everything works.

You can grab it from my site if you like (
http://www.deliverthedeals.com/js/jquery-1.4.3.min.js) to verify that it
works. My version has an extra line at the end though, which assigns jQuery
to $j.

Donny

On Tue, Jan 18, 2011 at 6:09 AM, Angelo C.  wrote:

>
> Thanks for the code. It seems to me, T5.2.4 app with jQuery will fail in IE
> 8, from what I found out in Google, running jQuery's noConflict() ahead of
> Prototype might solve the problem, but with this issue:
> https://issues.apache.org/jira/browse/TAP5-1416 , jQuery is not combined
> into the single js file, there is no way to call nonConflict() ahead of
> Prototype, that seems the problem.
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-tp3345797p3346002.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: t5: 5.2.4 and IE8

2011-01-18 Thread Angelo C.

Thanks for the code. It seems to me, T5.2.4 app with jQuery will fail in IE
8, from what I found out in Google, running jQuery's noConflict() ahead of
Prototype might solve the problem, but with this issue:
https://issues.apache.org/jira/browse/TAP5-1416 , jQuery is not combined
into the single js file, there is no way to call nonConflict() ahead of
Prototype, that seems the problem.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-tp3345797p3346002.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: 5.2.4 and IE8

2011-01-18 Thread Joost Schouten (ml)

 I did test it now and it doesn't work. The code should have been:

@AfterRender
private void afterRender(MarkupWriter writer) throws JaxenException {

Element foundIEMode = 
TapestryXPath.xpath("html/head/meta[@http-equiv='X-UA-Compatible']").selectSingleElement(writer.getDocument());

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

But that still doesn't work as like you said the css and js are added to 
the page at a later stage in the rendering phase. Sounds like you need 
to do the reordering after the css/js is added. I guess you can decorate 
the service which does this. Unfortunatly I don't know where this is 
done of the top of my head. Have a look at the source or maybe someone 
else can comment.


Good luck,
Joost


On 18/01/11 9:50 AM, Joost Schouten (ml) wrote:

 Haven't tested it but something like this will probably do the trick:

@AfterRender
private void afterRender(MarkupWriter writer) {
Element foundIEMode = 
writer.getDocument().find("html/head/meta[@http-equiv='X-UA-Compatible']");

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

Cheers,
Joost

On 18/01/11 9:24 AM, Angelo C. wrote:

Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:



but T5.2.4 always has scripts inserted first:

<  script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo







-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: 5.2.4 and IE8

2011-01-18 Thread Joost Schouten (ml)

 Haven't tested it but something like this will probably do the trick:

@AfterRender
private void afterRender(MarkupWriter writer) {
Element foundIEMode = 
writer.getDocument().find("html/head/meta[@http-equiv='X-UA-Compatible']");

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

Cheers,
Joost

On 18/01/11 9:24 AM, Angelo C. wrote:

Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:

  

but T5.2.4 always has scripts inserted first:

<  script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: url rewriting

2011-01-18 Thread Alejandro Scandroli
Hi Angelo

LinkTransformer is ready to use. Here is more info:
http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
I followed that post to write:
http://svn.tynamo.codehaus.org/browse/tynamo/trunk/tapestry-routing/src/main/java/org/tynamo/routing/services/RouterLinkTransformer.java?r=HEAD

Alejandro.

On Sat, Jan 15, 2011 at 2:10 PM, Angelo C.  wrote:
>
> Hi,
>
> what is the status of url rewriting? 5.2.4 has  LinkTransformer and the
> urlwriting here :http://tapestry.apache.org/url-rewriting.html still uses
> the URLRewriterRule which has been deprecated. is LinkTransformer ready to
> use? any tutorial on this? Thanks,
>
> Angelo
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-url-rewriting-tp3342575p3342575.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: 5.2.4 and IE8

2011-01-18 Thread Angelo C.

Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:

 

but T5.2.4 always has scripts inserted first:

< script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo


-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-5-2-4-and-IE8-tp3345797p3345797.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Suspending and restoring a form in T5

2011-01-17 Thread Norman Franke
You could use JavaScript to hide the form and use AJAX to put  
something else there. Or create a new absolutely positioned DIV that  
covers the entire contents of the form and use AJAX to do whatever. A  
sort of easy way is to put all your content in a single DIV and just  
hide that and have another DIV that you can then show, with optional  
AJAX update.


Along these lines, I've used the ModalBox dialog library to display a  
dialog where the user can lookup stuff and hide it when they select  
whatever they want. When they click on the desired item, I auto fill  
that into the desired field on the original form.


Otherwise, I'd serialize the form values into a large hidden text  
field in a separate, but hidden form, and submit that. Store that in  
the session. Then restore later. Google for a prototype-compatible  
Form deserialization routing, I recall needing one a while go and  
found one.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jan 15, 2011, at 1:14 PM, Benny Law wrote:


I am developing a mobile application with Tapestry 5. Sometimes, when
entering data on a form, I need to display another page (some kind of
look-up) where the user can eventually select some value that needs  
to be
brought back to the original form. For desktop web applications, I  
could
implement the look-up page with an iframe so that the user doesn't  
need to
leave the original form. Now, with the mobile application where I  
can't use
iframe, I need some way to suspend the form, saving the state of the  
form as
is without validating anything. Upon returning from the look-up  
page, I need
to restore the form to the state it was in when the user opened the  
look-up

page. What is the best way to do this in Tapestry?

Benny




Re: t5 : second level cache in Hibernate

2011-01-16 Thread Josh Canfield
You do this the sane as you would outside of T5; use the hibernate
properties file.
On Jan 16, 2011 5:42 AM, "Angelo C."  wrote:
>
> Hi,
>
> Sorry if this question is out of topic here, just want to know how to
enable
> and configure Hibernate's second level caching in Tapestry 5 's setting?
> Thanks,
>
> Angelo
> --
> View this message in context:
http://tapestry.1045711.n5.nabble.com/t5-second-level-cache-in-Hibernate-tp3343341p3343341.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


t5 : second level cache in Hibernate

2011-01-16 Thread Angelo C.

Hi,

Sorry if this question is out of topic here, just want to know how to enable
and configure Hibernate's second level caching in Tapestry 5 's setting?
Thanks,

Angelo 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-second-level-cache-in-Hibernate-tp3343341p3343341.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Suspending and restoring a form in T5

2011-01-15 Thread Benny Law
I am developing a mobile application with Tapestry 5. Sometimes, when
entering data on a form, I need to display another page (some kind of
look-up) where the user can eventually select some value that needs to be
brought back to the original form. For desktop web applications, I could
implement the look-up page with an iframe so that the user doesn't need to
leave the original form. Now, with the mobile application where I can't use
iframe, I need some way to suspend the form, saving the state of the form as
is without validating anything. Upon returning from the look-up page, I need
to restore the form to the state it was in when the user opened the look-up
page. What is the best way to do this in Tapestry?

Benny


T5: url rewriting

2011-01-15 Thread Angelo C.

Hi,

what is the status of url rewriting? 5.2.4 has  LinkTransformer and the
urlwriting here :http://tapestry.apache.org/url-rewriting.html still uses
the URLRewriterRule which has been deprecated. is LinkTransformer ready to
use? any tutorial on this? Thanks,

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-url-rewriting-tp3342575p3342575.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: 5.2.4 and memory

2011-01-14 Thread Angelo C.

Hi,

I'm very satisfied with 5.2.4's performance, fast and use less memory, one
thing I notice is, it uses PermGen faster than 5.1, so if default setting of
PermGen (64mb?) is used, it is fast hitting the Perm Gen out of memory
error, my app uses 90MB PermGen in 5.1, it uses around 105MB in 5.2.4, it
had a committed memory around 3G in 5.1, but it committed only 1G in 5.2.4
after a few days running, and upgrading to 5.2.4 is really simple, just a
change of version number, did encounter some problems initially but that was
all my fault. thanks to to the Tapestry5 team for a wonderful job.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-and-memory-tp624p3342387.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Anna Vo
The alternative to hiding a link on the page (if you want a better
separation of logic) is to pass a JSonObject with your data directly
to the JavaScript method. This way if you need to you can easily pass
additional data to the client for processing.

So at the top of your class
@Import(library = "foo/your-file.js")

Example:
void afterRender()
{
Link youUrl = resources.createEventLink("yourAction");

JSONObject spec = new JSONObject();
spec.put("yourUrl", yourUrl.toURI());
.

javascriptSupport.addInitializerCall("yourJs", spec);
   }

Javascript:

Tapestry.Initializer.yourJs = function(spec)
{
...
}

On Fri, Jan 14, 2011 at 10:45 AM, Adam Zimowski  wrote:
> Thanks Thiago! I'll take a look at these examples.
>
> @Michael - how clever !! This may be just the shortcut I needed.
>
> Adam
>
> On Fri, Jan 14, 2011 at 10:40 AM, Michael Taylor  
> wrote:
>> My first thought would be to include the action link in the page somewhere,
>> but set its style to "display: none".
>> Then your JavaScript can do something like
>>
>> document.location.href = document.getElementById('myActionLink').href;
>>
>> In the past I've done something similar to trigger a zone update from inside
>> a JavaScript function.
>>
>>
>> Cheers,
>>
>> Mike T
>>
>> On Fri, Jan 14, 2011 at 11:27 AM, Adam Zimowski wrote:
>>
>>> Hi
>>>
>>> I have a feeling like this is so simple and I'm missing something
>>> really obvious. I have a question on the recommended approach for a
>>> specific scenario:
>>>
>>> An HTML button showing a JS popup rendered via Ajax. Here is specific
>>> example:
>>>
>>>
>>> http://www.chdist.com/industrial-safety-supplies/personal-protective-equipment/d-106931-106931-153343
>>>
>>> This is a struts app which I'm converting to Tapestry. On go-live,
>>> other than URLs, it must look exactly like current production so I
>>> have to preserve the look-and-feel as well as the behavior.
>>>
>>> My question is, how should I approach this? Currently, the price
>>> button invokes a JS call. So how can I call actionlink URL from a
>>> JavaScript?
>>>
>>> Adam
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Adam Zimowski
Thanks Thiago! I'll take a look at these examples.

@Michael - how clever !! This may be just the shortcut I needed.

Adam

On Fri, Jan 14, 2011 at 10:40 AM, Michael Taylor  wrote:
> My first thought would be to include the action link in the page somewhere,
> but set its style to "display: none".
> Then your JavaScript can do something like
>
> document.location.href = document.getElementById('myActionLink').href;
>
> In the past I've done something similar to trigger a zone update from inside
> a JavaScript function.
>
>
> Cheers,
>
> Mike T
>
> On Fri, Jan 14, 2011 at 11:27 AM, Adam Zimowski wrote:
>
>> Hi
>>
>> I have a feeling like this is so simple and I'm missing something
>> really obvious. I have a question on the recommended approach for a
>> specific scenario:
>>
>> An HTML button showing a JS popup rendered via Ajax. Here is specific
>> example:
>>
>>
>> http://www.chdist.com/industrial-safety-supplies/personal-protective-equipment/d-106931-106931-153343
>>
>> This is a struts app which I'm converting to Tapestry. On go-live,
>> other than URLs, it must look exactly like current production so I
>> have to preserve the look-and-feel as well as the behavior.
>>
>> My question is, how should I approach this? Currently, the price
>> button invokes a JS call. So how can I call actionlink URL from a
>> JavaScript?
>>
>> Adam
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Michael Taylor
My first thought would be to include the action link in the page somewhere,
but set its style to "display: none".
Then your JavaScript can do something like

document.location.href = document.getElementById('myActionLink').href;

In the past I've done something similar to trigger a zone update from inside
a JavaScript function.


Cheers,

Mike T

On Fri, Jan 14, 2011 at 11:27 AM, Adam Zimowski wrote:

> Hi
>
> I have a feeling like this is so simple and I'm missing something
> really obvious. I have a question on the recommended approach for a
> specific scenario:
>
> An HTML button showing a JS popup rendered via Ajax. Here is specific
> example:
>
>
> http://www.chdist.com/industrial-safety-supplies/personal-protective-equipment/d-106931-106931-153343
>
> This is a struts app which I'm converting to Tapestry. On go-live,
> other than URLs, it must look exactly like current production so I
> have to preserve the look-and-feel as well as the behavior.
>
> My question is, how should I approach this? Currently, the price
> button invokes a JS call. So how can I call actionlink URL from a
> JavaScript?
>
> Adam
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Thiago H. de Paula Figueiredo
On Fri, 14 Jan 2011 14:27:12 -0200, Adam Zimowski   
wrote:



Hi


Hi!


My question is, how should I approach this? Currently, the price
button invokes a JS call. So how can I call actionlink URL from a
JavaScript?


Every event (ActionLink triggers events) has an URL. To get it, create a  
ComponentResources field and add the @Inject annotation to it, then use  
its Link createEventLink(String eventType, Object... context) method. It  
returns a Link. Use its toAbsoluteURI() to get the URL itself then pass it  
to your JavaScript, must probably by using RenderSupport.addScript()  
(you'll need to @Inject it too). This page has some RenderSupport  
examples: http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained.  
Tapestry JumpStart (http://jumpstart.doublenegative.com.au/) should have  
some examples too.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: Buttons, JS popup, Ajax/Zone and ActionLink

2011-01-14 Thread Adam Zimowski
Hi

I have a feeling like this is so simple and I'm missing something
really obvious. I have a question on the recommended approach for a
specific scenario:

An HTML button showing a JS popup rendered via Ajax. Here is specific example:

http://www.chdist.com/industrial-safety-supplies/personal-protective-equipment/d-106931-106931-153343

This is a struts app which I'm converting to Tapestry. On go-live,
other than URLs, it must look exactly like current production so I
have to preserve the look-and-feel as well as the behavior.

My question is, how should I approach this? Currently, the price
button invokes a JS call. So how can I call actionlink URL from a
JavaScript?

Adam

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: zone in a grid

2011-01-13 Thread Angelo C.

works! thanks.

Taha Hafeez wrote:
> 
> 
> public String getOutputZoneId(){
>return "myzone" + msg.getId();
> }
> 
> 
> 
> What you are generating is a number and AFAIK dom id cant start with a
> numeric
> 
> regards
> taha
> 
> 
> On Thu, Jan 13, 2011 at 4:34 PM, Angelo C. 
> wrote:
> 
>>
>> Hi,
>> Thanks for the fast reply,  how to generate the unique id? i use this:
>>
>> public String getOutputZoneId() {
>>return msg.getId().toString();
>>}
>>
>> but got error:
>>
>> Exception invoking function Tapestry.Initializer.zone with parameters
>> [{"element": "1086"}]: [Exception... "An invalid or illegal string was
>> specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"
>> location: "http://localhost:8080/assets/a6d4555bb3e4e6a0/stack/en/core.js
>> Line: 3301"]
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/T5-zone-in-a-grid-tp3339462p3339595.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> -----
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-zone-in-a-grid-tp3339462p3339647.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: zone in a grid

2011-01-13 Thread Taha Hafeez
You can try


//If it is a component
@Parameter(value="myzone")
private String clientZoneId;

public String getOutputZoneId(){
   return clientZoneId + msg.getId();
}

othewise

public String getOutputZoneId(){
   return "myzone" + msg.getId();
}



What you are generating is a number and AFAIK dom id cant start with a
numeric

regards
taha


On Thu, Jan 13, 2011 at 4:34 PM, Angelo C.  wrote:

>
> Hi,
> Thanks for the fast reply,  how to generate the unique id? i use this:
>
> public String getOutputZoneId() {
>return msg.getId().toString();
>}
>
> but got error:
>
> Exception invoking function Tapestry.Initializer.zone with parameters
> [{"element": "1086"}]: [Exception... "An invalid or illegal string was
> specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"
> location: "http://localhost:8080/assets/a6d4555bb3e4e6a0/stack/en/core.js
> Line: 3301"]
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-zone-in-a-grid-tp3339462p3339595.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: zone in a grid

2011-01-13 Thread Angelo C.

Hi,
Thanks for the fast reply,  how to generate the unique id? i use this:
 
public String getOutputZoneId() {
return msg.getId().toString();
}

but got error:

Exception invoking function Tapestry.Initializer.zone with parameters
[{"element": "1086"}]: [Exception... "An invalid or illegal string was
specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"
location: "http://localhost:8080/assets/a6d4555bb3e4e6a0/stack/en/core.js
Line: 3301"]
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-zone-in-a-grid-tp3339462p3339595.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: zone in a grid

2011-01-13 Thread Joost Schouten (ml)

 Make sure each zone has a unique DOM id. So something like:


  
  <  a t:type="actionlink" t:id="review" context="msg.id" 
zone="prop:outputZoneId">
  action


  
  
  


 

where your java file has:

public String getOutputZoneId() {
return uniqueIdForThisRow;
}

Cheers,
Joost





On 13/01/11 10:26 AM, Angelo C. wrote:

Hi,

I have a grid with a actionLink in each row, it links to a zone, it works.
but the zone's location is fixed in the first row, is there way to put the
zone in each row ? Thanks,

Angelo


   
   <  a t:type="actionlink" t:id="review" context="msg.id" zone="output">
   action


   
   
   
  



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: zone in a grid

2011-01-13 Thread Angelo C.

Hi,

I have a grid with a actionLink in each row, it links to a zone, it works.
but the zone's location is fixed in the first row, is there way to put the
zone in each row ? Thanks,

Angelo


  
  < a t:type="actionlink" t:id="review" context="msg.id" zone="output" >
  action
   

  
  
  
 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-zone-in-a-grid-tp3339462p3339462.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 as document management system

2011-01-12 Thread Thiago H. de Paula Figueiredo
On Wed, 12 Jan 2011 21:29:34 -0200, stipenovi   
wrote:



Thanks for prev. answer.
You are right - it is both generic an T5 question for me.

I was wondering is there some API for T5 similar to googleDocs, so i can
manipulate with rendered stream?


You're talking about very different things here. T5 is a web framework,  
while Google Docs is a web site, a web app.
On the other hand, if there's a Java package out there that has similar  
features to Google Docs, it will probably be easy to use inside T5.


Thing is that user when see image/pdf must not have option to RightClick  
and for example do Copy, if this is an image, he can just see picture  
and read document, no printing, no nothing...


I'm not following you. Do you want your users to be able to copy content  
text or not?


Even if a document is converted to images, you can still print it from  
your browser.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 as document management system

2011-01-12 Thread stipenovi

Thanks for prev. answer.

You are right - it is both generic an T5 question for me.

I was wondering is there some API for T5 similar to googleDocs, so i can
manipulate with rendered stream?
Thing is that user when see image/pdf must not have option to RightClick and
for example do Copy, if this is an image, he can just see picture and read
document, no printing, no nothing...


-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-as-document-management-system-tp3338936p3339091.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 as document management system

2011-01-12 Thread Vangel Ajanovski
You can run openoffice headless (without gui) on a web server and it works as a 
service that can convert documents from one format to another - lets say doc to 
pdf. You can run firefox headless to render a webpage to virtual framebuffer.

And in unix world there are many binary tools that can be used in the 
background to process files so probably there will be some tool to extract the 
text to create a description, to render page by page into jpeg, to ocr an image 
into text etc...

Many opensource DMS work in this way ... investigate on  it. Learn how they do 
it.

-original message-
From: "Thiago H. de Paula Figueiredo" 

method. I have no idea of viewers for  
Word and ODF files.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 as document management system

2011-01-12 Thread Thiago H. de Paula Figueiredo
On Wed, 12 Jan 2011 19:29:55 -0200, stipenovi   
wrote:



I have just one question? Does anyone suggest me how to build DMS in T5?
For example:
On server side i have DB (Postgres) and i am storing files (pdf, doc,  
ods, jpg, all) in a Blob.
Now, i want to show these files in client side (browser), but not in  
default viewer, but in some viewer which is embeded on the T5 page.

How can i do this?


I can't see how this question is specifically for Tapestry instead of  
being a generic one about web development in Java in general. The problem  
here, as far as I can see, is how to provide the viewing part. Do you have  
any viewer in mind? PDFBox can render PDF to images. JPG, PNG, GIF, BMP  
and SVG are already handled by all decent browsers (IE doesn't handle SVG  
yet, not a decent browser). For them, create a page that returns a  
StreamResponse on its onActivate() method. I have no idea of viewers for  
Word and ODF files.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 as document management system

2011-01-12 Thread stipenovi

I have just one question? Does anyone suggest me how to build DMS in T5?

For example:

On server side i have DB (Postgres) and i am storing files (pdf, doc, ods,
jpg, all) in a Blob.
Now, i want to show these files in client side (browser), but not in default
viewer, but in some viewer which is embeded on the T5 page.

How can i do this?

Thanks...
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-as-document-management-system-tp3338936p3338936.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: secure annotation

2011-01-10 Thread Thiago H. de Paula Figueiredo
On Mon, 10 Jan 2011 11:31:07 -0200, Angelo C.   
wrote:



Hi,


Hi!

putting @secure in a class and run it in mvn jetty:rn, got: SSL  
connection error. how to setup jetty to  take care of this? Thanks,


Chech the SSL Jetty documentation. This is not related to Tapestry at all.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



<    3   4   5   6   7   8   9   10   11   12   >