This is cool.

Is it possible to make query parameter name not the same as java field name?

URLs parameters usualy have different naming sceme (using dashes and
underscores)...

On Fri, Jun 25, 2010 at 06:00, Howard <hls...@gmail.com> wrote:

> I just checked in some very nice changes for Tapestry 5.2; you can now
> easily store data about a page in the URL as query parameters:
> @QueryParameterMapped private String name;
>
> By annotating a page (not a component!) field this way, the field will
> be mapped to the query parameter "name". When a page render link or
> component event link for the page is created, the current value of the
> field will be added as parameter "name". When that link is triggered to
> form a request, the parameter will be read and the field updated from
> the query parameter value.
> It isn't limited to strings ... it uses the whole ValueEncoder
> machinery so that you can encode numbers or even Hibernate entities
> (represented in the URL as their primary key).
> Cool stuff, if I do say so myself. Even I'm still learning how to flex
> the massive amount of meta-programming muscle that Tapestry provides.
> It turns out that the combination of component method advice with
> custom events triggered on the page can do some really sophisticated
> things!
>
> --
> Posted By Howard to Tapestry Central at 6/24/2010 07:00:00 PM




-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Reply via email to