myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhav Bhargava <>
Subject RE: FacesMessage with severity ERROR do not prevent calling an action method
Date Wed, 20 Jan 2010 13:50:34 GMT
Hi Volkar,

Thanks for your response. I will add that to the method so that it does not have to be explicitly
done by the developers in their action methods.

>From: [] On Behalf Of Volker
>Hi Madhav,
>the livecycle did not depend on messages in the context. To prevent
>executing actions and direct skip to renderPhase you need to call
>e.g. in your putMessage() method.
>    Volker
2010/1/20 Madhav Bhargava <>:
> 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
> 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***

inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 |
View raw message