I inject bean selectOfferMpans
in other bean
@ManagedProperty(value="#{selectOfferMpans}")
private SelectOfferMpans selectOfferMpans;
public void setSelectOfferMpans(SelectOfferMpans selectOfferMpans) {
this.selectOfferMpans = selectOfferMpans;
}
If I ask for the value of selectOfferMpans.selectedSites
in @PostConstruct
of the second bean , the debugger says it's null.
This property was updated in this action of the 1.xhtml
<p:commandButton id="pCBFind" styleClass="centerAbs" type="submit" icon="ui- icon-search" value="#{text['selectOfferMpans.find']}" actionListener="#{selectOfferMpans.findCustomer}" update="CustomerData,CustomerSites" oncomplete="expandAll();"/>
Then when the user clicks this button the application navigates from the to 1.xhtml to the 2.xhtml
p:commandButton id="pCBCreateOffer" type="submit" icon="ui-icon-check" value="#{text['selectOfferMpans.newOffer']}"
action="#{selectOfferMpans.goToOffers}"/>
code from bean1
public String goToOffers(){
try{
JSFHelper.addParamToRequest(SofycParamNames.CUSTOMER_ID, customerfound.getCustomerId());
JSFHelper.addParamToRequest(SofycParamNames.OPTION, this.getMenuOrigin());
return SofycNavigation.VIEW_CREATE_OFFERS_PAGE;
} catch (Throwable t) {
log.error("goToOffers:", t);
JSFHelper.addErrorMessage(ID_OFFER_SELECT_MPANS_FORM, "Error navigating to offers page");
return null;
}
}
What am I missing?