Hi Ivan

This is precisely what I tried.


----- Original Message -----
From: "Ivan Dubrov" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Thursday, 24 April, 2008 1:59:10 PM GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to update a list from a checkbox in a loop in t5

Peter Stavrinides wrote:
> Hi All
>
> I this scenario:
> <t:loop source="myDOA" value="selectedDOA" encoder="encoder">
>            <t:checkbox t:id="archived" />
> </t:loop>

Have you tried something like this:
in .tml:

<t:loop source="myDOA" value="selectedDOA" encoder="encoder">
           <t:checkbox t:id="archived" t:value="archived" />
</t:loop>

in .java:

public boolean isArchived() {
  return selectedDOA.isArhived();
}

public void setArchived(boolean value) {
  return selectedDOA.setArhived(value);
}

selectedDOA is your loop object.

> 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]
>
>


-- 
WBR,
Ivan S. Dubrov



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to