I never logged it as a bug in jira and I don't think Jon did either. You might want to at least log the verbatim bug in jira since your code is fairly simple example that shows it clearly.
-- Rob @objectsource.org ---------- Original Message ----------- From: Sean Radford <[EMAIL PROTECTED]> To: MyFaces Discussion <[email protected]> Sent: Fri, 06 May 2005 17:28:33 +0100 Subject: Re: ClassCastException with f:verbatim > Ok, looks like my problem is related to this one: > > http://www.mail-archive.com/[email protected]/msg03517.html > > (and if I remove my verbatim tags I get the duplicate ID problem instead) > > I presume there has been no progress on this issue as yet? > > Regards, > > Sean > > Sean Radford wrote: > > > Hi, > > > > I'm getting an odd intermittent problem with the f:verbatim tag: > > > > 005-05-06 13:04:27,511 ERROR [org.jboss.web.localhost.Engine] ----- > > Root Cause ----- > > java.lang.ClassCastException > > at > > org.apache.myfaces.taglib.core.VerbatimTag.doAfterBody(VerbatimTag.java:76) > > > > at > > org.apache.jsp.project.projectPage_jsp._jspx_meth_f_verbatim_1 (projectPage_jsp.java:741) > > > > at > > org.apache.jsp.project.projectPage_jsp._jspx_meth_h_panelGroup_2 (projectPage_jsp.java:632) > > > > at > > org.apache.jsp.project.projectPage_jsp._jspx_meth_h_panelGrid_2 (projectPage_jsp.java:592) > > > > at > > org.apache.jsp.project.projectPage_jsp._jspx_meth_f_view_0 (projectPage_jsp.java:198) > > > > at > > org.apache.jsp.project.projectPage_jsp._jspService(projectPage_jsp.java:103) > > > > > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > > > > In my case the VerbatimTag contains > > > > public int doAfterBody() throws JspException { > > BodyContent bodyContent = getBodyContent(); > > if (bodyContent != null) { > > UIOutput component = (UIOutput)getComponentInstance(); > > component.setValue(bodyContent.getString()); > > } > > return super.doAfterBody(); > > } > > > > The offending line is: > > > > UIOutput component = (UIOutput)getComponentInstance(); > > > > where the getComponentInstance() is returning an HTMLCommandLink (and > > it is expecting UIOutput) > > > > A snippet of the offending JSP is: > > > > <f:view> > > ... > > <h:panelGrid columns="1" styleClass="rightAlignedTable" > > style="width:100%"> > > <h:panelGroup> > > <h:commandLink action="#{ProjectController.editProject}" > > styleClass="button"> > > <h:commandButton value="Edit Project" styleClass="buttonMedium"/> > > <f:param name="projectUuid" > > value="#{ProjectController.project.uuid}" /> > > </h:commandLink> > > <f:verbatim> </f:verbatim> > > <h:commandLink action="#{ProjectController.manageProject}" > > styleClass="button"> > > <h:commandButton value="Manage Project" > > styleClass="buttonMedium" disabled="true"/> > > </h:commandLink> > > <f:verbatim> </f:verbatim> > > <h:commandLink action="#{ProjectController.closeProject}" > > styleClass="button"> > > <h:commandButton value="Close Project" styleClass="buttonMedium"/> > > </h:commandLink> > > </h:panelGroup> > > </h:panelGrid> > > </f:view> > > > > (I know it is 'odd' to have commandButtons within commandLinks) > > > > Any ideas? Is there a better way to render non-breaking spaces? > > > > Thanks, > > > > Sean > > > > (I'm using the latest source from svn) > > > > -- > Dr. Sean Radford, MBBS, MSc > [EMAIL PROTECTED] > http://bladesys.demon.co.uk/ ------- End of Original Message -------

