Re: Page activation context question

2008-03-23 Thread Howard Lewis Ship
Actually, the conversion of parameters is based on ValueEncoders. For example, using tapestry-hibernate, Hibernate entities are expressed in URLs as their primary key (usually a number). They are converted back from strings to numbers to entities when the event handler method is invoked. The same

Re: Page activation context question

2008-03-23 Thread Yura Tkachenko
Yes, I agree that for tags Tapestry should pass data via URL. But in my example I'm using form component. As the result my form will be rendered into ... But even with that component when I'm passing some data during onSubmit event for fo

Re: Page activation context question

2008-03-23 Thread Howard Lewis Ship
Because the designers of HTML haven't figure out yet that an tag should have a method attribute, like a . Also, the URLs should not be particularly long, as you should be putting in just the ids of objects. If objects are showing up a long MIME encoded serialized strings, you may want to rethink

Re: Page activation context question

2008-03-23 Thread Yura Tkachenko
Thank you Anton. Both solutions are works good for me. But still I have a question why Tapestry 5 is generating long URL for activation context instead of sending these data using HTTP POST? On Sun, Mar 23, 2008 at 12:54 AM, Anton Litvinenko < [EMAIL PROTECTED]> wrote: > To pass more than parame

Re: Page activation context question

2008-03-23 Thread Bill Holloway
Your onActivate method can also take varargs, as in void onActivate (String... args) { _firstObj = restoreFirstObj(args[0]); if (args[1] != null) _secondObj = restoreSecondObj(args[1]); ... } String[] onPassivate () { List args = new ArrayList(); args.add (_firstObj.toStr

Re: Page activation context question

2008-03-23 Thread Anton Litvinenko
To pass more than parameter, a) from onPassivate method you should return an object array: Object[] onPassivate() { return new Object[] {getProductId(), "some string", true}; } b) Then you either define onActivate method as void onActivate(long productId, String xxx, Boolean yyy) { setProduct

Re: Page activation context question

2008-03-22 Thread Yura Tkachenko
And how I can pass more than one parameter? Or did you mean "I cannot pass more than one parameter"? Thanks, Yura. On Sat, Mar 22, 2008 at 10:46 PM, SergeEby <[EMAIL PROTECTED]> wrote: > > Hi, > > You can pass more than one parameter. > > /Serge > > > Yura Tkachenko wrote: > > > > Hi All, > > >

Re: Page activation context question

2008-03-22 Thread SergeEby
Hi, You can pass more than one parameter. /Serge Yura Tkachenko wrote: > > Hi All, > > I've been reading chapter about "Page Activation Context" here: > http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html. And > I > have a question: can I pass using activation context more