This all works great except when the text input field uses required="true" and is empty. So I figure its got something to do with that text input field validation failing, but surely there's a way around this? I read the documentation a hundred times.
Here's my page code. Sorry if this is something that should be obvious.
Code: Select all
<h:panelGrid id="masterItemPanel1Grid1" columns="2">
<h:outputLabel for="color" value="#{localMessages['MasterItem.Field.Color']}:" />
<h:inputText id="color" value="#{masterItemBean.selectedMasterItem.color}" label="#{localMessages['MasterItem.Field.Color']}"
size="12" maxlength="10" required="true" />
<h:outputLabel for="selectedCategoryCode" value="#{localMessages['MasterItem.Field.Category']}:" />
<h:selectOneListbox id="selectedCategoryCode" size="1" value="#{masterItemBean.selectedCategoryCode}" >
<f:selectItems id="categorySelectItems" value="#{masterItemBean.categoryMap}" />
<p:ajax actionListener="#{masterItemBean.populateSubcategoryChoices}" event="change" update="selectedSubcategoryCode" />
</h:selectOneListbox>
<h:outputLabel for="selectedSubcategoryCode" value="#{localMessages['MasterItem.Field.Subcategory']}:" />
<h:selectOneListbox id="selectedSubcategoryCode" size="1" value="#{masterItemBean.selectedSubcategoryCode}" >
<f:selectItems id="subcategorySelectItems" value="#{masterItemBean.subcategoryMap}" />
</h:selectOneListbox>
</h:panelGrid>
PrimeFaces v1.0.0
MyFaces v1.2.6
IBM WebSphere Application Server Community Edition v2.1.1.3