Hi Nicholas This is simply boilerplate code: <t:loop source="myDOA" value="selectedDOA" encoder="encoder"> <t:checkbox t:id="archived" value="archive" /> </t:loop>
Archive is a read only boolean (no setter permitted), no model or encoder is available, which = no easy way to update like say if this was a textfield, making the checkbox not very useful in a loop! Peter ----- Original Message ----- From: "nicholas Krul" <[EMAIL PROTECTED]> To: "Tapestry users" <users@tapestry.apache.org> Sent: Thursday, 24 April, 2008 1:13:44 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: How to update a list from a checkbox in a loop in t5 Perhaps some code would help us out. .tml loop & checkbox snippet .java index & getter & setter snippet ? I can only try On Thu, Apr 24, 2008 at 10:54 AM, Peter Stavrinides < [EMAIL PROTECTED]> wrote: > I have also noticed that the value parameter on the checkbox component is > a read only boolean, so using accessors to write the value is impossible, > which confirms the checkbox is not usable in this way in a loop. > > > Peter Stavrinides wrote: > > > Sorry, let me try rephrasing my question: > > > > When I click on the checkbox, how do I modify the corresponding object > > in the loop? The only way I can see of doing this is to iterate manually, in > > which case a Tapestry checkbox component is not usable in a loop. > > > > Peter > > > > Peter Stavrinides wrote: > > > > > Hi All > > > > > > I this scenario: > > > <t:loop source="myDOA" value="selectedDOA" encoder="encoder"> > > > <t:checkbox t:id="archived" /> > > > </t:loop> > > > > > > How do I use the checkbox correctly when the user clicks it? 'I want > > > to associate it with an object' via a primary key perhaps...but the > > > checkbox > > > only seems to have a value property of the type boolean: > > > > > > > > > http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Checkbox.html > > > > > > Sorry if this question seems trivial, but I have been scratching my > > > head for a while now. > > > > > > thanks, > > > Peter > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]