Skip to main content

JSF 2.0 composite components with method-valued attributes

64 replies [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ryan Lubke

webtier@javadesktop.org wrote:
> It seems that it still does not work if I wrap it with a simple composite component which contains
> renderUsingPageChildren...
>
> I got something like
>
> javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /resources/components/adjustableColumnHeader.xhtml @35,177 action="#{compositeComponent.attrs.tablebean.hideByCheckboxes}": Target Unreachable, 'tablebean' returned null
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:95)
> 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: javax.el.PropertyNotFoundException: /resources/components/adjustableColumnHeader.xhtml @35,177 action="#{compositeComponent.attrs.tablebean.hideByCheckboxes}": Target Unreachable, 'tablebean' returned null
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:107)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
> ... 35 more
>
>
> But probably only a short usecase would help here..
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332734
>
Could you please log bugs [1] for the issues you're finding. This way
things don't slip through
the cracks.

[1] https://javaserverfaces.dev.java.net/issues
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

nzinoviev
Offline
Joined: 2008-06-11

I wonder if it's okay that String doesn't work when opposed to java.lang.String..

Finally I managed to get this running in my program, even for a controller case!

But I ran into the following crazy issue :

I am using a facelet-component with the same attribute name right above the composite component (seems to be some name clash):


unless I comment those lines out the following
does not work



I get:
#{compositeComponent.attrs.act}: java.lang.NullPointerException
javax.faces.FacesException: #{compositeComponent.attrs.act}: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:110)
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: 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)
... 34 more
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

nzinoviev
Offline
Joined: 2008-06-11

For the facelets-component issue - changing the name of the attribute didn't help.
May be the problem is that it refers to the same expression..

nzinoviev
Offline
Joined: 2008-06-11

I tried the Nightly build, but I still get an exception, well, read along :) :

I noticed that there is a nav sample and changed it to




(renamed action to act as action has special treatment)

here is the stacktrace:

java.lang.ClassCastException: com.sun.faces.facelets.el.TagValueExpression cannot be cast to javax.el.MethodExpression
at com.sun.faces.facelets.tag.TagAttributeImpl$AttributeLookupMethodExpression.invoke(TagAttributeImpl.java:262)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
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)

I also see

Unable to determine expected return type for String f1()
java.lang.ClassNotFoundException: String
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576)
at com.sun.faces.util.Util.loadClass(Util.java:203)
at com.sun.faces.util.Util.getTypeFromString(Util.java:302)
at com.sun.faces.application.view.MultiViewHandler.retargetMethodExpressions(MultiViewHandler.java:402)
at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:162)
at com.sun.faces.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:192)
at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
at com.sun.faces.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:361)
at com.sun.faces.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:192)
at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:101)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:182)
at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:376)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:347)
at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:106)
at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:80)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:285)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:331)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:310)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:181)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:159)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:80)
at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:132)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:462)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.createView(FaceletViewHandlingStrategy.java:288)
at com.sun.faces.application.view.MultiViewHandler.createView(MultiViewHandler.java:477)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:201)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:102)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:106)
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)

Actually I ran into this last week so I changed String to java.lang.String,
now I get
javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: Method not found: ezcomp.NavigationHandler@508e9.goNav2(void)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:92)
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)

I changed (void) to () and it started working!
So now I have

Great job!

Ryan Lubke

Thanks for this feedback. We'll be sure to improve the error reporting
here.

webtier@javadesktop.org wrote:
> I tried the Nightly build, but I still get an exception, well, read along :) :
>
> I noticed that there is a nav sample and changed it to
>
>
>

>
>
>
>

>
> (renamed action to act as action has special treatment)
>
> here is the stacktrace:
>
> java.lang.ClassCastException: com.sun.faces.facelets.el.TagValueExpression cannot be cast to javax.el.MethodExpression
> at com.sun.faces.facelets.tag.TagAttributeImpl$AttributeLookupMethodExpression.invoke(TagAttributeImpl.java:262)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
> 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)
>
>
> I also see
>
> Unable to determine expected return type for String f1()
> java.lang.ClassNotFoundException: String
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1576)
> at com.sun.faces.util.Util.loadClass(Util.java:203)
> at com.sun.faces.util.Util.getTypeFromString(Util.java:302)
> at com.sun.faces.application.view.MultiViewHandler.retargetMethodExpressions(MultiViewHandler.java:402)
> at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:162)
> at com.sun.faces.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:192)
> at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
> at com.sun.faces.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:361)
> at com.sun.faces.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:192)
> at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
> at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:101)
> at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:182)
> at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:376)
> at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:347)
> at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:106)
> at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
> at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
> at com.sun.faces.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:84)
> at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:80)
> at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:285)
> at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:331)
> at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:310)
> at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:181)
> at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:159)
> at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
> at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:80)
> at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:132)
> at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:462)
> at com.sun.faces.application.view.FaceletViewHandlingStrategy.createView(FaceletViewHandlingStrategy.java:288)
> at com.sun.faces.application.view.MultiViewHandler.createView(MultiViewHandler.java:477)
> at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:201)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:102)
> at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:106)
> 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)
>
> Actually I ran into this last week so I changed String to java.lang.String,
> now I get
> javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: Method not found: ezcomp.NavigationHandler@508e9.goNav2(void)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:92)
> 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)
>
> I changed (void) to () and it started working!
> So now I have
>
>
> Great job!
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332717
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

nzinoviev
Offline
Joined: 2008-06-11

It looks like there's still no nightly (it's still Feb 04)

https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folder...

I'm puzzled because there is one for JSF 1.2.

Ryan Lubke

webtier@javadesktop.org wrote:
> It looks like there's still no nightly (it's still Feb 04)
>
> https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folder...
>
> I'm puzzled because there is one for JSF 1.2.
>
It's being looked into.
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332640
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

rlubke
Offline
Joined: 2003-08-21

>
> StandardWrapperValve[FacesServlet]: PWC1406:
> Servlet.service() for servlet Faces Servlet threw
> exception java.lang.IllegalStateException:
> java.lang.IllegalAccessException:
> Class javax.faces.component.StateHolderSaver can not
> access a member of
> class
> com.sun.faces.facelets.tag.TagAttributeImpl$AttributeL
> ookupMethodExpression
> with modifiers "public"
>
> at
> javax.faces.component.StateHolderSaver.restore(StateHo
> lderSaver.java:112)
> at
> javax.faces.component.UIComponentBase.restoreAttachedS
> tate(UIComponentBase.java:1488)
> at
> javax.faces.component.UICommand.restoreState(UICommand
> .java:340)
> at

For what it's worth, I saw this stacktrace working on an issue today and fixed it.
Might give tonight's nightly build a shot.

Jim Driscoll

Well, when I did the following blog,
http://weblogs.java.net/blog/driscoll/archive/2008/12/jsf_20_wiring_u_1....

I had two attribute methods that weren't named "action" - they were
named move1to2 and such.

I haven't pored over the rest of your email, yet, but will when I have a
minute.

Jim

On 2/11/09 3:04 PM, webtier@javadesktop.org wrote:
> Hello,
>
> I wonder if method-expression passing through a composite component attribute is supposed to work. I just want be able to specify an "action" method which would be passed to a command button. Unfortunately, the code works only if the attribute has the name "action". And I wanted to get this method from a controller. Here's a code sample:
>
>
>
>
> > 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">
>
>
>
>
>

>
> >
>
> > action="#{compositeComponent.attrs.action}"/>
>

>

>
>
>
> it is used later like:
>
>
>
>
>
>
>
>
>

>
>

> > value="#{compositeComponent.attrs.tablebean.checkboxes[compositeComponent.attrs.header]}"/>
>
>

>
>
> and of course then I cannot choose the name of the attribute.
>
> Also it's a bit strange Jim's controller example uses only attribute-properties and
> no attribute-methods. I guess turning switchlist example into a controller based one,
> as Ed originally suggested, would be a lot of clue here.
>
> Thanks a lot in advance!
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=331385
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Lincoln Baxter, III

I've experienced a similar issue when attemting to pass a validator=""
through a composite component.

(possibly got the wrong exception names here, I don't have a
working-broken example in front of me. har har)

JSF will throw a ClassCastException and complain that it was expecting
an ElFieldExpression but got an ElMethodExpression , even if I specify
the method-signature="" attribute in my composite:interface. I want to
pass-through a validator method of the form #{myBean.validatorMethod},
but haven't been able to find a way to do this. Been having lots of
qwerky issues like this actually. ActionListeners you know I'm already
having some issues with, still haven't figured that one out, wish I
could provide more details.

--Lincoln

On Wed, 2009-02-11 at 15:21 -0800, Jim Driscoll wrote:

> Well, when I did the following blog,
> http://weblogs.java.net/blog/driscoll/archive/2008/12/jsf_20_wiring_u_1....
>
> I had two attribute methods that weren't named "action" - they were
> named move1to2 and such.
>
> I haven't pored over the rest of your email, yet, but will when I have a
> minute.
>
> Jim
>
> On 2/11/09 3:04 PM, webtier@javadesktop.org wrote:
> > Hello,
> >
> > I wonder if method-expression passing through a composite component attribute is supposed to work. I just want be able to specify an "action" method which would be passed to a command button. Unfortunately, the code works only if the attribute has the name "action". And I wanted to get this method from a controller. Here's a code sample:
> >
> >
> >
> >
> > > > 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">
> >
> >
> >
> >
> >

> >
> > > >
> >
> > > > action="#{compositeComponent.attrs.action}"/>
> >

> >

> >
> >
> >
> > it is used later like:
> >
> >
> >
> >
> >
> >
> >
> >
> >

> >
> >

> > > > value="#{compositeComponent.attrs.tablebean.checkboxes[compositeComponent.attrs.header]}"/>
> >
> >

> >
> >
> > and of course then I cannot choose the name of the attribute.
> >
> > Also it's a bit strange Jim's controller example uses only attribute-properties and
> > no attribute-methods. I guess turning switchlist example into a controller based one,
> > as Ed originally suggested, would be a lot of clue here.
> >
> > Thanks a lot in advance!
> > [Message sent by forum member 'nzinoviev' (nzinoviev)]
> >
> > http://forums.java.net/jive/thread.jspa?messageID=331385
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> > For additional commands, e-mail: webtier-help@glassfish.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
[att1.html]

Jim Driscoll

"look into Lincoln's bug" has been on my todo list all week.

Sounds like I should make time to actually give it a closer look tomorrow.

Can either of you give me a *short* composite component example that
should work, but doesn't? That'd help a lot. Just something with all
the parts that aren't necessary to reproduce the bug stripped away.

Jim

On 2/11/09 8:10 PM, Lincoln Baxter, III wrote:
> I've experienced a similar issue when attemting to pass a validator=""
> through a composite component.
>
> (possibly got the wrong exception names here, I don't have a
> working-broken example in front of me. har har)
>
> JSF will throw a ClassCastException and complain that it was expecting
> an ElFieldExpression but got an ElMethodExpression , even if I specify
> the method-signature="" attribute in my composite:interface. I want to
> pass-through a validator method of the form #{myBean.validatorMethod},
> but haven't been able to find a way to do this. Been having lots of
> qwerky issues like this actually. ActionListeners you know I'm already
> having some issues with, still haven't figured that one out, wish I
> could provide more details.
>
> --Lincoln
>
> On Wed, 2009-02-11 at 15:21 -0800, Jim Driscoll wrote:
>> Well, when I did the following blog,
>> http://weblogs.java.net/blog/driscoll/archive/2008/12/jsf_20_wiring_u_1....
>>
>> I had two attribute methods that weren't named"action" - they were
>> named move1to2 and such.
>>
>> I haven't pored over the rest of your email, yet, but will when I have a
>> minute.
>>
>> Jim
>>
>> On 2/11/09 3:04 PM,webtier@javadesktop.org wrote:
>> > Hello,
>> >
>> > I wonder if method-expression passing through a composite component attribute is supposed to work. I just want be able to specify an"action" method which would be passed to a command button. Unfortunately, the code works only if the attribute has the name"action". And I wanted to get this method from a controller. Here's a code sample:
>> >
>> >
>> >
>> >
>> > >> > 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">
>> >
>> >
>> >
>> >
>> >

>> >
>> > >> >
>> >
>> > >> > action="#{compositeComponent.attrs.action}"/>
>> >

>> >

>> >
>> >
>> >
>> > it is used later like:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >

>> >
>> >

>> > >> > value="#{compositeComponent.attrs.tablebean.checkboxes[compositeComponent.attrs.header]}"/>
>> >
>> >

>> >
>> >
>> > and of course then I cannot choose the name of the attribute.
>> >
>> > Also it's a bit strange Jim's controller example uses only attribute-properties and
>> > no attribute-methods. I guess turning switchlist example into a controller based one,
>> > as Ed originally suggested, would be a lot of clue here.
>> >
>> > Thanks a lot in advance!
>> > [Message sent by forum member 'nzinoviev' (nzinoviev)]
>> >
>> > http://forums.java.net/jive/thread.jspa?messageID=331385
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:webtier-unsubscribe@glassfish.dev.java.net
>> > For additional commands, e-mail:webtier-help@glassfish.dev.java.net
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:webtier-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail:webtier-help@glassfish.dev.java.net
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

nzinoviev
Offline
Joined: 2008-06-11

Interesting: in the switchlist example Jim sets actionListener (not action) attribute on the h:commandButton.

nzinoviev
Offline
Joined: 2008-06-11

Very strange: I noticed your Feb 11 only today.
I think I also ran into problems while passing compositeComponent.attrs.method
to another compositeComponent.

Jim Driscoll

Ooo - nested composite components - I don't think we've tested that yet.

I'll add a task for us to test that.

Jim

On 2/17/09 12:43 PM, webtier@javadesktop.org wrote:
> Very strange: I noticed your Feb 11 only today.
> I think I also ran into problems while passing compositeComponent.attrs.method
> to another compositeComponent.
> [Message sent by forum member 'nzinoviev' (nzinoviev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332481
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net