ICEfaces
  1. ICEfaces
  2. ICE-6500

The h:message component rendering causes a full page reload.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Enclose <h:message> in a < h:panelGroup>.
      Show
      Enclose <h:message> in a < h:panelGroup>.

      Description

      The MessageRenderer, responsible for rendering the h:message component, does not render an ID around the dynamically generated text. It's also not clear if any containing element is rendered even if the message is empty (the containing element is required by ICEfaces for Ajax update).

      1. screenshot-01.png
        229 kB
      2. screenshot-02.png
        172 kB
      3. screenshot-03.png
        172 kB

        Activity

        Deryk Sinotte created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Salesforce Case []
        Description The MessagesRenderer, responsible for rendering the h:messages component, renders different nodes depending on whether there are messages or not. When there are no messages to render, it renders:

        <div id="messages"></div>

        However, if there are messages to render, it replaces the div with a ul (or a table depending on how it's configured):

        <ul id="messages"><li> Message added via actionListener: form:add </li></ul>

        If the h:message component is a child of the body, the DOM diff algorithm will determine that the closest parent is html and send a window.location.reload() command back to the client.
        The MessageRenderer, responsible for rendering the h:message component, does not render an ID around the dynamically generated text. It's also not clear if any containing element is rendered even if the message is empty (the containing element is required by ICEfaces for Ajax update).

        Hide
        Ted Goddard added a comment -

        This should likely be done by the component team. Assigning to Deryk for assignment based on current release schedules.

        Show
        Ted Goddard added a comment - This should likely be done by the component team. Assigning to Deryk for assignment based on current release schedules.
        Ted Goddard made changes -
        Workaround Description Enclose <h:message> in a < h:panelGroup>.
        Workaround Exists [Yes]
        Salesforce Case []
        Fix Version/s 2.0.1 [ 10255 ]
        Fix Version/s 2.0-Alpha3 [ 10032 ]
        Fix Version/s 2.0.0 [ 10230 ]
        Assignee Judy Guglielmin [ judy.guglielmin ] Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Assignee Deryk Sinotte [ deryk.sinotte ] Judy Guglielmin [ judy.guglielmin ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2
        Assignee Judy Guglielmin [ judy.guglielmin ] Yip Ng [ yip.ng ]
        yip.ng made changes -
        Attachment screenshot-01.png [ 12865 ]
        Hide
        yip.ng added a comment -

        An id does get rendered, even when there is no id specified for <h:message>. See screenshot 1.

        Show
        yip.ng added a comment - An id does get rendered, even when there is no id specified for <h:message>. See screenshot 1.
        Hide
        Ted Goddard added a comment -

        Maybe this was fixed in mojarra 2.1?

        Show
        Ted Goddard added a comment - Maybe this was fixed in mojarra 2.1?
        Hide
        Ken Fyten added a comment -

        Deryk, Yip can't reproduce this using the compat component showcase. Please attach a test-case or detailed instructions on how to reproduce this.

        Show
        Ken Fyten added a comment - Deryk, Yip can't reproduce this using the compat component showcase. Please attach a test-case or detailed instructions on how to reproduce this.
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Yip Ng [ yip.ng ] Deryk Sinotte [ deryk.sinotte ]
        yip.ng made changes -
        Assignee Deryk Sinotte [ deryk.sinotte ] Yip Ng [ yip.ng ]
        Hide
        yip.ng added a comment - - edited

        From Deryk:

        I'm not a 100% sure but I think that perhaps Ted cloned another issue that I originally created (http://jira.icefaces.org/browse/ICE-5660) which was for h:messages. There are comments in that case that indicate that anyway. The description was simply modified so it applied to h:message. In any event, I don't have a test case but:

        • The problem was with h:message and I think Component Showcase uses ice:message (from the example for the screenshot). So we should ensure we're testing with an h:message. Perhaps adding and h:message to the core/basic example would do it.
        • As Ted notes in his comment, this may have been fixed or the behaviour changed when upgrading to JSF 2.1.x. We should try the behaviour in the ICEfaces 2.0 release version and in the current trunk and see if the behaviour is different at all.
        Show
        yip.ng added a comment - - edited From Deryk: I'm not a 100% sure but I think that perhaps Ted cloned another issue that I originally created ( http://jira.icefaces.org/browse/ICE-5660 ) which was for h:messages. There are comments in that case that indicate that anyway. The description was simply modified so it applied to h:message. In any event, I don't have a test case but: The problem was with h:message and I think Component Showcase uses ice:message (from the example for the screenshot). So we should ensure we're testing with an h:message. Perhaps adding and h:message to the core/basic example would do it. As Ted notes in his comment, this may have been fixed or the behaviour changed when upgrading to JSF 2.1.x. We should try the behaviour in the ICEfaces 2.0 release version and in the current trunk and see if the behaviour is different at all.
        yip.ng made changes -
        Attachment screenshot-01.png [ 12877 ]
        yip.ng made changes -
        Attachment screenshot-01.png [ 12877 ]
        yip.ng made changes -
        Attachment screenshot-02.png [ 12878 ]
        Hide
        yip.ng added a comment -

        Problem reproducible in ACE showcase. See screenshot 2. But the rendering isn't done by com.icesoft.faces.renderkit.dom_html_basic.MessageRenderer. Is it done by com.sun.faces.renderkit.html_basic.MessageRenderer? How are we going to modify that? Change the renderer mapping for <h:message> and create a new class for it? How to do that?

        Show
        yip.ng added a comment - Problem reproducible in ACE showcase. See screenshot 2. But the rendering isn't done by com.icesoft.faces.renderkit.dom_html_basic.MessageRenderer. Is it done by com.sun.faces.renderkit.html_basic.MessageRenderer? How are we going to modify that? Change the renderer mapping for <h:message> and create a new class for it? How to do that?
        Hide
        Ken Fyten added a comment -

        Yip, looks like http://jira.icefaces.org/browse/ICE-5716 was the original fix for h:messages component. The task now is to take that same fix and implement one for h:message as well.

        Show
        Ken Fyten added a comment - Yip, looks like http://jira.icefaces.org/browse/ICE-5716 was the original fix for h:messages component. The task now is to take that same fix and implement one for h:message as well.
        Hide
        yip.ng added a comment -

        Changes in faces-config for ICE-5716 gone. Need to track down another way of mapping renderer to component.

        Show
        yip.ng added a comment - Changes in faces-config for ICE-5716 gone. Need to track down another way of mapping renderer to component.
        Hide
        yip.ng added a comment - - edited

        Mapping in ICE-5716 was moved to DOMRenderKit.java in ICE-5868.

        Show
        yip.ng added a comment - - edited Mapping in ICE-5716 was moved to DOMRenderKit.java in ICE-5868 .
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23991 Tue Feb 22 10:54:38 MST 2011 yip.ng ICE-6500: The h:message component rendering causes a full page reload.
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/html_basic/MessageRenderer.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
        yip.ng made changes -
        Attachment screenshot-03.png [ 12887 ]
        Hide
        yip.ng added a comment - - edited

        Done. See screenshot 3.

        Revision: 23991


        Modified : /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
        Added : /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/html_basic/MessageRenderer.java

        Show
        yip.ng added a comment - - edited Done. See screenshot 3. Revision: 23991 Modified : /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java Added : /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/html_basic/MessageRenderer.java
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Assignee Priority P2
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: