Hello

I am trying to make multiple sets of radio buttons with independent lists
of valid options. The options are all generated dynamically.

I'm having trouble figuring out how to declare the item list provider in my
java code. I have it working fine for a single item. With the sample below
I get the same list for both my radio buttons and my dropdown but I need to
be able to modify the list returned based on which line of input I'm on.

Thank you
dave





<s:iterator value="product.variations">

<table>
<!--  variation stuff -->

<tr>
<td colspan="2">
we have a variation <s:property value="name" />
</td>
</tr>

<s:if test="display == 'radio'">

<s:radio key="name"   list="itemList"   />

</s:if>

<s:if test="display == 'dropdown'">

<s:select list="itemList" key="name"></s:select>

</s:if>

</table>

</s:iterator>



public ArrayList<String> getItemList() {

logger.debug("get item list");
ArrayList<String> retval = new ArrayList<String>();
retval.add("the first option");
retval.add("the second option");
return retval;
}

Reply via email to