myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Broekelmann (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-586) NPE in UIData.restoreDescendantComponentStates()
Date Tue, 20 Sep 2005 08:16:30 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-586?page=comments#action_12329973 ] 

Mathias Broekelmann commented on MYFACES-586:
---------------------------------------------

I wasn´t able to reproduce the problem.
I think the problem is somthing else. 
Can you post the whole jsp source of your datatable?

> NPE in UIData.restoreDescendantComponentStates()
> ------------------------------------------------
>
>          Key: MYFACES-586
>          URL: http://issues.apache.org/jira/browse/MYFACES-586
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: 1.1.0
>  Environment: w2k, jboss-4.0.2, tomcat55
>     Reporter: Pavel Stetsuk
>     Assignee: Mathias Broekelmann

>
> Error like MYFACES-520
> I have JSP like:
> <f:view>
> ...
>   <h:form id="form-edit">
>   ...
>     <h:dataTable id="grid"
>                  value="#{nagrevBean.nagrevDTOs}" var="nagrevDTO"
>                  >
>       <h:column id="flagSaveColumn" rendered="#{!authenticationBean.guestAuthorized}">
>         <f:facet name="header">
>           <h:outputText id="flagSaveColumnHeader" value="+"  />
>         </f:facet>
>         <h:selectBooleanCheckbox id="flagSaveInput" value="#{nagrevDTO.flagSave}"
rendered="#{nagrevDTO.canSave}" />
>       </h:column>
>       ....
>     </h:dataTable>
>   </h:form>
> </f:view>
> When a value is entered in the required inputText field, the form submits successfully.
But in RENDER_RESPONSE phase i have error
> java.lang.NullPointerException
> 	at javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
> 	at javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
> 	at javax.faces.component.UIData.setRowIndex(UIData.java:186)
> 	at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:135)
> 	at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
> 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
> 	at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:343)
> 	at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:251)
> 	at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
> 	at org.apache.jsp.nagrev_jsp._jspx_meth_h_dataTable_0(org.apache.jsp.nagrev_jsp:1672)
> 	at org.apache.jsp.nagrev_jsp._jspService(org.apache.jsp.nagrev_jsp:286)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
> 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
> 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> 	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
> 	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at com.azovstal.asctp.web.HibernateFilter.doFilter(HibernateFilter.java:35)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
> 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
> 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
> 	at java.lang.Thread.run(Thread.java:595)
> ...
> javax.faces.FacesException: org.apache.jasper.JasperException
> 	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
> 	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
> ...
> Function 
>     private void restoreDescendantComponentStates(Iterator childIterator,
>             Object state, boolean restoreChildFacets)
> calling with state == null
> The following change to UIData seems to fix the problem: 
> ... 
>             if (descendantStateIterator != null 
>                     && descendantStateIterator.hasNext()) 
>             { 
>              System.out.println("has dsi"); 
>                 Object[] object = (Object[]) descendantStateIterator.next(); 
>                 childState = object[0]; 
>                 descendantState = object[1]; 
>                 if (component instanceof EditableValueHolder) 
>                 { 
>                     ((EditableValueHolderState) childState) 
>                             .restoreState((EditableValueHolder) component); 
>                 } 
>             } 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message