cancel
Showing results for 
Search instead for 
Did you mean: 

Please correct the errors below then click OK.

esource
Champ on-the-rise
Champ on-the-rise
I'm using the following snippet of code from ClipboardBean to display a message in the page after an action:


         FacesContext context = FacesContext.getCurrentInstance();
         if (Application.getClientConfig(context).isClipboardStatusVisible())
         {
            String pattern = Application.getMessage(context, "nodes_added");
            String msg = MessageFormat.format(pattern, items.size());
            FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
            context.addMessage(null, facesMsg);
         }

The message displays but it appears in red and with the message:

Please correct the errors below then click OK.
* Copied nodes.

No errors appear in the log and there are no other error messages. 

Is there an error?  Why is the message appearing in red?
3 REPLIES 3

esource
Champ on-the-rise
Champ on-the-rise
I'm using the above code in a Dialog.  The error message is set with the variable error_dialog in webclient.properties

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
if you would take a look at jsp file /jsp/dialog/container.jsp witch includes jsp file of dialog you would see that he shows only error msg.
logic: in dialog you have two things it can happen:
1: all ok return to previous dialog
2: error
3 there is no info Smiley Happy.


hope it is clear now.

esource
Champ on-the-rise
Champ on-the-rise
if you would take a look at jsp file /jsp/dialog/container.jsp witch includes jsp file of dialog you would see that he shows only error msg.
logic: in dialog you ha ve two things it can happen:
1: all ok return to previous dialog
2: error
3 there is no info Smiley Happy.


hope it is clear now.

Thank you for the reply, but that is strange.  I was able to return a message on a document details page.  It appears also to be in container.jsp.  Perhaps the document details page is not a dialog?