ICEfaces
  1. ICEfaces
  2. ICE-6853

ice:messages not displayed when using Spring Web Flow

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P02
    • Fix Version/s: EE-1.8.2.GA_P04
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Spring 2.5.6, Spring Web Flow 2.0.6

      Description

      The fix for ICE-3668 does not handle the case of global messages. With regards to ICE-3668 and Per Cilius Jakobsen´s comment on 24/Jun/09 05:26, changing the following will resolve the issue:

      result.addMessage("", message);
      to
      result.addMessage(null, message);

        Activity

        Hide
        Greg Dick added a comment -

        The suggested code change looks correct. The facesMessagesWithNoId iterator should hold messages with no id from the FacesContext.getMessages(null) call. From the javadoc, propagating these with result.addMessage(null, message); is the correct call.

        Show
        Greg Dick added a comment - The suggested code change looks correct. The facesMessagesWithNoId iterator should hold messages with no id from the FacesContext.getMessages(null) call. From the javadoc, propagating these with result.addMessage(null, message); is the correct call.
        Hide
        Tyler Johnson added a comment -

        Here is the exact fix that resolves the issue when using P03.

        com.icesoft.faces.context.BridgeFacesContext

        public static FacesContext unwrap(FacesContext facesContext) {
        ........
        .......
        while (clientIdIterator.hasNext()) {
        clientId = (String) clientIdIterator.next();
        Iterator facesMessagesForClientId = facesContext.getMessages(clientId);
        while (facesMessagesForClientId.hasNext()) {
        message = (FacesMessage)facesMessagesForClientId.next();

        // fix start
        if(isGlobalMessage(clientId))

        { result.addMessage(null, message); }

        else

        { result.addMessage(clientId, message); }

        // fix end
        }
        }

        Show
        Tyler Johnson added a comment - Here is the exact fix that resolves the issue when using P03. com.icesoft.faces.context.BridgeFacesContext public static FacesContext unwrap(FacesContext facesContext) { ........ ....... while (clientIdIterator.hasNext()) { clientId = (String) clientIdIterator.next(); Iterator facesMessagesForClientId = facesContext.getMessages(clientId); while (facesMessagesForClientId.hasNext()) { message = (FacesMessage)facesMessagesForClientId.next(); // fix start if(isGlobalMessage(clientId)) { result.addMessage(null, message); } else { result.addMessage(clientId, message); } // fix end } }
        Hide
        Greg Dick added a comment -

        Updated current code to contain fix

        Show
        Greg Dick added a comment - Updated current code to contain fix

          People

          • Assignee:
            Greg Dick
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: