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/03/16 07:14:06 UTC
T5: Hibernate ValueEncoders
Hi,
In Howard's blog, he mentioend:
Automatic Hibernate ValueEncoders: Use an entity as a page or event context
and what goes in the URL is the entity's id. Likewise, ids are turned back
into entities when passed to event handler methods.
What's really this? how to use it? Thanks.
A.C.
--
View this message in context: http://www.nabble.com/T5%3A-Hibernate-ValueEncoders-tp16075835p16075835.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: Hibernate ValueEncoders
Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,
It means that you can pass Hibernate entities around instead of ids.
Example:
void onActivate(Long id) { User user = session.get(User.class, id); }
Long onPassivate() { return user.getId(); }
becomes
void onActivate(User user) { ... }
User onPassivate() { return user; }
And so forth. Of course this only works if you actually use
tapestry-hibernate. :)
-Filip
On 2008-03-16 07:14, Angelo Chen wrote:
> Hi,
> In Howard's blog, he mentioend:
>
> Automatic Hibernate ValueEncoders: Use an entity as a page or event context
> and what goes in the URL is the entity's id. Likewise, ids are turned back
> into entities when passed to event handler methods.
>
> What's really this? how to use it? Thanks.
>
> A.C.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org