You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anu Padki <an...@gmail.com> on 2005/10/21 20:57:39 UTC

ClassCastException: for HtmlCommandLink

I am trying the lazy load for tree2 and the code looks like this
<f:facet name="person1">
<h:panelGroup>
<h:commandLink action="#{t.toggleExpanded}" actionListener="#{
treeBacker.processAction}">
<t:graphicImage value="/images/yellow-folder-open.png"
rendered="#{t.nodeExpanded}" border="0" />
<t:graphicImage value="/images/yellow-folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0" />
<h:outputText value="#{node.description}" styleClass="nodeFolder"/>
</h:commandLink>
</h:panelGroup>
</f:facet>

I get the error stack as follows. Is there some wrong setting of the
extension filter or is there some wrong seq of the tags?
Please shed some light.
- anu

*exception*

javax.servlet.ServletException: java.lang.ClassCastException:
javax.faces.component.html.HtmlCommandLink
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
	org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)

*root cause*

javax.faces.el.EvaluationException: java.lang.ClassCastException:
javax.faces.component.html.HtmlCommandLink
	com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
	javax.faces.component.UICommand.broadcast(UICommand.java:305)
	org.apache.myfaces.custom.tree2.UITreeData.broadcast(UITreeData.java:129)
	javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
	com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
	com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:197
	org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)