My jsf page works fine if I change the first button to h:commandButton. However, that refreshes the entire page on submit so my requirement is to keep both as ajax supported buttons. My backing bean has all the required methods. The following code doesn't print out the selections when the second button is clicked. The log prints 'null' as selection. What am I doing wrong?
<h:form>
<a4j:commandButton action="#{Bean.getAllReps}" value="Get REPS" reRender="showReps" />
</h:form>
<h:panelGrid columns="1" id="showReps">
<h:panelGrid rendered="#{Bean.actionComplete eq 'fail'}" width="100%" columns="2">
<h:outputText value="Could not get Details" style="color: red; font-size:3mm;" />
</h:panelGrid>
<h:panelGrid rendered="#{Bean.actionComplete eq 'success'}">
<h:panelGrid>
<h:outputText>
<rich:panel>
<h:form>
<h:panelGrid>
<rich:pickList value="#{Bean.slctdRep}" style="text-align: left;">
<f:selectItems value="#{Bean.allReps}" />
</rich:pickList>
</h:panelGrid>
<a4j:commandButton value="Show Selection" reRender="content" type="submit"></a4j:commandButton> //This button doesn't perform partial refresh on element with id "content"
</h:form>
</rich:panel>
<rich:panel>
<h:panelGroup id="content" layout="block">
<h:outputText value="Selected Reps : "></h:outputText>
<h:outputText value="#{Bean.selectedRepsInString}"></h:outputText>
</h:panelGroup>
</rich:panel>
</h:outputText>
</h:panelGrid>
</h:panelGrid>
</h:panelGrid>