Nikhil Jain
Nikhil Jain

Reputation: 11

There are some unhandled FacesMessages, this means not every FacesMessage had a chance to be rendered

I am little frustrated on this problem - I have an small application recently migrated to Webspehere 8.5.5 and trying to save an order, expected to render a message that is not displaying. Below is snippet of code we are using for rendering the message.

Error Message- are some unhandled FacesMessages, this means not every FacesMessage had a chance to be rendered.

if (headerKey != null && !headerKey.equals("0")) {
    addErrorMessage("A new order has been submitted.");
}

protected void addErrorMessage(String message) {
    addErrorMessage(null, message);
}

protected void addErrorMessage(String componentId, String message) {
    this.getFacesContext().addMessage(
                        componentId, new FacesMessage(FacesMessage.SEVERITY_ERROR,
                        message, message));
}

Upvotes: 1

Views: 6492

Answers (1)

The86Freak
The86Freak

Reputation: 315

just run over this by google:

In my case the problem was that I forgot to update the h:message/p:growl etc component in the view. After adding an update=":form:growlMessages" to my action, it worked.

Upvotes: 1

Related Questions