incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias We├čendorf (JIRA) <adffaces-iss...@incubator.apache.org>
Subject [jira] Updated: (ADFFACES-280) NPE in TableUtils when a commandNvigationButton is clicked
Date Fri, 16 Mar 2007 08:15:10 GMT

     [ https://issues.apache.org/jira/browse/ADFFACES-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matthias We├čendorf updated ADFFACES-280:
----------------------------------------

        Fix Version/s: 1.0.0-incubating-core
    Affects Version/s: 1.0.0-incubating-core

> NPE in TableUtils when a commandNvigationButton is clicked
> ----------------------------------------------------------
>
>                 Key: ADFFACES-280
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-280
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.0-incubating-core
>         Environment: Trinidad m1 revision 471788, JBoss 4.0.5, Facelets 1.1.11, MyFaces
1.1.4, Seam 1.1.0 Beta1
>            Reporter: Alexei Novikov
>         Assigned To: Adam Winer
>             Fix For: 1.0.0-incubating-core
>
>
> The snipplet below causes an exception when any button in the table is clicked.
> <tr:form>       
> 		<tr:table var="row"
> 				value="#{books}" rows="5" summary="Available books">
> 				<tr:column width="200px">
> 					<f:facet name="header">
> 						<tr:outputText value="Author" />
> 					</f:facet>
> 					<tr:outputText value="#{row.author}" />
> 				</tr:column>
> 				<tr:column width="200px">
> 					<f:facet name="header">
> 						<tr:outputText value="Ttile" />
> 					</f:facet>
> 					<tr:outputText value="#{row.title}" />
> 				</tr:column>
>               <tr:column noWrap="true" width="150px">
>                 <f:facet name="header">
>                   <tr:outputText value="Actions"/>
>                 </f:facet>
>                 <tr:navigationPane hint="buttons">
>                 <tr:commandNavigationItem icon="/images/filesedit.gif" action="#{listBooks.edit}"
text="Edit"/>
>                 <tr:commandNavigationItem icon="/images/trashfull.gif" action="#{listBooks.delete}"
text="Delete"/>
>                 </tr:navigationPane>
>               </tr:column>
> 	</tr:table>
> </tr:form>
> java.lang.NullPointerException
> 	at org.apache.myfaces.context.servlet.AbstractAttributeMap.remove(AbstractAttributeMap.java:119)
> 	at org.apache.myfaces.trinidad.component.TableUtils.setupELVariable(TableUtils.java:95)
> 	at org.apache.myfaces.trinidad.component.UIXCollection._setELVar(UIXCollection.java:1134)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange(UIXCollection.java:674)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:389)
> 	at org.apache.myfaces.trinidad.component.HierarchyUtils.__setStartDepthPath(HierarchyUtils.java:199)
> 	at org.apache.myfaces.trinidad.component.UIXNavigationLevel.processFacetsAndChildren(UIXNavigationLevel.java:69)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.decodeChildrenImpl(UIXCollection.java:159)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:153)
> 	at org.apache.myfaces.trinidad.component.ChildLoop$Decode.process(ChildLoop.java:92)
> 	at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:53)
> 	at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:46)
> 	at org.apache.myfaces.trinidad.component.UIXColumn.processDecodes(UIXColumn.java:65)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.processComponent(UIXCollection.java:829)
> 	at org.apache.myfaces.trinidad.component.TableUtils$3.process(TableUtils.java:279)
> 	at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:53)
> 	at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:46)
> 	at org.apache.myfaces.trinidad.component.TableUtils.__processStampedChildren(TableUtils.java:274)
> 	at org.apache.myfaces.trinidad.component.UIXTable._processStamps(UIXTable.java:396)
> 	at org.apache.myfaces.trinidad.component.UIXTable.processFacetsAndChildren(UIXTable.java:268)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.decodeChildrenImpl(UIXCollection.java:159)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:153)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:60)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:725)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:725)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:725)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:725)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:889)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:874)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:725)
> 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:135)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(LifecycleImpl.java:219)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
> 	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
> 	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:96)
> 	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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
> 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
> 	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:869)
> 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> 	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)
> The exception occures when the "name" argument is null. To get rid of the problem, I
had to patch the code this way:
> public final class TableUtils 
> ...
>   public static Object setupELVariable(FacesContext context, String name, Object value)
>   {
>     Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
>     if (name == null)
>     	return null;
>     
>     if (value == null)
>       return requestMap.remove(name);
>     else
>       return requestMap.put(name, value);
>   }
>  It seems to work with this patch thogh I have no idea what side-effects it can arise.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message