myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Cetina <>
Subject Message in @InitView
Date Fri, 09 Mar 2012 21:45:32 GMT
How can i show an error message when the page load for the first time, this
only work if i go to another page and back to the original (this) then the
message in index.xhml show.

Its possible?

public class MyBean implements Serializable{
    public void init(){
         //do something if something its wrong then:
         FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_INFO, "msg", "msg detail"));


*SCJA. José Luis Cetina*

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message