ICEfaces
  1. ICEfaces
  2. ICE-2187

panelSeries/dataTable bug - tab selection in one row automatically selects the same tab in other rows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7DR#3, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEFaces 1.6.1, JSF 1.1, IE6 / FireFox 2

      Description

      I have a list where each row has to be displayed as a tab set. I am using a panelSeries for iteration over values (same bug exists if I use dataTable instead of panelSeries).

      Within a row, it is not possible to independently select one tab. If I select a tab in one row, all other rows automatically select the same tab too.

      Here is what the code looks like:

       <ice:panelSeries value="#{bb.myList}" var="myObj">
                <ice:panelGroup>
                   <ice:panelTabSet>
                      <ice:panelTab ...
       
      1. panelTabSet.jspx
        1 kB
        yip.ng
      1. screenshot-1.jpg
        267 kB
      2. screenshot-2.jpg
        158 kB

        Issue Links

          Activity

          Alok Mittal created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Fix Version/s 1.6.2 [ 10111 ]
          Assignee Yip Ng [ yip.ng ]
          Alessandro Mori made changes -
          Attachment screenshot-1.jpg [ 10692 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #15020 Wed Oct 24 16:24:58 MDT 2007 yip.ng ICE-2187
          Changed to correctly handle value binding of selected index and tab set panels within a series panel.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #15023 Wed Oct 24 17:05:41 MDT 2007 yip.ng ICE-2187
          Changed to correctly handle value binding of selected index and tab set panels within a series panel.
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSetRenderer.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
          Adnan Durrani made changes -
          Link This issue blocks ICE-1945 [ ICE-1945 ]
          Adnan Durrani made changes -
          Link This issue blocks ICE-1945 [ ICE-1945 ]
          Adnan Durrani made changes -
          Link This issue is duplicated by ICE-1945 [ ICE-1945 ]
          Hide
          yip.ng added a comment -

          Screenshot after the fix.

          Show
          yip.ng added a comment - Screenshot after the fix.
          yip.ng made changes -
          Attachment screenshot-2.jpg [ 10708 ]
          Hide
          yip.ng added a comment -

          Note that you have to use a value binding for the selectedIndex of the panelTabSet component in order to remember the selected tab of each row in the table. See the attached panelTabSet.jspx file for an example.

          Show
          yip.ng added a comment - Note that you have to use a value binding for the selectedIndex of the panelTabSet component in order to remember the selected tab of each row in the table. See the attached panelTabSet.jspx file for an example.
          yip.ng made changes -
          Attachment panelTabSet.jspx [ 10709 ]
          Hide
          yip.ng added a comment -

          How to test:

          Replace component-showcase/web/inc/layoutPanels/panelTabSet.jspx with the attached panelTabSet.jspx file.
          In component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/seriesPanel/Item.java add a selectedIndex property.
          In component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/seriesPanel/Cashier.java, in the init() method, assign a selected index value for each item in the item table.

          Show
          yip.ng added a comment - How to test: Replace component-showcase/web/inc/layoutPanels/panelTabSet.jspx with the attached panelTabSet.jspx file. In component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/seriesPanel/Item.java add a selectedIndex property. In component-showcase/src/com/icesoft/icefaces/samples/showcase/layoutPanels/seriesPanel/Cashier.java, in the init() method, assign a selected index value for each item in the item table.
          yip.ng made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Mark Collette added a comment -

          Changes for ICE-2124 supersede these changes.

          Show
          Mark Collette added a comment - Changes for ICE-2124 supersede these changes.
          Mark Collette made changes -
          Link This issue duplicates ICE-2124 [ ICE-2124 ]
          Hide
          Jacky Lee added a comment -

          Tested content of zip file with ICEfaces 1.6.2 and also with trunk (rev 15202), does not work.

          Made the changes to component-showcase as described by Yip. Trying to change tabs in any of the tabset will only cause the first tabset to change.

          Tracked this down to rev 15045 as where the problem started again. I suspect this is due to Mark's changes in rev 15045 for ICE-2124. Some of changes done by Mark removes the changes made by Yip.

          Show
          Jacky Lee added a comment - Tested content of zip file with ICEfaces 1.6.2 and also with trunk (rev 15202), does not work. Made the changes to component-showcase as described by Yip. Trying to change tabs in any of the tabset will only cause the first tabset to change. Tracked this down to rev 15045 as where the problem started again. I suspect this is due to Mark's changes in rev 15045 for ICE-2124 . Some of changes done by Mark removes the changes made by Yip.
          Jacky Lee made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ken Fyten made changes -
          Fix Version/s 1.7DR#3 [ 10112 ]
          Fix Version/s 1.6.2 [ 10111 ]
          Assignee Yip Ng [ yip.ng ] Mark Collette [ mark.collette ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #15255 Tue Nov 27 10:53:55 MST 2007 mark.collette ICE-2187 : panelSeries/dataTable bug - tab selection in one row automatically selects the same tab in other rows
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelseries/UISeries.java
          Commit graph ADD /icefaces/trunk/icefaces/component/src/com/icesoft/faces/utils/SeriesStateHolder.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltabset/PanelTabSet.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/utils/UpdatableProperty.java
          Hide
          Mark Collette added a comment -

          I made an interface for row level state saving in a UISeries, called SeriesStateHolder, which PanelTabSet uses to preserve its selectedIndex UpdatableProperty.

          Subversion 15255
          icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java
          icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java
          icefaces\component\src\com\icesoft\faces\utils\UpdatableProperty.java
          icefaces\component\src\com\icesoft\faces\utils\SeriesStateHolder.java

          Show
          Mark Collette added a comment - I made an interface for row level state saving in a UISeries, called SeriesStateHolder, which PanelTabSet uses to preserve its selectedIndex UpdatableProperty. Subversion 15255 icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java icefaces\component\src\com\icesoft\faces\utils\UpdatableProperty.java icefaces\component\src\com\icesoft\faces\utils\SeriesStateHolder.java
          Mark Collette made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Sam Xiao added a comment -

          java.lang.NullPointerException
          com.icesoft.faces.component.panelseries.UISeries.restoreRequiredAttribute(UISeries.java:584)
          com.icesoft.faces.component.panelseries.UISeries.processDecodes(UISeries.java:260)
          javax.faces.component.UIForm.processDecodes(UIForm.java:164)
          javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
          javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
          javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
          javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:326)
          com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
          com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
          com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
          com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64)
          com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40)
          com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
          com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:52)
          com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
          com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
          com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
          com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
          com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:117)
          com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:37)
          com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
          com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
          com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)

          Show
          Sam Xiao added a comment - java.lang.NullPointerException com.icesoft.faces.component.panelseries.UISeries.restoreRequiredAttribute(UISeries.java:584) com.icesoft.faces.component.panelseries.UISeries.processDecodes(UISeries.java:260) javax.faces.component.UIForm.processDecodes(UIForm.java:164) javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900) javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900) javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900) javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:326) com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110) com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17) com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64) com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40) com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25) com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:52) com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29) com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:117) com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:37) com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52) com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29) com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
          Sam Xiao made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Sam Xiao added a comment -

          tested against 1.7DR3 build5 and clicking a tab inside the panelseries caused NPE

          Show
          Sam Xiao added a comment - tested against 1.7DR3 build5 and clicking a tab inside the panelseries caused NPE
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #15307 Thu Dec 06 11:08:43 MST 2007 adnan.durrani Fix for java.lang.NullPointerException related to (ICE-2187)
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelseries/UISeries.java
          Hide
          Adnan Durrani added a comment -

          Subversion 15307

          Show
          Adnan Durrani added a comment - Subversion 15307
          Adnan Durrani made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 1.7 [ 10080 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mark Collette [ mark.collette ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Alok Mittal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: