You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nathan Quirynen <na...@pensionarchitects.be> on 2017/01/23 10:07:41 UTC
Loop of checkboxes in form
Hi,
What is the best practice for showing a (dynamic) list of objects as
checkboxes in a form and posting the selection. I have found some
examples, but they all have the need of persisting data in the http
session, which I'd like to avoid as much as possible. Or is this the
only way to achieve this?
An example I found:
http://lombok.demon.co.uk/tapestry5Demo/test/components/checkboxgroupdemo
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Loop of checkboxes in form
Posted by Nathan Quirynen <na...@pensionarchitects.be>.
Thanks all for your answers. And yes JumpStart has been a reference for
me lots of times, so thank you for that!
In my search I've found that Tapestry actually has a component that does
what I need:
https://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checklist.html
I had never seen this component before. In the example in the documents
it does @Persist the "selected" parameter value though, but I don't
think there is any need for this, so I'm not sure why it is like that in
the example.
Nathan
Op 23/01/2017 om 17:35 schreef Thiago H. de Paula Figueiredo:
> On Mon, Jan 23, 2017 at 9:21 AM, JumpStart <
> geoff.callender.jumpstart@gmail.com> wrote:
>
>> Another way without @Persist:
>>
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/
>> loopwithdeletecolumn1
>
> Tapestry JumpStart providing us the correct way of doing stuff again. :)
> The key here is to avoid @Persist is providing a ValueEncoder.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Loop of checkboxes in form
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, Jan 23, 2017 at 9:21 AM, JumpStart <
geoff.callender.jumpstart@gmail.com> wrote:
> Another way without @Persist:
>
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/
> loopwithdeletecolumn1
Tapestry JumpStart providing us the correct way of doing stuff again. :)
The key here is to avoid @Persist is providing a ValueEncoder.
Re: Loop of checkboxes in form
Posted by JumpStart <ge...@gmail.com>.
Another way without @Persist:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/loopwithdeletecolumn1
> On 23 Jan 2017, at 7:14 PM, Lance Java <la...@googlemail.com> wrote:
>
> If you want to avoid http session you could maintain a hidden text field on
> the page which also gets posted alongside the checkboxes. The text field
> contains a comma separated list of the checkbox ids (or maybe just a count
> if index based naming convention)
>
> On 23 Jan 2017 10:07 a.m., "Nathan Quirynen" <na...@pensionarchitects.be>
> wrote:
>
>> Hi,
>>
>> What is the best practice for showing a (dynamic) list of objects as
>> checkboxes in a form and posting the selection. I have found some examples,
>> but they all have the need of persisting data in the http session, which
>> I'd like to avoid as much as possible. Or is this the only way to achieve
>> this?
>>
>> An example I found: http://lombok.demon.co.uk/tape
>> stry5Demo/test/components/checkboxgroupdemo
>>
>> Nathan
>>
>>
>> ---------------------------------------------------------------------
>> 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: Loop of checkboxes in form
Posted by Lance Java <la...@googlemail.com>.
If you want to avoid http session you could maintain a hidden text field on
the page which also gets posted alongside the checkboxes. The text field
contains a comma separated list of the checkbox ids (or maybe just a count
if index based naming convention)
On 23 Jan 2017 10:07 a.m., "Nathan Quirynen" <na...@pensionarchitects.be>
wrote:
> Hi,
>
> What is the best practice for showing a (dynamic) list of objects as
> checkboxes in a form and posting the selection. I have found some examples,
> but they all have the need of persisting data in the http session, which
> I'd like to avoid as much as possible. Or is this the only way to achieve
> this?
>
> An example I found: http://lombok.demon.co.uk/tape
> stry5Demo/test/components/checkboxgroupdemo
>
> Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>