ICEfaces
  1. ICEfaces
  2. ICE-4351

Compat.: Nested UIData components not working

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      invokeOnComponent

      Description

      If containers have to implement invokeOnComponent and JSF 2.0 variant

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment - - edited

          Under JSF there are only two naming container components UIForm and UIData.

          Under JSF there are only one iterative component : UIData (HtmlDataTable)

          The UIComponent has the default implementation for "invokeOnComponent".

          Only Iterative components needs special care in "invokeOnComponent". The UIData has overridden version of the "invokeOnComponent", which take care of states of its children.

          Under ICEfaces there are following iterative components:

          • HtmlDataTable
          • UIColumns
          • PanelPositioned
          • PanelSeries
          • PanelTabSet

          All above component extended by the UIData so the UIData.invokeOnComponent(..) most probably help them all. We will have to test those.

          Show
          Adnan Durrani added a comment - - edited Under JSF there are only two naming container components UIForm and UIData. Under JSF there are only one iterative component : UIData (HtmlDataTable) The UIComponent has the default implementation for "invokeOnComponent". Only Iterative components needs special care in "invokeOnComponent". The UIData has overridden version of the "invokeOnComponent", which take care of states of its children. Under ICEfaces there are following iterative components: HtmlDataTable UIColumns PanelPositioned PanelSeries PanelTabSet All above component extended by the UIData so the UIData.invokeOnComponent(..) most probably help them all. We will have to test those.
          Hide
          Adnan Durrani added a comment -

          I have tested the invokeOnComponent on all above components under JSF2.0. The invokeOnComponent works fine on all following components except the UIColumns, its due to the reason that invokeOnComponent is not working with nested UIData.

          • HtmlDataTable
          • PanelPositioned
          • PanelSeries
          • PanelTabSet
          Show
          Adnan Durrani added a comment - I have tested the invokeOnComponent on all above components under JSF2.0. The invokeOnComponent works fine on all following components except the UIColumns, its due to the reason that invokeOnComponent is not working with nested UIData. HtmlDataTable PanelPositioned PanelSeries PanelTabSet
          Hide
          Adnan Durrani added a comment -

          Attaching test case. Source files are included.

          Show
          Adnan Durrani added a comment - Attaching test case. Source files are included.
          Hide
          Adnan Durrani added a comment -

          invokeOnCOmponent fixed for nested dataTable

          Command: Commit
          Modified: D:\work\development\head\svn\ossrepo\icefaces\scratchpads\glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\scratchpads\glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java
          Completed: At revision: 21919

          Show
          Adnan Durrani added a comment - invokeOnCOmponent fixed for nested dataTable Command: Commit Modified: D:\work\development\head\svn\ossrepo\icefaces\scratchpads\glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\scratchpads\glimmer\compat\components\src\main\java\com\icesoft\faces\component\panelseries\UISeries.java Completed: At revision: 21919
          Hide
          Mark Collette added a comment -

          Temporarily backed out Adnan's commit, so he can address some regressions.
          Subversion 21929

          Show
          Mark Collette added a comment - Temporarily backed out Adnan's commit, so he can address some regressions. Subversion 21929
          Hide
          Ken Fyten added a comment -

          Please retest attached testcase using latest icefaces2/trunk.

          Show
          Ken Fyten added a comment - Please retest attached testcase using latest icefaces2/trunk.
          Hide
          Greg Dick added a comment -

          javax.faces.FacesException: Unexpected error restoring state for component with id form:tbl:child. Cause: java.lang.IllegalStateException: java.lang.
          InstantiationException: beans.Data.
          at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:239)
          at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)
          at javax.faces.component.UIData.visitTree(UIData.java:1194)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1525)
          at javax.faces.component.UIData.visitTree(UIData.java:1212)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIForm.visitTree(UIForm.java:333)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223)
          at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.IllegalStateException: java.lang.InstantiationException: beans.Data
          at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:110)
          at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1582)
          at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290)
          at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444)
          at com.icesoft.faces.component.panelseries.UISeries.restoreState(UISeries.java:642)
          at com.icesoft.faces.component.ext.HtmlDataTable.restoreState(HtmlDataTable.java:186)
          at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:231)
          ... 31 more
          Caused by: java.lang.InstantiationException: beans.Data
          at java.lang.Class.newInstance0(Class.java:340)
          at java.lang.Class.newInstance(Class.java:308)
          at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:107)
          ... 37 more
          javax.faces.FacesException: Unexpected error restoring state for component with id form:tbl:child. Cause: java.lang.IllegalStateException: java.lang.
          InstantiationException: beans.Data.
          at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:239)
          at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147)
          at javax.faces.component.UIData.visitTree(UIData.java:1194)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1525)
          at javax.faces.component.UIData.visitTree(UIData.java:1212)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIForm.visitTree(UIForm.java:333)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223)
          at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.IllegalStateException: java.lang.InstantiationException: beans.Data
          at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:110)
          at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1582)
          at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290)
          at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444)
          at com.icesoft.faces.component.panelseries.UISeries.restoreState(UISeries.java:642)
          at com.icesoft.faces.component.ext.HtmlDataTable.restoreState(HtmlDataTable.java:186)
          at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:231)
          ... 31 more
          Caused by: java.lang.InstantiationException: beans.Data
          at java.lang.Class.newInstance0(Class.java:340)
          at java.lang.Class.newInstance(Class.java:308)
          at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:107)
          ... 37 more

          Show
          Greg Dick added a comment - javax.faces.FacesException: Unexpected error restoring state for component with id form:tbl:child. Cause: java.lang.IllegalStateException: java.lang. InstantiationException: beans.Data. at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:239) at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147) at javax.faces.component.UIData.visitTree(UIData.java:1194) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1525) at javax.faces.component.UIData.visitTree(UIData.java:1212) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIForm.visitTree(UIForm.java:333) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177) at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131) at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430) at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: java.lang.InstantiationException: beans.Data at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:110) at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1582) at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290) at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444) at com.icesoft.faces.component.panelseries.UISeries.restoreState(UISeries.java:642) at com.icesoft.faces.component.ext.HtmlDataTable.restoreState(HtmlDataTable.java:186) at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:231) ... 31 more Caused by: java.lang.InstantiationException: beans.Data at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:107) ... 37 more javax.faces.FacesException: Unexpected error restoring state for component with id form:tbl:child. Cause: java.lang.IllegalStateException: java.lang. InstantiationException: beans.Data. at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:239) at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:147) at javax.faces.component.UIData.visitTree(UIData.java:1194) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1525) at javax.faces.component.UIData.visitTree(UIData.java:1212) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIForm.visitTree(UIForm.java:333) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:177) at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131) at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:430) at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: java.lang.InstantiationException: beans.Data at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:110) at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1582) at javax.faces.component.ComponentStateHelper.restoreState(ComponentStateHelper.java:290) at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1444) at com.icesoft.faces.component.panelseries.UISeries.restoreState(UISeries.java:642) at com.icesoft.faces.component.ext.HtmlDataTable.restoreState(HtmlDataTable.java:186) at com.sun.faces.application.view.StateManagementStrategyImpl$2.visit(StateManagementStrategyImpl.java:231) ... 31 more Caused by: java.lang.InstantiationException: beans.Data at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308) at javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:107) ... 37 more
          Hide
          Greg Dick added a comment -

          Ok, if I make the Data class serializable, this exception goes away and further, the application now seems to work properly using the ice:dataTable

          Show
          Greg Dick added a comment - Ok, if I make the Data class serializable, this exception goes away and further, the application now seems to work properly using the ice:dataTable

            People

            • Assignee:
              Greg Dick
              Reporter:
              Adnan Durrani
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: