Announcement Announcement Module
Collapse
No announcement yet.
FacesMessage(s) have been enqueued, but may not have been displayed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FacesMessage(s) have been enqueued, but may not have been displayed

    Hi, I'm using SWF 2.2.1 with JSF 1.2 and Rich Faces and Glassfish 2.1.
    Using the validator with message MessageBuilder to write validation messages the Glassfish log warnings about the validation message:

    Code:
    WARNING: FacesMessage(s) have been enqueued, but may not have been displayed
    The messages are displayed with no problem, but I don't know how to stop the warning message.

    Here some piece of my code:

    Code:
    @Component
    public class BaseValidator {
    
        public void validateEdit(Base base, ValidationContext context) {
            MessageContext messages = context.getMessageContext();
            if(base.getCode() == null || base.getCode().isEmpty()){
                messages.addMessage(new MessageBuilder().error().source("baseForm:code").code("base.code.invalid").build());
    	}
        }
    }
    Code:
    <h:form id="baseForm">
        <h:inputText id="code" value="#{base.code}"/>
        <rich:message for="code"/>
    
        <a4j:commandButton action="confirm" value="Confirm" reRender="panelMessage, baseForm"/>
    </h:form>
    <rich:modalPanel id="panelMessage" width="200" height="350" showWhenRendered="#{errors}">
        <h:messages layout="table" styleClass="navComum"/>
    </rich:modalPanel>
    Code:
    <view-state id="edit" model="base">
        <on-render>
            <set name="viewScope.errors" value="messageContext.hasErrorMessages()"/>
        </on-render>
    
        <transition on="confirm">
            <evaluate expression="baseManager.saveBase(base)" result="flowScope.base"/>
        </transition>
    </view-state>
    The message are displayed on h:messages and rich:message, so, I don't know why the warning message continue.

    Thx for any help,
    Leandro Borges

  • #2
    i have the same problem, my configuration is:
    spring framework 3.2.3
    spring security 3.1.4
    swf 2.3.2
    jsf mojarra 1.2
    richfaces 3.3.3 final

    Comment

    Working...
    X