When using the <a4j:support>
like described in the RichFaces example I'm always getting the following error when changing the value of the drop-down-box.
Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(myId). Found null.
Here's the JSF code:
<h:selectOneMenu id="selectId" valueChangeListener="#{cs.myListener}" value="#{cs.selectList.selectedItem}">
<f:selectItems value="#{cs.bundeslandList.selectItems}" />
<a4j:support event="onchange" reRender="otherFieldId" />
</h:selectOneMenu>
<h:selectOneMenu id="otherFieldId">
<f:selectItems value="#{cs.bundeslandList.selectOtherField.selectItems}" />
</h:selectOneMenu>
Since cs.bundeslandList.selectOtherField.selectItems
is at least an empty ArrayList
, I'm certain that otherFieldId
can't be null
.
I've stripped down now the whole page and I'm no longer getting the error. The valueChangeListener
is called correctly but unfortunately, the otherFieldId
won't be refreshed after the call. It's emptied. But when debugging I can see that the corresponding property is filled with entries.