Hi,

I am using myfaces 1.1, icefaces 1.8.1 on WAS 6.0

The controller (backing bean) action methods handle RuntimeException from the 
service layer. Depending on the exception an exception handler will put an 
appropriate message into FacesContext.
For that I have created a utility method:

public static void putMessage(String key, Severity severity,
                                String summary, String detail) {
                FacesContext.getCurrentInstance().addMessage(key,
                                                new FacesMessage(severity, 
summary, detail));
}

In the controller this method is used to put messages. When the page is 
displayed the messages appear properly. However when a user clicks on a 
commandButton then the control goes to the action method bound to the 
commandButton. This should not happen because there are FacesMessages with 
FacesMessage.SEVERITY_ERROR. I checked immediate="true" has not been set on the 
commandButton component.

Is my understanding not correct that if there are FacesMessages with Severity = 
SEVERITY_ERROR in the FacesContext then the invoke application phase will not 
happen and the control would come back to the current page in error?

Regards,
Madhav

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Reply via email to