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 2008/06/28 10:33:33 UTC

T5: Using @PageActivationContext

Hi,

I came across this new annotation in 5.0.13: @PageActivationContext, not
quite understand its use, anybody care to explain? Thanks,

Angelo
-- 
View this message in context: http://www.nabble.com/T5%3A-Using-%40PageActivationContext-tp18168624p18168624.html
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: Using @PageActivationContext

Posted by Angelo Chen <an...@yahoo.com.hk>.
cool, thanks.


Igor Drobiazko wrote:
> 
> Using @PageActivationContext you don't have to write the onActivate and
> 
> public class Page
> {
>   @PageActivationContext
>   private Person person;
> 
> }
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-Using-%40PageActivationContext-tp18168624p18170199.html
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: Using @PageActivationContext

Posted by Igor Drobiazko <ig...@gmail.com>.
Using @PageActivationContext you don't have to write the onActivate and
onPassivate handler methods. Tapestry will generate these methods for you.
The following classes are equivalent. If Person is a Hibernate entity you
don't even need a ValueEncoder for it.

public class Page
{
  @PageActivationContext
  private Person person;

}

public class Page
{
  private Person person;

  void onActivate(Person person)
  {
    this.person = person;
  }

  Object onPassivate()
  {
      return this.person;
  }

}

On Sat, Jun 28, 2008 at 10:33 AM, Angelo Chen <an...@yahoo.com.hk>
wrote:

>
> Hi,
>
> I came across this new annotation in 5.0.13: @PageActivationContext, not
> quite understand its use, anybody care to explain? Thanks,
>
> Angelo
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Using-%40PageActivationContext-tp18168624p18168624.html
> 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
>
>


-- 
Best regards,

Igor Drobiazko