I found the answer to #1, mentioned in another response, and I just found out how to have dynamically generated labels. Simply:
<div t:type="loop" t:source="propertyTypes" value="propertyType" encoder="encoder"> <t:checkbox t:id="ptype" t:value="propertyType" t:label="prop:propertyType.name"/> <label t:type="label" t:for="ptype"></label> </div> Notice the t:id in the checkbox and the t:for in the label. They are "hardcoded", which I thought would throw exceptions. But no, T5 knows they're being looped and just handles it. Awesome! Chris Lewis wrote: > Hello again, > > I have another issue related to the one about checkboxes that I've known > would be an issue at whatever point I needed to use dynamically created > form components. In my case I'm creating a bunch of t:checkboxes, each > representing the (un)selection of a hibernate entity. I'm currently > stuck with two issues: > > 1) I need an encoder, apparently. I use a loop over the entities within > a form to create the checkboxes, and T5 throws an exception saying: > > Render queue error in BeginRender[info/Buyer:loop]: Error serializing > component action for component ... > > Isn't tapestry-hibernate's PK encoder supposed to handle this? In an > effort I set the form to t:volatile="true", but that seems to make it > impossible to access the current object (loop's value parameter) within > the iteration, which I have. Why isn't the value encoder kicking in? > > 2) I need labels for the dynamic checkboxes, which means I need to know > the t:id's of them. How is this possible when looping? > > Hasn't someone dealt with this? > > Thanks in advance, > Chris > > -- http://thegodcode.net --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]