primefaces datatable rowEditor error - jsf-2

I'm using JSF 2.2 and primefaces 4.0 with Mojarra 2.2.2 on a Tomcat server.
I'm using a p:datatable with a row editor, but whenever I try to edit a row I get the following error when press the "check" button to save the changes:
may 17, 2014 10:17:03 PM com.sun.faces.context.PartialViewContextImpl processPartial
Información: java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454)
at java.lang.Integer.parseInt(Integer.java:527)
at org.primefaces.component.datatable.DataTable.queueEvent(DataTable.java:666)
at org.primefaces.behavior.ajax.AjaxBehaviorRenderer.decode(AjaxBehaviorRenderer.java:47)
at javax.faces.component.behavior.ClientBehaviorBase.decode(ClientBehaviorBase.java:132)
at org.primefaces.renderkit.CoreRenderer.decodeBehaviors(CoreRenderer.java:486)
at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:64)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at org.primefaces.component.api.UIData.processDecodes(UIData.java:246)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:550)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:692)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIForm.visitTree(UIForm.java:371)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UINamingContainer.visitTree(UINamingContainer.java:174)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:399)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:263)
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
may 17, 2014 10:17:03 PM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
Advertencia: java.lang.NumberFormatException: null
javax.faces.FacesException: java.lang.NumberFormatException: null
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:270)
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454)
at java.lang.Integer.parseInt(Integer.java:527)
at org.primefaces.component.datatable.DataTable.queueEvent(DataTable.java:666)
at org.primefaces.behavior.ajax.AjaxBehaviorRenderer.decode(AjaxBehaviorRenderer.java:47)
at javax.faces.component.behavior.ClientBehaviorBase.decode(ClientBehaviorBase.java:132)
at org.primefaces.renderkit.CoreRenderer.decodeBehaviors(CoreRenderer.java:486)
at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:64)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at org.primefaces.component.api.UIData.processDecodes(UIData.java:246)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:550)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:692)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIForm.visitTree(UIForm.java:371)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UINamingContainer.visitTree(UINamingContainer.java:174)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:399)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:263)
... 26 more
may 17, 2014 10:17:03 PM com.sun.faces.context.AjaxExceptionHandlerImpl handlePartialResponseError
Grave: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454)
at java.lang.Integer.parseInt(Integer.java:527)
at org.primefaces.component.datatable.DataTable.queueEvent(DataTable.java:666)
at org.primefaces.behavior.ajax.AjaxBehaviorRenderer.decode(AjaxBehaviorRenderer.java:47)
at javax.faces.component.behavior.ClientBehaviorBase.decode(ClientBehaviorBase.java:132)
at org.primefaces.renderkit.CoreRenderer.decodeBehaviors(CoreRenderer.java:486)
at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:64)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at org.primefaces.component.api.UIData.processDecodes(UIData.java:246)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:550)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:692)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIForm.visitTree(UIForm.java:371)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UINamingContainer.visitTree(UINamingContainer.java:174)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:399)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:263)
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
this is the part of the xhtml page with the dataTable:
<p:dataTable id="nombreAsociados"
var="asociado"
value="#{nuevaInscripcionBacking.asociados}"
editable="true"
emptyMessage="Aún no ha agregado asociados">
<p:ajax event="rowEdit"
update=":#{cc.attrs.id}:formularioNewIns:distDerechosAsoc"
partialSubmit="true"/>
<p:column headerText="Rut">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{asociado.rut}" />
</f:facet>
<f:facet name="input">
<p:inputMask value="#{asociado.rut}" mask="99.999.999-*" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Nombres">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{asociado.nombre}" />
</f:facet>
<f:facet name="input">
<h:inputText value="#{asociado.nombre}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Apellido Paterno">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{asociado.apellidoPaterno}"/>
</f:facet>
<f:facet name="input">
<h:inputText value="#{asociado.apellidoPaterno}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Apellido Materno">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{asociado.apellidoMaterno}"/>
</f:facet>
<f:facet name="input">
<h:inputText value="#{asociado.apellidoMaterno}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Rol Predio">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{asociado.rolPredio}" />
</f:facet>
<f:facet name="input">
<h:inputText value="#{asociado.rolPredio}" style="width:100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column style="width:6%" rendered="#{nuevaInscripcionBacking.ventana==1 || nuevaInscripcionBacking.ventana==3}">
<p:rowEditor />
</p:column>
<p:column style="width: 6%" rendered="#{nuevaInscripcionBacking.ventana==1 || nuevaInscripcionBacking.ventana==3}">
<p:commandLink id="eliminar"
oncomplete="PF('DialogRemoveAsoc').show()"
update=":#{cc.attrs.id}:formEliminarAsociado"
process="#this"
partialSubmit="true"
styleClass="ui-icon ui-icon-trash">
<f:setPropertyActionListener
value="#{asociado}"
target="#{nuevaInscripcionBacking.asociadoAEliminar}" />
</p:commandLink>
</p:column>
</p:dataTable>
The last column is to delete the row. It actually works fine.
In the code above, the list I use to iterate is of objects "Asociados", which is just a bean with it's corresponding getters and setters.
Any help would be appreciated, thanks in advance.

Related

Rich:Editor - com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;

I'm facing an annoyng problem and i hope someone can help me.
I'm using JSF 2.0, Mojarra 2.0.9 and RichFaces 4.3.0_final.
Trying to add a Rich Faces Editor into a jspf page, but when the page is loaded i have the error below.
If i refresh the browser page the editor is displayed.
This is my jspf page that cause the error ("myEditorValue" is a java.lang.String):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:richext="http://java.sun.com/jsf/composite/richext"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<script>window.CKEDITOR_BASEPATH='#{request.contextPath}/org.richfaces.resources/javax.faces.resource/org.richfaces.ckeditor/';</script>
<h:panelGrid id="myPanel-main" rendered="#{myBean.rendered}" style="width: 100%;">
<h:form id="myPanel-form">
<rich:collapsiblePanel id="myPanel-loadCollapse" rendered="#{not myBean.loadDone}" header="My Header" style="width:100%;">
<h:graphicImage id="myPanel-loading" value="#{user.layout.ajaxLoadingBar}" style="text-align:center;" />
</rich:collapsiblePanel>
<h:panelGroup id="myPanel-data" rendered="#{myBean.loadDone}" layout="block">
<c:forEach var="proposal" items="#{myBean.clientHistoryKeySet}">
<rich:collapsiblePanel id="myPanel-loadDone" style="width:100%;" rendered="#{not empty myBean.clientHistory[proposal]}"
header="Header - #{proposal.id} - (#{proposal.stateproposal})" expanded="#{myBean.expandedSection}"
headerClass= "#{myBean.selectedProp == proposal.id ? myBean.highlightHeader : ''}">
<h:panelGrid id="myPanel-history" columns="8" style="width: 100%;text-align:center;">
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_1" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_2}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_3}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_4}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_5}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_6}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_7}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{user.message.MSG_ID_8}" style="text-align:center;font-size:120%" class = "headerField"></h:outputText>
</h:panelGroup>
<c:forEach var="dat" items="#{myBean.clientHistory[proposal]}">
<h:panelGroup style="float:center">
<h:graphicImage url= "#{dat.pathColor}" width="45%" height="45%" />
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.date1}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.amount1}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.date2}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.date3}" style="text-align:center;font-size:120%;"> </h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.amount2}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.figure}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
<h:panelGroup style="float:center">
<h:outputText value="#{dat.user}" style="text-align:center;font-size:120%;"></h:outputText>
</h:panelGroup>
</c:forEach>
</h:panelGrid>
<c:forEach var="dat" items="#{myBean.clientHistory[proposal]}">
<rich:collapsiblePanel id="myPanel-Editor" rendered="true" switchType="client"
header="Editor Commerciale" style="width:100%;" expanded="false">
<h:panelGroup id="myPanel-SaveEditor">
<a4j:commandLink action="#{dat.saveEditor}" style="margin-left:10px;text-decoration:none;"
onclick="this.style.display='none'" type="button" render="#this myPanel-SaveEditor" status="myPanel-SavingEditor">
<h:graphicImage value="/images/salva.gif"/>
<h:outputText value="Salva"
style="margin-left:10px;font-size:14px;line-height: 20px;color:#274449;font-weight:bold;vertical-align:bottom;" />
</a4j:commandLink>
<a4j:status name="myPanel-SavingEditor">
<f:facet name="start">
<h:graphicImage value="#{user.layout.ajaxLoadingBar}" style="z-index:1000;"/>
</f:facet>
</a4j:status>
<h:graphicImage rendered="#{dat.editorSaved}" style="margin-left:15px;" value="/images/imm_ok.gif"/>
</h:panelGroup>
<br /><br />
<rich:editor id="myEditor" value="#{dat.myEditorValue}" />
</rich:collapsiblePanel>
</c:forEach>
</rich:collapsiblePanel>
</c:forEach>
</h:panelGroup>
</h:form>
<a4j:jsFunction name="loadmyPanel" actionListener="#{myBean.load}" render="myPanel-form" execute="#this" immediate="true" />
<script type="text/javascript">loadmyPanel();</script>
</h:panelGrid>
</ui:composition>
Stacktrace:
javax.faces.FacesException: Unexpected error restoring state for component with id javax_faces_location_BODY. Cause: java.lang.ClassCastException: com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;.
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:273)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1507)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1518)
at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75)
at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at it.uniteam.timeojsf.util.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;
at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1427)
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:265)
... 41 more
javax.faces.FacesException: Unexpected error restoring state for component with id javax_faces_location_BODY. Cause: java.lang.ClassCastException: com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;.
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:273)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1507)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1518)
at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75)
at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at it.uniteam.timeojsf.util.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;
at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1427)
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:265)
... 41 more
giu 24, 2020 8:19:39 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/myApplication] threw exception [com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;] with root cause
java.lang.ClassCastException: com.sun.faces.application.view.StateHolderSaver cannot be cast to [Ljava.lang.Object;
at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1427)
at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:265)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1507)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1518)
at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75)
at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257)
at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at it.uniteam.timeojsf.util.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Primefaces datatable filtering not working [duplicate]

This question already has an answer here:
java.lang.NullPointerException at org.primefaces.component.datatable.feature.FilterFeature.filter
(1 answer)
Closed 6 years ago.
I'm trying to make a table filter using Primefaces 5,
but the filtering dosn't occur and get the follow stack:
java.lang.NullPointerException at
org.primefaces.component.datatable.feature.FilterFeature.filter(FilterFeature.java:136)
at
org.primefaces.component.datatable.feature.FilterFeature.encode(FilterFeature.java:105)
at
org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:77)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903)
at
com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:559)
at
com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:692) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1740) at
javax.faces.component.UIComponent.visitTree(UIComponent.java:1740) at
com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:399)
at
com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:319)
at
org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at
javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896)
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:425)
at
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.star.AuthFilter.doFilter(AuthFilter.java:42) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I'm cloning the primefaces showcase example but i'm not getting it right!
here is my code:
xhtml file:
<p:dataTable id="tbl" var="sim" value="#{simulationLog.simulation}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
paginator="true" rows="10" style="margin-bottom:20px"
filteredValue="#{simulationLog.filtredSimulation}"
>
<p:column filterBy="#{sim.simId}" filterMatchMode="contains">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<p:commandLink value="#{sim.simId}" />
</p:column>
backing bean:
#ManagedBean
#SessionScoped
public class SimulationLog implements Serializable {
.
.
.
private List<SimulationLog> simulation;
private List<SimulationLog> filtredSimulation;
public List<SimulationLog> getSimulation() {
return ParamsDAO.getSimulation(codeAgence);
}
public List<SimulationLog> getFiltredSimulation() {
return filtredSimulation;
}
public void setFiltredSimulation(List<SimulationLog> filtredSimulation) {
this.filtredSimulation = filtredSimulation;
}
.
.
.
}
I had the same error and could fix it by wrapping the dataTable with a <h:form>.
In short, I had the following and was causing the same error:
<f:facet name="header">Date</f:facet>
<f:facet name="filter">
<h:outputText value="Year: " />
<p:selectOneMenu onchange="PF('myTable').filter();">
<f:selectItem itemValue="" itemLabel="All" />
<f:selectItems value="#{bean.conditionalYears}" var="yearSelect" itemValue="#{yearSelect.value}" itemLabel="#{yearSelect.label}" />
</p:selectOneMenu>
</f:facet>
I had to remove everything from <f:facet name="filter" /> except the <p:selectOneMenu />
In my case, the <h:outputText /> (not limited to outputText) was causing ClassCastException in FilterFeature:277 that were swallowed by UIData.visitTree(VisitContext, VisitCallback) (doesn't have CATCH)
filterValue = ((ValueHolder) filterFacet).getLocalValue();
For some reason, filterFacet is an UIPanel, not a SelectOneMenu as expected.
So, the answer is:
If you are using <f:facet name="filter" />, then try removing everything from it except your custom filter field.

Primefaces wizard encodeStep NPE exception thrown

I have written a webdriver test for my page, which tests a primefaces wizard component and behavior. At one point, I get this error :
java.lang.NullPointerException
at org.primefaces.component.wizard.WizardRenderer.encodeStep(WizardRenderer.java:77)
at org.primefaces.component.wizard.WizardRenderer.encodeEnd(WizardRenderer.java:59)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:517)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1612)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIForm.visitTree(UIForm.java:362)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:378)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:298)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:982)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:411)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.meinanliegen.handlers.filters.NoCacheFilter.doFilter(NoCacheFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:148)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
My primefaces wizard looks like :
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<p:growl id="growl" autoUpdate="true" life="6000" showDetail="true" />
<h:form prependId="false" style="height : 100%" id="registrationFormWizardId">
<f:view beforePhase="#{userRegistrationWizard.afterPhase}">
</f:view>
<p:panel id="registrationFormWizardPanelGrid">
<p:panelGrid>
<p:row>
<p:column>
<p:wizard widgetVar="wiz" flowListener="#{userRegistrationWizard.onFlowProcess}"
step="#{userRegistrationWizard.step}" backLabel="Zurück" nextLabel="Weiter">
<p:tab id="idOne" title="TITLE1">
<ui:include src="/WEB-INF/templates/steps/registration_step1.xhtml"></ui:include>
</p:tab>
<p:tab id="idTwo" title="TITLE2">
<ui:include src="/WEB-INF/templates/steps/registration_step2.xhtml"></ui:include>
</p:tab>
<p:tab id="idThree" title="TITLE3">
<ui:include src="/WEB-INF/templates/steps/registration_step3.xhtml"></ui:include>
</p:tab>
</p:wizard>
</p:column>
</p:row>
</p:panelGrid>
</p:panel>
</h:form>
Does someone knows why this exception is being thrown?
UPDATE :
I use Primefaces 3.5 and MyFaces 2.1.17
According to Java code of WizardRenderer id of tab that should be rendered is not found in wizard. This is probably consequence if your test somehow went back on first page, or next on last page.

Exposing composite component attribute to children

I have the necessity to load some data in a dataTable using lazy loading. Unfortunatelly, primefaces dataTable only suports lazy loading with pagination, but this is unacceptable to this project, so I created and tested some mechanisms to permit lazy loading in datatable using scroll (primefaces's liveScroll isn't lazy loading). Now I need to move these mechanisms to a composite component, so I decided to wrap primefaces dataTable:
<ui:component xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsf/composite"
xmlns:p="http://primefaces.prime.com.tr/ui">
<c:interface>
<c:attribute name="var" required="true" targets="tabela"/>
<c:attribute name="value" required="true" targets="tabela" type="java.util.List"/>
<c:attribute name="scrollable" targets="tabela"/>
<c:attribute name="liveScroll" required="false" default="false"/>
<c:attribute name="height" targets="tabela"/>
<c:attribute name="emptyMessage" targets="tabela" default="Nenhuma dado a ser exibido"/>
<c:attribute name="rows" targets="tabela"/>
<c:attribute name="action" method-signature="void method()" required="false"/>
</c:interface>
<c:implementation>
<div id="#{cc.clientId}">
<p:dataTable id="tabela" var="#{cc.attrs.var}" value="#{cc.attrs.value}"
scrollable="#{scrollable}" height="#{cc.attrs.height}"
emptyMessage="#{cc.attrs.emptyMessage}" rows="10">
<c:insertChildren/>
</p:dataTable>
<p:remoteCommand name="comandoAtualizarTabela" action="#{cc.attrs.action}" update="tabela" process="#none"/>
<script type="text/javascript">
if ("#{cc.attrs.liveScroll}") {
var idEscapadoPainelLista = PrimeFaces.escapeClientId("#{cc.clientId}");
jQuery(idEscapadoPainelLista).find(".ui-datatable-scrollable-body").scroll(function () {
if ((this.scrollTop == this.scrollHeight - this.clientHeight))
comandoAtualizarTabela();
});
}
</script>
</div>
</c:implementation>
</ui:component>
When I try to use this component, no data is showed in the rows cause of this exception:
[#|2012-07-12T09:34:10.010-0300|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=21;_ThreadName=Thread-10;|org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null
at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getType(ContextAwareTagValueExpression.java:79)
at org.primefaces.component.inputtext.InputTextRenderer.getConvertedValue(InputTextRenderer.java:113)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:647)
at javax.faces.component.UIInput.validate(UIInput.java:583)
at javax.faces.component.UIInput.processValidators(UIInput.java:273)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1317)
at javax.faces.component.UIData.process(UIData.java:1919)
at javax.faces.component.UIData.processColumnChildren(UIData.java:1904)
at javax.faces.component.UIData.processValidators(UIData.java:1761)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1317)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1317)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIForm.processValidators(UIForm.java:209)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1324)
at javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1350)
at javax.faces.component.UIViewRoot.access$500(UIViewRoot.java:74)
at javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1443)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1306)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:793)
at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at fr.xebia.servlet.filter.ExpiresFilter.doFilter(ExpiresFilter.java:1243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.gr|#]
[#|2012-07-12T09:34:10.011-0300|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=21;_ThreadName=Thread-10;|izzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:131)
at com.sun.el.parser.AstValue.getType(AstValue.java:76)
at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:195)
at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getType(ContextAwareTagValueExpression.java:75)
... 90 more|#]
ADDED
The application uses spring version 3.0.7. Once the application have more than 20 spring xml files, I'm showing just part of one spring file... This part configures the dialog I'm testing with the composite component:
<bean id="controladorPopupCadastroUnidade" class="com.hrgi.web.cadastro.controladores.popups.ControladorPopupCadastroUnidade" scope="request">
<property name="controladorArmazenamento" ref="controladorArmazenamentoUnidade"/>
<property name="conversorValor" ref="conversorUnidade"/>
<property name="modelo" ref="modeloPopupCadastroUnidade"/>
<property name="popupAlerta" ref="controladorPopupAlerta"/>
<property name="recuperadorValores" ref="unidadeDao"/>
<property name="popupConfirmacao" ref="controladorPopupConfirmacao"/>
</bean>
<bean id="modeloPopupCadastroUnidade" class="com.hrgi.web.ui.modelos.ModeloPopupCRUD" scope="session">
<property name="visivel" value="false"/>
<property name="mensagemSucesso" value="${gerais.lista.sucesso}" />
</bean>
<bean id="controladorArmazenamentoUnidade" class="com.hrgi.persistencia.controladores.ControladorArmazenamento" scope="request">
<property name="armazenador" ref="unidadeDao"/>
<property name="atualizador" ref="unidadeDao"/>
<property name="removedor" ref="unidadeDao"/>
<property name="conversor" ref="conversorUnidade"/>
</bean>
to help you see the problem, here is the dataTable part of xhtml file I'm trying use teh cc:
<h:panelGroup id="painelLista" layout="block" styleClass="clearfix">
<hrgi:dataTable var="bean" value="#{modeloPopupCadastroUnidade.lista}"
scrollable="true" height="145"
action="#{controladorPopupCadastroUnidade.atualizarValores}"
liveScroll="true" rows="10">
<p:column headerText="Nome" style="width: 23%">
<hrgi:cellEditor>
<f:facet name="saida">
<h:outputText value="#{bean.descricao}"/>
</f:facet>
<f:facet name="entrada">
<p:inputText value="#{bean.descricao}" maxlength="35" style="width: 90%"/>
</f:facet>
</hrgi:cellEditor>
</p:column>
<p:column headerText="Sigla">
<hrgi:cellEditor>
<f:facet name="saida">
<h:outputText value="#{bean.sigla}"/>
</f:facet>
<f:facet name="entrada">
<p:inputText value="#{bean.sigla}" maxlength="5"/>
</f:facet>
</hrgi:cellEditor>
</p:column>
<p:column headerText="Fator" sortBy="#{bean.fator}">
<hrgi:cellEditor>
<f:facet name="saida">
<h:outputText value="#{bean.fator}"/>
</f:facet>
<f:facet name="entrada">
<hrgi:spinner value="#{bean.fator}" dinheiro="false" fator="1" local="pt-BR" width="40"/>
</f:facet>
</hrgi:cellEditor>
</p:column>
<p:column headerText="Fracionado" sortBy="#{bean.fracionado}">
<hrgi:cellEditor>
<f:facet name="saida">
<h:outputText value="#{bean.fracionado eq true?'Sim':'Não'}"/>
</f:facet>
<f:facet name="entrada">
<h:selectBooleanCheckbox value="#{bean.fracionado}"/>
</f:facet>
</hrgi:cellEditor>
</p:column>
<p:column headerText="Unitário" sortBy="#{bean.unitario}">
<hrgi:cellEditor>
<f:facet name="saida">
<h:outputText value="#{bean.unitario eq true?'Sim':'Não'}"/>
</f:facet>
<f:facet name="entrada">
<h:selectBooleanCheckbox value="#{bean.unitario}"/>
</f:facet>
</hrgi:cellEditor>
</p:column>
<p:column>
<hrgi:rowEditor action="#{controladorPopupCadastroUnidade.editarValor(bean)}" update="alerta" indice="#{bean.indice}"/>
<p:commandLink title="#{msgGerais['gerais.excluir']}" action="#{controladorPopupCadastroUnidade.removerValor(bean)}" update="painelLista alerta confirmacao" immediate="true">
<h:graphicImage library="img" name="remover.png"/>
</p:commandLink>
</p:column>
</hrgi:dataTable>
</h:panelGroup>
Probably the problem is that var property can't be used outside composite component... Is there a way I can expose this attribute externally? How can I solve it?

How to reRender specific row in richfaces 4

I am trying to reRender a specific row of a subtable within a datatable. I am using richfaces 4.2 final and jsf 2 running on JBoss AS 7.1 CR1b. From what I could find there are 2 ways to reRender a row, either use #rows() or table:row, but I couldn't get either working. I'm not sure if its even possible to do it with a subTable, or how to do it.
The id's of the cells in the generated source look like this: id="tableForm:timesheetTable:0:subTable:0:j_idt55"
Here is my table code:
<h:form id="tableForm" >
<rich:dataTable var="day" value="#{timesheetHome.days}" id="timesheetTable" rowKeyVar="rowKey">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText value="Ticket Nbr" />
</rich:column>
<rich:column>
<h:outputText value="Assigned By" />
</rich:column>
<rich:column style="width:60px;">
<h:outputText value="Status" />
</rich:column>
<rich:column>
<h:outputText value="Hours"/>
</rich:column>
<rich:column>
<h:outputText value="Description" />
</rich:column>
<rich:column>
<h:outputText value="Details"/>
</rich:column>
<rich:column>
<h:outputText value="Non-Billable"/>
</rich:column>
<rich:column>
</rich:column>
<rich:column>
</rich:column>
<rich:column>
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column colspan="10" style="background-color:#eee;">
<h:outputText value="#{day.name}"/>
</rich:column>
<rich:collapsibleSubTable var="item" value="#{day.items}" rowKeyVar="rowNum" id="subTable">
<rich:column>
<h:outputText value="#{item.ticketNumber}" />
</rich:column>
<rich:column>
<h:outputText value="#{item.reportTo}" />
</rich:column>
<rich:column>
<h:outputText value="#{item.status}"/>
</rich:column>
<rich:column>
<h:outputText value="#{item.hours}" />
</rich:column>
<rich:column>
<h:outputText value="#{item.task}" />
</rich:column>
<rich:column>
<h:outputText value="#{item.notes}" />
</rich:column>
<rich:column>
<h:selectBooleanCheckbox value="#{item.nonBillable}" disabled="true"/>
</rich:column>
<rich:column>
<a:outputPanel>
<h:graphicImage value="/resources/img/check.png" onclick="completed(#{item.id});"/>
<rich:tooltip showDelay="500" value="Change Status" layout="block" followMouse="false" />
</a:outputPanel>
</rich:column>
<rich:column>
<a:outputPanel>
<h:graphicImage value="/resources/img/edit.png" onclick="edit(#{item.id},#{rowKey},#{rowNum});"/>
<rich:tooltip showDelay="500" value="Edit" layout="block" followMouse="false" />
</a:outputPanel>
</rich:column>
<rich:column>
<a:outputPanel>
<h:graphicImage value="/resources/img/delete.png" onclick="remove(#{item.id});"/>
<rich:tooltip showDelay="500" value="Delete" layout="block" followMouse="false" />
</a:outputPanel>
</rich:column>
</rich:collapsibleSubTable>
<f:facet name="footer">
<rich:columnGroup>
<rich:column colspan="5">
<h:outputText value="Total hours: "/>
<h:outputText value="#{timesheetHome.weekHours}"/>
</rich:column>
<rich:column colspan="5">
<h:outputText value="Billable hours: "/>
<h:outputText value="#{timesheetHome.weekBillableHours}"/>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
</h:form>
and the button that is supposed to reRender the row:
<a:commandButton id="update"
value="Update"
action="#{timesheetHome.update}" rendered="#{timesheetHome.managed}" render="timesheetTable:#{timesheetHome.rowKey}:subTable:#{timesheetHome.rowNum} notify" oncomplete="if (!#{timesheetHome.error}){#{rich:component('popup')}.hide();}"/>
when the rowKey and rowNum are primitive type int, then nothing happens on the rerender. If i change them to type Integer in the backing bean, I get the following error:
WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http--0.0.0.0-8080-5) String index out of range: 0: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:695) [:1.7.0_02]
at org.richfaces.context.IdParser.parse(IdParser.java:120) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ComponentIdResolver.addIdImmediately(ComponentIdResolver.java:196) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ComponentIdResolver.addId(ComponentIdResolver.java:231) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.renderkit.util.CoreRendererUtils.findComponentsFor(CoreRendererUtils.java:137) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.RenderComponentCallback.doVisit(RenderComponentCallback.java:86) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ExecuteComponentCallback.doVisit(ExecuteComponentCallback.java:47) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ComponentCallback.visit(ComponentCallback.java:94) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321) [richfaces-core-impl-4.2.0.Final.jar:]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1589) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIForm.visitTree(UIForm.java:344) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorComponent(ExtendedPartialViewContextImpl.java:440) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtExecute(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ExtendedPartialViewContextImpl.getExecuteIds(ExtendedPartialViewContextImpl.java:98) [richfaces-core-impl-4.2.0.Final.jar:]
at org.richfaces.context.ExtendedPartialViewContextImpl.isExecuteAll(ExtendedPartialViewContextImpl.java:148) [richfaces-core-impl-4.2.0.Final.jar:]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.7.Final.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:]
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.7.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.7.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.7.Final.jar:]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.7.Final.jar:]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.7.Final.jar:]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033) [jbossweb-7.0.7.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_02]

Resources