No for booleans isErrorToDisplay() is correct (both is
possible)
The problem must be somewhere in the faces-config file or
the components beyond
Redisplaying the same view often is the result of some
error in the navigation-configuration. Eg:
when there is no navigation-outcome that responds to
"showErrors".
hth
Alexander
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 19, 2005 12:52 PM
To: MyFaces Discussion
Subject: Antwort: display errors
I think for method must be getErrorToDisplay() instead of isErrorToDisplay()
Chris
| Cs�k Norbert
<[EMAIL PROTECTED]>
19.04.2005 11:59 | An: [email protected] Kopie: Thema: display errors |
HI!
I have the following code:
<h:panelGrid columns="1" rendered="#{FrameworkBean.errorToDisplay}">
<h:commandLink value="Details" action=""/>
<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

