Details
-
Type:
Task
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha3
-
Component/s: ICE-Components
-
Labels:None
-
Environment:invokeOnComponent
Description
-
Hide
- ICE-4351.war
- 5.66 MB
- Adnan Durrani
-
- META-INF/MANIFEST.MF 0.0 kB
- WEB-INF/classes/beans/Data.class 2 kB
- WEB-INF/classes/beans/Bean$1.class 1 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- main.xhtml 0.8 kB
- WEB-INF/lib/icefaces-compat.jar 561 kB
- WEB-INF/classes/beans/Bean.class 3 kB
- WEB-INF/lib/icefaces-comps-compat.jar 1.92 MB
- WEB-INF/classes/beans/Data.java 1.0 kB
- iceTable.xhtml 3 kB
- WEB-INF/classes/beans/Bean.java 2 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/faces-config.xml 0.4 kB
- WEB-INF/lib/jsf-impl.jar 1.75 MB
- index.jsp 0.1 kB
- WEB-INF/lib/jsf-api.jar 580 kB
- WEB-INF/lib/icefaces.jar 166 kB
- hTable.xhtml 2 kB
- WEB-INF/web.xml 3 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icepush.jar 228 kB
- WEB-INF/lib/commons-collections.jar 558 kB
Issue Links
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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
Please retest attached testcase using latest icefaces2/trunk.
Temporarily backed out Adnan's commit, so he can address some regressions.
Subversion 21929
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
Attaching test case. Source files are included.
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
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.
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