webtier@glassfish.java.net

Re: [webtier] Re: JSF 2.0 composite components with method-valued attributes

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 18 Feb 2009 14:58:08 -0800

webtier_at_javadesktop.org wrote:
> Actually, I failed to figure out how to report an issue via that issue tracker.
> Sorry I ran out of time for today.
> One thing: I narrowed the problem down easily:
>
> add a following wrapper component to the nav example:
>
> basic-ezcomp/resources/navbutton/wrapper.xhtml
>
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:c="http://java.sun.com/jsp/jstl/core"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:composite="http://java.sun.com/jsf/composite"
> xmlns:gc="http://java.sun.com/jsf/composite/components"
> xmlns:g="/GteeTagLibrary">
>
> <body>
> <composite:interface name="wrapper">
> </composite:interface>
> <composite:implementation>
> above
> <composite:renderUsingPageChildren/>
> below
> </composite:implementation>
>
> </body>
> </html>
>
>
> then use it in the /basic-ezcomp/nav1.xhtml this way:
> <h1> Page 1</h1>
> <ez:wrapper>
> <ez:nav act="#{navigation.goNav2}"/>
> </ez:wrapper>
>
> you'll get the mentioned exception (see below)
>
> Now if you do the following:
>
> <h1> Page 1</h1>
> <ez:nav act="#{navigation.goNav2}"/>
> <ez:wrapper>
> <ez:nav act="#{navigation.goNav2}"/>
> </ez:wrapper>
>
> the problem disappears!
>
> the stacktrace:
>
> javax.faces.el.MethodNotFoundException: java.lang.NullPointerException
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:104)
> at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
> at javax.faces.component.UICommand.broadcast(UICommand.java:387)
> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:764)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1185)
> at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:102)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> Caused by: java.lang.NullPointerException
> at com.sun.faces.facelets.tag.TagAttributeImpl$AttributeLookupMethodExpression.invoke(TagAttributeImpl.java:263)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
> ... 35 more
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
Thanks for the info. I've fixed the issue and pushed new 'nightly' bits
to the site for further feedback.

-rl
> http://forums.java.net/jive/thread.jspa?messageID=332740
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>