rich:combobox problems
vincent.crepin Sep 5, 2008 9:11 AMHello.
I have many problems using combobox in my applications. The control is functionnaly very cool and it is exactly what I need. But it behaves strangely.
The strangest thing is that the problems are not consistent.
1) sometimes, when I post back my form, the value of certain comboboxes are resetted. It is not always the same that behaves like that.
2) when I first load my page, the suggestion list is not always shown correctly. Sometimes, incomplete, sometimes totally absent, etc.
I use richfaces 3.2.1.GA.
I'm using comboboxes in a datalist.
<rich:dataList var="ingredient" value="#{org_domain_recipes_session_uievents_ingredientList}"
rows="10" id="ingredientDataList">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><rich:comboBox selectFirstOnUpdate="false"
suggestionValues="#{org_domain_recipes_session_uievents_recipeEdit.allQuantities}"
defaultLabel="#{messages['recipeEdit.noSelection.label']}"
value="#{ingredient.quantity}" listHeight="500">
</rich:comboBox></td>
<td><rich:comboBox selectFirstOnUpdate="false"
suggestionValues="#{org_domain_recipes_session_uievents_recipeEdit.allIngredientQuantities}"
defaultLabel="#{messages['recipeEdit.noSelection.label']}"
value="#{ingredient.quantityType}" listHeight="500">
</rich:comboBox></td>
<td><rich:comboBox selectFirstOnUpdate="false"
suggestionValues="#{org_domain_recipes_session_uievents_recipeEdit.allIngredientDescriptions}"
defaultLabel="#{messages['recipeEdit.noSelection.label']}"
value="#{ingredient.description}" listHeight="500"
width="200">
</rich:comboBox></td>
<td><a4j:commandButton
action="#{org_domain_recipes_session_uievents_recipeEdit.removeIngredient(ingredient)}"
value="#{messages['recipeEdit.removeIngredientButton.label']}"
reRender="ingredientsPanel" ajaxSingle="false"></a4j:commandButton>
</td>
</tr>
</table>
</rich:dataList>
The suggestions are simply Lists of String objects.
Have someone succeeded to make this kind of code work correctly ?
Thanks in advance.