HI!
I have the following code:
<h:panelGrid columns="1" rendered="#{FrameworkBean.errorToDisplay}"> <h:commandLink value="Details" action="showErrors"/> <h:messages globalOnly="true" layout="table"/> </h:panelGrid>
The FrameworkBean.errorToDisplay returns true if there is an error to display. The problem is when I click on the Details link nothing happens, the original page reloads itself. I figured out the problem is that, when I click on the commandLink JSF doesn't do anything because the container panelGrid isn't rendered because that time my errorToDisply method returns false. Which is right 'cause I've displayed the errors using the h:messages component so there isn't any error to display.
This is my code which checks is there any error to display:
public boolean isErrorToDisplay() { return Framework.getFacesContext().getMaximumSeverity() == FacesMessage.SEVERITY_ERROR; }
What should I do to make the Details commandLink work?
thanks,
-- Csík Norbert