Is there a JIRA issue for this ? If not, please add one :)
Thanks, Grant
Sean Radford wrote:
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)

