[jsf/swf]
In the sellitem-jsf example, the drop down list has hardcoded items. Currently we are hitting problems when submitting the list based on dynamic data.
SWF Example
Our dynamically populated list.Code:<h:selectOneMenu id="select_roles" value="#{flowScope.userAddCommand.roleId}"> <f:selectItem itemLabel="None (0.02 discount rate)" itemValue=""/> <f:selectItem itemLabel="Cat. A (0.1 discount rate when more than 100 items)" itemValue="A"/> <f:selectItem itemLabel="Cat. B (0.2 discount rate when more than 200 items)" itemValue="B"/> </h:selectOneMenu>
The list displays fine, its on sumbit it falls over.Code:<h:selectOneMenu id="select_roles" value="#{flowScope.userAddCommand.roleId}"> <f:selectItems value="${roles}" /> </h:selectOneMenu>
The list is a collection of SelectItem objects.
${roles} is put into flowScope by:
Are we missing something fundemental here?Code:<method-result name="roles"/>
kind regards


Reply With Quote