You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rural Hunter <ru...@gmail.com> on 2012/12/14 07:11:32 UTC
Help me to understand the source of Grid
Hello,
I want to customize the grid and the pager. I'm trying to read the
source of Grid and GridPager now. I just met one thing I can not
understand. The links on pager pass the selected page number into
GridPager component by triggering the onAction of GridPager. But in the
onAction of the GridPager, it only sets a private/non-persist value
currentPage with the select page number. I can not find how the
enclosing Grid compenent gets the selected page number. pls help me with
that. Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Help me to understand the source of Grid
Posted by Rural Hunter <ru...@gmail.com>.
δΊ 2012/12/14 15:58, antalk ει:
> The onAction event will trigger a page-reload, as the currentpage parameter
> is passed from the Grid to the Pager:
>
> @Component(parameters =
> { "source=dataSource", "rowsPerPage=rowsPerPage",
> "currentPage=currentPage", "zone=zone" })
> private GridPager pager;
>
>
> It will also be 'reflected back to the grid component' once it changes, as
> the Grid component defines the parameter as 'persist':
>
> @Persist
> private Integer currentPage;
>
> The next page reload will take the newly selected currentpage as starting
> point.
Thanks a lot. I wasn't aware that the parameter binding is
bi-directional. it's really cool!
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Help-me-to-understand-the-source-of-Grid-tp5718710p5718714.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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Help me to understand the source of Grid
Posted by antalk <na...@vankalleveen.net>.
The onAction event will trigger a page-reload, as the currentpage parameter
is passed from the Grid to the Pager:
@Component(parameters =
{ "source=dataSource", "rowsPerPage=rowsPerPage",
"currentPage=currentPage", "zone=zone" })
private GridPager pager;
It will also be 'reflected back to the grid component' once it changes, as
the Grid component defines the parameter as 'persist':
@Persist
private Integer currentPage;
The next page reload will take the newly selected currentpage as starting
point.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Help-me-to-understand-the-source-of-Grid-tp5718710p5718714.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