You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/09/19 12:02:28 UTC

T5: what's the use of onPassivate

Hi,
I tried the example under 'Render request only' in the following link, if I
remove the :
long onPassivate() { return _productId; }
still works, what's the use of it? thanks.

http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
-- 
View this message in context: http://www.nabble.com/T5%3A-what%27s-the-use-of-onPassivate-tf4479983.html#a12774412
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: what's the use of onPassivate

Posted by Nick Westgate <ni...@key-planning.co.jp>.
So now try to add an ActionLink to the detail page ...

Cheers,
Nick.


Angelo Chen wrote:
> Hi Nick,
> 
> It is still not clear to me, example:
>  < a t:type="pagelink" page="member" context="rowBltn.id" > which generates:
> 
> < a href="/myapp/member/4" id="pagelink_11" />
> 
> and the onActivate already has access to the id(4 in this case) without the
> need to use onPassivate,
> 
>  public Class onActivate(Long id) {
> 
>     return null;
>  }
> 
> I must miss something here.
> A.C.
> 
> 
> Nick Westgate wrote:
>> It's a way of persisting the product id into the link context.
>> Client side persistence to avoid using the sesssion.
>>
>> That would be important for links on the detail page.
>>
>> Cheers,
>> Nick.
>>
>>
>> Angelo Chen wrote:
>>> Hi,
>>> I tried the example under 'Render request only' in the following link, if
>>> I
>>> remove the :
>>> long onPassivate() { return _productId; }
>>> still works, what's the use of it? thanks.
>>>
>>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

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


Re: T5: what's the use of onPassivate

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Nick,

It is still not clear to me, example:
 < a t:type="pagelink" page="member" context="rowBltn.id" > which generates:

< a href="/myapp/member/4" id="pagelink_11" />

and the onActivate already has access to the id(4 in this case) without the
need to use onPassivate,

 public Class onActivate(Long id) {

    return null;
 }

I must miss something here.
A.C.


Nick Westgate wrote:
> 
> It's a way of persisting the product id into the link context.
> Client side persistence to avoid using the sesssion.
> 
> That would be important for links on the detail page.
> 
> Cheers,
> Nick.
> 
> 
> Angelo Chen wrote:
>> Hi,
>> I tried the example under 'Render request only' in the following link, if
>> I
>> remove the :
>> long onPassivate() { return _productId; }
>> still works, what's the use of it? thanks.
>> 
>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-what%27s-the-use-of-onPassivate-tf4479983.html#a12775450
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: what's the use of onPassivate

Posted by Nick Westgate <ni...@key-planning.co.jp>.
It's a way of persisting the product id into the link context.
Client side persistence to avoid using the sesssion.

That would be important for links on the detail page.

Cheers,
Nick.


Angelo Chen wrote:
> Hi,
> I tried the example under 'Render request only' in the following link, if I
> remove the :
> long onPassivate() { return _productId; }
> still works, what's the use of it? thanks.
> 
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

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