ICEfaces
  1. ICEfaces
  2. ICE-4859

stateSavingMarker should not be visible

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      current icefaces 1.8.1 from trunk

      Description

      Updates for form sends invalid content for empty form.

      In IE6-7 browsers empty forms (for example after modal popup is closed) are displayed with one line of empty area
      - this area should not be visible/

      Example of empty form after inner modal is closed

      <FORM class="iceFrm" id="ts3" onsubmit="return false;" action="javascript:;" method="post" class="iceFrm" enctype="application/x-www-form-urlencoded">
      <INPUT type="hidden" name="ts3" value="ts3" /><INPUT type="hidden" name="icefacesCssUpdates" value="" />
      <DIV id="ts3:stateSavingMarker">
        <INPUT id="javax.faces.ViewState" type="hidden" name="javax.faces.ViewState" value="1" />
        <INPUT type="hidden" name="javax.faces.RenderKitId" value="ICEfacesRenderKit" />
      </DIV>
      <DIV id="ts3hdnFldsDiv" style="DISPLAY: none"></DIV>
      </FORM>

      As you see div id="ts3:stateSavingMarker" should also got style="DISPLAY: none"


      Patch for FormRendered.java
      line 390
                  root.appendChild( n );
                  ((Element) n).setAttribute( "id", id );
      > ((Element) n).setAttribute(HTML.STYLE_ATTR, "display:none;");
                  domWriter.trackMarkerNode( n );
      1. screenshot-1.png
        164 kB
      2. err2.PNG
        18 kB

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2
        Hide
        Joanne Bai added a comment -

        Verified with success using component showcase jsp: the style attribute for icefrm:stateSavingMarker is "width:0px;height:0px;"

        Tested on 1.8.2 build 4 using TE6 and 7

        Show
        Joanne Bai added a comment - Verified with success using component showcase jsp: the style attribute for icefrm:stateSavingMarker is "width:0px;height:0px;" Tested on 1.8.2 build 4 using TE6 and 7
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        yip.ng added a comment -

        Suggested patch applied. See screenshot-1.

        Show
        yip.ng added a comment - Suggested patch applied. See screenshot-1.
        yip.ng made changes -
        Attachment screenshot-1.png [ 12008 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19302 Fri Sep 25 09:57:05 MDT 2009 yip.ng ICE-4859: Specified zero width and height for state saving marker to make sure it doesn't display an empty form. (Suggested by Krashan Brahmanjara.)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8.2 [ 10190 ]
        Ken Fyten made changes -
        Salesforce Case []
        Component/s Framework [ 10013 ]
        Assignee Priority P2
        Assignee Yip Ng [ yip.ng ]
        Priority Major [ 3 ] Minor [ 4 ]
        Hide
        Krashan Brahmanjara added a comment -

        Final patch for this problem.

        Problem sometimes occurs in IE6-8 on complex pages with many empty forms - empty because inner modals are not rendered. Style fix with display=none doesn't work but another width/height works well.

        File core\src\com\icesoft\faces\renderkit\dom_html_basic\FormRenderer.java

        code around row 216
        root.appendChild( n );
        ((Element) n).setAttribute( "id", id );
        218d217
        < ((Element) n).setAttribute(HTML.STYLE_ATTR, "width:0px;height:0px;");
        domWriter.trackMarkerNode( n );
        }

        Show
        Krashan Brahmanjara added a comment - Final patch for this problem. Problem sometimes occurs in IE6-8 on complex pages with many empty forms - empty because inner modals are not rendered. Style fix with display=none doesn't work but another width/height works well. File core\src\com\icesoft\faces\renderkit\dom_html_basic\FormRenderer.java code around row 216 root.appendChild( n ); ((Element) n).setAttribute( "id", id ); 218d217 < ((Element) n).setAttribute(HTML.STYLE_ATTR, "width:0px;height:0px;"); domWriter.trackMarkerNode( n ); }
        Hide
        Krashan Brahmanjara added a comment -

        Another alternative.
        Form with rendered=false should got style="display:none"

        Show
        Krashan Brahmanjara added a comment - Another alternative. Form with rendered=false should got style="display:none"
        Hide
        Krashan Brahmanjara added a comment -

        The same problem is described also in DomUtils.java

        // We don't add the newline if the next tag is a TD,
        // because when rendering our tabbedPane, if there's
        // any whitespace between the adjacent TDs, then
        // Internet Explorer will add vertical spacing
        // Also same for some other tags to avoid extra space (JIRA ICE-1351)

        Show
        Krashan Brahmanjara added a comment - The same problem is described also in DomUtils.java // We don't add the newline if the next tag is a TD, // because when rendering our tabbedPane, if there's // any whitespace between the adjacent TDs, then // Internet Explorer will add vertical spacing // Also same for some other tags to avoid extra space (JIRA ICE-1351 )
        Hide
        Krashan Brahmanjara added a comment -

        Above patch do not resolve problem.

        Probably the problem is in new line signs printed between hidden attributes
        like here.
        "
        </div>
        <div id="ts3hdnFldsDiv"
        "
        Is any workaround?

        Show
        Krashan Brahmanjara added a comment - Above patch do not resolve problem. Probably the problem is in new line signs printed between hidden attributes like here. " </div> <div id="ts3hdnFldsDiv" " Is any workaround?
        Krashan Brahmanjara made changes -
        Field Original Value New Value
        Attachment err2.PNG [ 11936 ]
        Hide
        Krashan Brahmanjara added a comment -

        Empty form view from iedeveloper

        Show
        Krashan Brahmanjara added a comment - Empty form view from iedeveloper
        Krashan Brahmanjara created issue -

          People

          • Assignee:
            yip.ng
            Reporter:
            Krashan Brahmanjara
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: