2005/8/29, Tomáš Drenčák <[EMAIL PROTECTED]>:
> Btw is it possible to create dynamic checkbox through Any component?
> I'd like to show some state for every item in the list which could be
> set or not set. But the problem is to set "checked" attribute of
> checkbox when the state is set. I've done this through conditional
> block inside Table component with checked checkbox in "true" and not
> checked checkbox in "false". But I think it's too much code for simple
> thing....

You can simply use the Checkbox component and its attribute
("selected" in Tapestry 3, "value" in Tapestry 4) :
http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/Checkbox.html
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/Checkbox.html

If you want to use Any, you can try something like :
<input type="checkbox" jwcid="@Any" checked='ognl:state?"true":"false"'/>
But this will always output a "checked" attribute, which is not a good
thing in your case...

Reply via email to