You might be able to do that with my observe mixin

http://t5stitch-lazan.rhcloud.com/observedemo
On 19 Feb 2016 1:41 p.m., "Davide Vecchi" <d...@amc.dk> wrote:

> The way in which I was thinking to handle this for now was to act
> client-side on the change of a checkbox and send its checked state to the
> server via Ajax, without POSTing the form. The idea of saving the states in
> the client instead is interesting, I had not thought about it and I will
> definitely explore it.
>
> However my final goal is to avoid having to make changes (either client or
> server-side) in each page that has grids with checkboxes, and I was
> wondering if there was some existing functionality that I could exploit to
> somehow make the grid handle the checkbox states on its own without any
> "help" from the page the grid is in.
>
> Otherwise I'm considering modifying the Grid (or the GridPager or other
> component) so that the component is aware of having checkbox columns and
> saves the checkboxes states on paging, and restores them when going back to
> the same grid page. Any suggestion or observation about this would be
> welcome.
>
>
>
> -----Original Message-----
> From: Lance Java [mailto:lance.j...@googlemail.com]
> Sent: Friday, February 19, 2016 14:10
> To: Tapestry users <users@tapestry.apache.org>
> Subject: Re: Making a grid's checkbox column preserve its checked state
> across pages
>
> If you want the values serverside, you'll need to POST the form when
> changing pages. You might find this difficult to achieve as paging is
> currently done as a GET request.
>
> The simplest solution would be to add a change event listener clientside
> and store the values on the client until the form is submitted / saved. You
> might use a hidden text field for this.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

Reply via email to