ICEfaces
  1. ICEfaces
  2. ICE-5014

ice:panelSeries renders a container div which can cause misplaced DOM updates

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      FF3, IE8

      Description

      The ice:panelSeries is rendering a container div which in certain cases is causing the DOM updates to occur in an incorrect location. For example, in the case that a panelSeries is placed within a regular HTML table and an entry is added to the bean1 list:

         <table id="table1">
      <tr>
      <td>Id</td>
      </tr>
      <ice:panelSeries value="#{MyAction.bean1}" var="obj">
      <tr bgcolor="blue">
      <td><ice:outputText value="#{obj.id}" /></td>
      </tr>

      The resulting DOM update is occurring outside of the table as per screenshot1. A refresh is required in order for the values to be re-rendered in their correct locations within the table.
      1. screenshot-1.jpg
        13 kB

        Issue Links

          Activity

          Hide
          Tyler Johnson added a comment -

          Test case intended for deployment on Tomcat 6.

          Show
          Tyler Johnson added a comment - Test case intended for deployment on Tomcat 6.
          Hide
          Mark Collette added a comment -

          From looking at PanelSeriesRenderer, it looks like it has always rendered the containing div element, so this is not a regression. We could change the component to add a non-container-div rendering mode. Because of how the D2D API uses root nodes, it might be easiest to re-write PanelSeriesRenderer to be ResponseWriter based. We don't have any PanelSeries subclasses, so it would be a simple and straightforward conversion. Alternatively, we could add an ice:repeat component, that would be containerless.

          Show
          Mark Collette added a comment - From looking at PanelSeriesRenderer, it looks like it has always rendered the containing div element, so this is not a regression. We could change the component to add a non-container-div rendering mode. Because of how the D2D API uses root nodes, it might be easiest to re-write PanelSeriesRenderer to be ResponseWriter based. We don't have any PanelSeries subclasses, so it would be a simple and straightforward conversion. Alternatively, we could add an ice:repeat component, that would be containerless.
          Hide
          Mark Collette added a comment -

          I should mention that the reason for wanting to remove the div, is that I believe that browser dom fixer is finding this illegal div, between the <table> and <tr> elements, and is moving it outside of the table. This causes problems with our DOM differencing and update mechanism, which is assuming that the <div> is inside the table, when it is really outside of it, with its children still inside the table. The solution is to just not render the offending <div>,

          Show
          Mark Collette added a comment - I should mention that the reason for wanting to remove the div, is that I believe that browser dom fixer is finding this illegal div, between the <table> and <tr> elements, and is moving it outside of the table. This causes problems with our DOM differencing and update mechanism, which is assuming that the <div> is inside the table, when it is really outside of it, with its children still inside the table. The solution is to just not render the offending <div>,
          Hide
          Ken Fyten added a comment -

          Let's create a new responseWriter based ice:repeat component (that doesn't render any markup of it's own).

          Show
          Ken Fyten added a comment - Let's create a new responseWriter based ice:repeat component (that doesn't render any markup of it's own).
          Hide
          Adnan Durrani added a comment -

          ice:repeat component has been created which doesn't render its own markup. It has similar attributes as panelSeries does. I have tested the attached demo with ice:repeat and it works fine. To run attach demo with ice:repeat component only the name of the component has to be changed "ice:panelSeries" should be replaced with "ice:repeat" (e.g.)

          <!-- <ice:panelSeries value="#

          {MyAction.bean1}" var="obj"> -->

          <ice:repeat value="#{MyAction.bean1}

          " var="obj">

          Show
          Adnan Durrani added a comment - ice:repeat component has been created which doesn't render its own markup. It has similar attributes as panelSeries does. I have tested the attached demo with ice:repeat and it works fine. To run attach demo with ice:repeat component only the name of the component has to be changed "ice:panelSeries" should be replaced with "ice:repeat" (e.g.) <!-- <ice:panelSeries value="# {MyAction.bean1}" var="obj"> --> <ice:repeat value="#{MyAction.bean1} " var="obj">
          Hide
          Adnan Durrani added a comment -

          ICE-5132 fixes it.

          Show
          Adnan Durrani added a comment - ICE-5132 fixes it.
          Hide
          Joanne Bai added a comment -

          QA confirmed the fix with success on ICEfaces-ee-1.8.2 branch revision #19738

          Tested on Tomcat 6 + FF3.5 and IE8

          Test app has been committed to repo\qa\trunk\Regression\ICE-5014

          Show
          Joanne Bai added a comment - QA confirmed the fix with success on ICEfaces-ee-1.8.2 branch revision #19738 Tested on Tomcat 6 + FF3.5 and IE8 Test app has been committed to repo\qa\trunk\Regression\ ICE-5014
          Hide
          Ken Fyten added a comment -

          Instead of revising the ice:panelSeries' current (and expected) rendering behavior, a new ice:repeat component has been created to handle this use-case. See ICE-5132 for details.

          Show
          Ken Fyten added a comment - Instead of revising the ice:panelSeries' current (and expected) rendering behavior, a new ice:repeat component has been created to handle this use-case. See ICE-5132 for details.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: