(This is more or less the same as a previous post http://jboss.com/index.html?module=bb&op=viewtopic&t=129868)
I have a backing bean with a list of items for a select one meny and a button, when submitted items are removed or added from the list of availible selections.
The xhtml looks like this:
<h:form>
<a4j:region>
<rich:dataTable id="table" .... />
<h:selectOneMenu id="list" value="#{edit.value}" required="true">
<h:selectItems value="#{edit.values}" />
</h:selectOneMenu>
<a4j:commandLink
action="#{edit.addItem}"
reRender="table"/>
</a4j:region>
</h:form>
<h:form>
<a4j:region>
<rich:dataTable id="table" .... />
<h:selectOneMenu id="list" value="#{edit.value}" required="true">
<h:selectItems value="#{edit.values}" />
</h:selectOneMenu>
<a4j:commandLink
action="#{edit.addItem}"
reRender="table,list"/>
</a4j:region>
</h:form>