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-2.jpg
        158 kB
      2. screenshot-1.jpg
        267 kB

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          Subversion 15307

          Show
          Adnan Durrani added a comment - Subversion 15307
          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
          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)
          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
          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.
          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.
          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.
          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.
          Hide
          yip.ng added a comment -

          Screenshot after the fix.

          Show
          yip.ng added a comment - Screenshot after the fix.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: