You should look at the @PropertySelection component to render a select dropdown complete with options. It takes a "model" attribute (interface IPropertySelectionModel) which essentially wraps a collection/array of options. For your case, you probably want the BeanPropertySelectionModel or StringConvertedPropertySelectionModel. If those don't suit your needs, you can easily write a custom model.

-Steve

neo anderson wrote:
I have similar problem. Is anyone know how to solve it?

Thanks in advice.



Blackwings wrote:
Hi,

I'm looking for the way to change the how the value property of the
@Option
can be change. By default, it put an index from 0 to n. But I don't want
that. I would like to be able to do something like :

<select jwcid="[EMAIL PROTECTED]" name="searchCriteria.requester" size="1"
tabindex="6" class="comboBox9pt">
<option jwcid="@Option" label="ognl:currentRequester.display"
selected="ognl:currentRequester" value="ognl:currentRequester.code"/>
</select>

In this code, when the form is submit, the field
searchCriteria.requestershould be fill-in with
currentRequester.code. Tapestry 4 doesn't allow to have an explicit
"value"
property defined.

Is it possible to create a component from the @Option component, rewrite
the
"render" method and use the setValue(myValues) ?

Thanks

BW




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

Reply via email to