Server Side Richfaces PopUp not showing
jsf_pk Feb 28, 2012 5:53 AMHi,
searchResults.xhtml - Relates to SearchResultActionBean.java
<a4j:commandButton value="View Wages" action="#{viewWageBean.viewWages}"/> ------------------1
-----------------------------------------------------------------------------------------
<rich:popupPanel id="Message_info" model="true" rendered="#{viewWageBean.isInfoMessageAvailable()}" styleClass="tablecenter" autosized="true">
<f:facet name="header"><h:outputText value="Status Update"/> </f:facet>
<h:panelGrid>
<h:outputText value="#{viewWageBean.infoMessage}"></h:outputText>
<h:commandButton value="OK" action="payroll"></h:commandButton>
<h:commandButton value="CANCEL">
<rich:componentControl event="click" operation="hide" target="Message_info"/>
</h:commandButton>
</h:panelGrid>
</rich:popupPanel>
ViewWageBean.java - ManagedBean and Session Scoped
public boolean isInfoMessageAvailable(){
if(getInfoMessage()!=null){
return true;
}
return false;
}
/**
* @return the infoMessage
*/
public String getInfoMessage() {
return infoMessage;
}
/**
* @param infoMessage the infoMessage to set
*/
public void setInfoMessage(String infoMessage) {
this.infoMessage = infoMessage;
}
public String viewWages(){ -----------------------2
......
if(aggTypeSize > 0){
}else{
message = " Aggregation: Not Aggregated" +
" No aggregation types recorded for this request, reply combination. "+
" Please contact helpdesk quoting the " +
" Social Security number and Reply Date. " +
" Would you like to view Payroll Details.";
setInfoMessage(message); -------------------- 3
return null;
}
}
Could you please help me how to resoolve this issue. Dynamic Popup is not displaying when the search results page is displaying?
I am returning null in the viewWages(). So, it will go back to searchResults.xhtml from the ViewWagesBean.java. But the pop up is not displaying?Pop up has show attribute to read the boolean method in the view wage bean, if the message is available it will return true and the pop up should display.