Below is the code snippet that is being used. When i remove the rendered attribute from the below code, the listener is getting called. but with render, its not calling the listener. My PrimaryContactHomeAddressBean bean is in RequestScope whereas AddressManagedBean is having ViewScope.
<p:outputPanel id="countyPanel">
<p:panelGrid
id="primaryContactHomeZipPanel" rendered="#{address.isMultipleCounty eq 'Yes'}">
<h:outputLabel for="primaryContactHomeCounty">
</h:outputLabel>
<p:selectOneMenu id="primaryContactHomeCounty"
value="#{addressManagedBean.countyName}">
<f:selectItems value="#{addressManagedBean.countyListDropdown}" />
<p:ajax listener="#{primaryContactHomeAddressBean.saveCountyName}" process="@this" update="primaryContactHomecountyName" partialSubmit="true"></p:ajax>
</p:selectOneMenu>
<p:message for="primaryContactHomeCounty" />
</p:panelGrid>
</p:outputPanel>
I could solve this issue by moving
isMultipleCounty
variable to aViewScoped
Bean i.e.AddressManagedBean.