Showing posts with label Display severity message ADF. Show all posts
Showing posts with label Display severity message ADF. Show all posts

Thursday, February 20, 2014

Display messages from the backing bean programmatically

        if(condition ){
        String messageText = " Message to be displayed";
        FacesMessage fm = new FacesMessage(messageText);
        // set the severity of the message
        fm.setSeverity(FacesMessage.SEVERITY_INFO);
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, fm);
    }