I have one <h:selectOneMenu>
inside that <a4j:support>
is written.
I have to pass the currently selected value through <a4j:support>
as a parameter to action.
How can I do this?
<rich:modalPanel>
<a4j:form>
<rich:dataTable value="#{factoryCollectionOfUsers}" var="foo">
<h:selectOneMenu name="role">
<s:selectItems
value="#{userAction.roleArray}"
var="role" label="#{role}"
noSelectionLabel="Please select" />
<a4j:support event="onchange" ajaxSingle="true"
action="#{userAction.setSelection}">
</a4j:support>
<s:convertEnum />
</h:selectOneMenu>
</rich:dataTable>
</a4j:form>
</rich:modalPanel>
You can pass the parameters from JSF page to the backing beans 's action method using the Method expression (For JSF 2.0) ,or <f:param>
,or <f:attribute>
, or f:setPropertyActionListener
.
You can refer to http://www.mkyong.com/jsf2/4-ways-to-pass-parameter-from-jsf-page-to-backing-bean/ for reference.