I am having below command button in generalPage.xhtml which having GeneralPageMB backing bean.
<p:commandButton value="#{facility.facilityName}" ajax="false"
action="facilityHome.xhtml?faces-redirect=true&includeViewParams=true">
<f:param name="fid" value="#{facility.id}" />
</p:commandButton>
And I have second page facilityHome.xhtml which having the following code:
<div style="width: 400px; height: 250px;" class="loginContainerBg">
<h:form id="f" prependId="false">
<f:metadata>
<f:viewParam name="fid" value="#{facilityHomeMB.facilityId}"
converter="com.ot.common.utility.FacilityIdConverter" />
</f:metadata>
</div>
facilityHome.xhtml having backing bean as FacilityHomeMB. So I am trying to get view Parameter and set to facilityId property in FacilityHomeMB bean. My problem is facilityId not getting set. What is wrong with the code ?. Any help will be appreciated.
I am using tomcat 7, Primefaces 4.0, Mojarra 2.1.