Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.0
    • Fix Version/s: 4.0.BETA
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces, compat

      Description


      DOMContext is used by components that manipulate the DOMResponseWriter DOM directly. This API should not be used as it prevents the components from rendering when a different ResponseWriter is active.

        Issue Links

          Activity

          Ted Goddard created issue -
          Hide
          Ted Goddard added a comment -

          Porting steps:

          DOMContext calls should first be ordered so that the elimination step is clear:

          Element table = domContext.createElement(HTML.TABLE_ELEM);
          Element calendarDiv = domContext.createElement(HTML.DIV_ELEM);
          calendarDiv
          .setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP);

          table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE);

          Element positionDiv = domContext.createElement(HTML.DIV_ELEM);
          positionDiv.appendChild(table);
          calendarDiv.appendChild(positionDiv);
          root.appendChild(calendarDiv);

          should be replaced with:

          Element calendarDiv = domContext.createElement(HTML.DIV_ELEM);
          calendarDiv.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP);

          Element positionDiv = domContext.createElement(HTML.DIV_ELEM);

          Element table = domContext.createElement(HTML.TABLE_ELEM);
          table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE);

          positionDiv.appendChild(table);

          calendarDiv.appendChild(positionDiv);
          root.appendChild(calendarDiv);

          All setAttribute() calls to an element immediately follow the associated createElement(), and no other calls to DOMContext are permitted until the setAttribute calls are complete.
          No further reference to an element is permitted after appendChild(element) is called.

          The component should be tested once re-ordering is complete and no behavioural changes should be observed.

          This allows the next step in the transformation:

          writer.startElement(HTML.DIV_ELEM, component); //calendarDiv
          writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP, null);

          writer.startElement(HTML.DIV_ELEM, component); //positionDiv

          writer.startElement(HTML.TABLE_ELEM, component); //table
          writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE, null);

          writer.endElement(HTML.TABLE_ELEM); //table

          writer.endElement(HTML.DIV_ELEM); //positionDiv
          writer.endElement(HTML.DIV_ELEM); //calendarDiv

          The DOM element variable names should be added as comments to assist with the endElement() arguments. Once the component is ported, the comments may be removed.

          Show
          Ted Goddard added a comment - Porting steps: DOMContext calls should first be ordered so that the elimination step is clear: Element table = domContext.createElement(HTML.TABLE_ELEM); Element calendarDiv = domContext.createElement(HTML.DIV_ELEM); calendarDiv .setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP); table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE); Element positionDiv = domContext.createElement(HTML.DIV_ELEM); positionDiv.appendChild(table); calendarDiv.appendChild(positionDiv); root.appendChild(calendarDiv); should be replaced with: Element calendarDiv = domContext.createElement(HTML.DIV_ELEM); calendarDiv.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP); Element positionDiv = domContext.createElement(HTML.DIV_ELEM); Element table = domContext.createElement(HTML.TABLE_ELEM); table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE); positionDiv.appendChild(table); calendarDiv.appendChild(positionDiv); root.appendChild(calendarDiv); All setAttribute() calls to an element immediately follow the associated createElement(), and no other calls to DOMContext are permitted until the setAttribute calls are complete. No further reference to an element is permitted after appendChild(element) is called. The component should be tested once re-ordering is complete and no behavioural changes should be observed. This allows the next step in the transformation: writer.startElement(HTML.DIV_ELEM, component); //calendarDiv writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP, null); writer.startElement(HTML.DIV_ELEM, component); //positionDiv writer.startElement(HTML.TABLE_ELEM, component); //table writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE, null); writer.endElement(HTML.TABLE_ELEM); //table writer.endElement(HTML.DIV_ELEM); //positionDiv writer.endElement(HTML.DIV_ELEM); //calendarDiv The DOM element variable names should be added as comments to assist with the endElement() arguments. Once the component is ported, the comments may be removed.
          Hide
          Mark Collette added a comment - - edited

          For regression testing, we could capture the current output of rendering each component, with varying property values, to the dom, then serialising that dom sub-tree to xml / html. Then, after changing the component we could similarly capture the response writer output, and then compare that to the original output, to detect regressions.

          Show
          Mark Collette added a comment - - edited For regression testing, we could capture the current output of rendering each component, with varying property values, to the dom, then serialising that dom sub-tree to xml / html. Then, after changing the component we could similarly capture the response writer output, and then compare that to the original output, to detect regressions.
          Ken Fyten made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.1 [ 10241 ]
          Affects Version/s 2.0.0 [ 10230 ]
          Affects Version/s 2.0.1 [ 10255 ]
          Assignee Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Link This issue blocks ICE-7356 [ ICE-7356 ]
          Ken Fyten made changes -
          Link This issue blocks ICE-7364 [ ICE-7364 ]
          Hide
          Ken Fyten added a comment -

          This is becoming critical to the ice: components working correctly when embedded in ace: components or <f:ajax> tags that use partial tree rendering.

          Show
          Ken Fyten added a comment - This is becoming critical to the ice: components working correctly when embedded in ace: components or <f:ajax> tags that use partial tree rendering.
          Hide
          Mark Collette added a comment -

          When using partial tree rendering, we might be able to side-step this issue by creating a ind of DOMContext that works on just the partial sub tree, without a greater dom.

          Show
          Mark Collette added a comment - When using partial tree rendering, we might be able to side-step this issue by creating a ind of DOMContext that works on just the partial sub tree, without a greater dom.
          Ken Fyten made changes -
          Fix Version/s 3.1 [ 10312 ]
          Fix Version/s 3.0 [ 10241 ]
          Ken Fyten made changes -
          Fix Version/s 3.2 [ 10338 ]
          Fix Version/s 3.1 [ 10312 ]
          Migration made changes -
          Fix Version/s 3.3 [ 10370 ]
          Fix Version/s 3.2 [ 10338 ]
          Hide
          Ken Fyten added a comment -

          Tentatively scheduled for 3.4.

          Show
          Ken Fyten added a comment - Tentatively scheduled for 3.4.
          Ken Fyten made changes -
          Fix Version/s 3.4 [ 10770 ]
          Fix Version/s 3.3 [ 10370 ]
          Hide
          Ken Fyten added a comment -

          First step is to audit the compat components to see which still use this rendering technique.

          Show
          Ken Fyten added a comment - First step is to audit the compat components to see which still use this rendering technique.
          Ken Fyten made changes -
          Assignee Ken Fyten [ ken.fyten ] yip.ng [ yip.ng ]
          Assignee Priority P1 [ 10010 ]
          yip.ng made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          yip.ng made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          yip.ng made changes -
          Attachment Document5.txt [ 15712 ]
          Hide
          yip.ng added a comment -
          Show
          yip.ng added a comment - See Document5.txt .
          Ken Fyten made changes -
          Link This issue blocks ICE-9114 [ ICE-9114 ]
          Ken Fyten made changes -
          Assignee Priority P1 [ 10010 ]
          Ken Fyten made changes -
          Assignee yip.ng [ yip.ng ] Ken Fyten [ ken.fyten ]
          Hide
          Ken Fyten added a comment -

          This is no longer relevant since the Compat components are not supported in ICEfaces 4.

          Show
          Ken Fyten added a comment - This is no longer relevant since the Compat components are not supported in ICEfaces 4.
          Ken Fyten made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]

            People

            • Assignee:
              Ken Fyten
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: