Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.2-EE-GA_P01
-
Fix Version/s: None
-
Component/s: ICE-Components
-
Labels:None
-
Environment:ICEfaces 1.8.2.GA_P01
Description
A view contains a datatable with a row selector. The following use case causes a javax.el.PropertyNotFoundException in the attached sample application:
1. The view panelconfirmation.ifaces renders a datatable with 10 items
2. Select the last item by clicking on it
3. Press the commandButton "Delete" and answer the confirmation panel with yes, this action removes the selected item from the data model in the backing bean
4. Any further click in the data table causes the following javax.el.PropertyNotFoundException:
javax.faces.el.PropertyNotFoundException: javax.el.PropertyNotFoundException: /panelconfirmation.xhtml @44,57 value="#{item.selected}": Target Unreachable, identifier 'item' resolved to null
at javax.faces.component.ValueBindingValueExpressionAdapter.setValue(ValueBindingValueExpressionAdapter.java:154)
at com.icesoft.faces.component.ext.RowSelector.setValue(RowSelector.java:116)
at com.icesoft.faces.component.ext.RowSelector.deselectPreviousSelection(RowSelector.java:484)
at com.icesoft.faces.component.ext.RowSelector.processDecodes(RowSelector.java:432)
at com.icesoft.faces.component.ext.HtmlDataTable.processKids(HtmlDataTable.java:330)
at com.icesoft.faces.component.ext.HtmlDataTable.iterate(HtmlDataTable.java:285)
at com.icesoft.faces.component.panelseries.UISeries.processDecodes(UISeries.java:318)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIForm.processDecodes(UIForm.java:208)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:50)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:171)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:112)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:63)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:55)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:48)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:92)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: javax.el.PropertyNotFoundException: /panelconfirmation.xhtml @44,57 value="#{item.selected}": Target Unreachable, identifier 'item' resolved to null
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:95)
at javax.faces.component.ValueBindingValueExpressionAdapter.setValue(ValueBindingValueExpressionAdapter.java:152)
... 45 more
The reason seems be that in post 1.8.2 releases the rowSelector holds the selection status in an ArrayList "currentSelection" which is not maintained in sync with the table model.
1. The view panelconfirmation.ifaces renders a datatable with 10 items
2. Select the last item by clicking on it
3. Press the commandButton "Delete" and answer the confirmation panel with yes, this action removes the selected item from the data model in the backing bean
4. Any further click in the data table causes the following javax.el.PropertyNotFoundException:
javax.faces.el.PropertyNotFoundException: javax.el.PropertyNotFoundException: /panelconfirmation.xhtml @44,57 value="#{item.selected}": Target Unreachable, identifier 'item' resolved to null
at javax.faces.component.ValueBindingValueExpressionAdapter.setValue(ValueBindingValueExpressionAdapter.java:154)
at com.icesoft.faces.component.ext.RowSelector.setValue(RowSelector.java:116)
at com.icesoft.faces.component.ext.RowSelector.deselectPreviousSelection(RowSelector.java:484)
at com.icesoft.faces.component.ext.RowSelector.processDecodes(RowSelector.java:432)
at com.icesoft.faces.component.ext.HtmlDataTable.processKids(HtmlDataTable.java:330)
at com.icesoft.faces.component.ext.HtmlDataTable.iterate(HtmlDataTable.java:285)
at com.icesoft.faces.component.panelseries.UISeries.processDecodes(UISeries.java:318)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIForm.processDecodes(UIForm.java:208)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:50)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:171)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:112)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:63)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:55)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:48)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:92)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:55)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: javax.el.PropertyNotFoundException: /panelconfirmation.xhtml @44,57 value="#{item.selected}": Target Unreachable, identifier 'item' resolved to null
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:95)
at javax.faces.component.ValueBindingValueExpressionAdapter.setValue(ValueBindingValueExpressionAdapter.java:152)
... 45 more
The reason seems be that in post 1.8.2 releases the rowSelector holds the selection status in an ArrayList "currentSelection" which is not maintained in sync with the table model.
Showcase demonstration the deselection-problem of the rowSelector component. It is a maven project which requires the ICEfaces artifacts in the local repository and can be started using mvn "jetty:run".