You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by fe...@dbs.es on 2006/07/13 11:36:28 UTC
ClassCastException JBOSS con t:dataTable
Hi,
I'm a problem with jsf and jboss. You are these code with a dataTable de
tomahawk (project apache)
<t:dataTable renderedIfEmpty="false" value="#{managedBean[data].list}"
id="#{id}"
rows="#{rows}" var="rowData"
binding="#{ManagerBean.object}"
styleClass="results" rowClasses="odd, even"
columnClasses="#{columnClasses}"
headerClass="header" cellpadding="0" cellspacing="0" rules="cols"
frame="vsides">
<ui:insert />
</t:dataTable>
My ManagerBean.object is a Object class. The class code:
public String editEmployee() {
try {
System.err.println("object.getClass().getName():
"+object.getClass().getName());
System.err.println("object.getClass().getName() 2" + (
(org.apache.myfaces.component.html.ext.HtmlDataTable )object
).toString());
...
The result is:
object.getClass().getName():
org.apache.myfaces.component.html.ext.HtmlDataTable
Launch ClassCastException in line
"System.err.println("object.getClass().getName() 2" + (
(org.apache.myfaces.component.html.ext.HtmlDataTable )object
).toString());".
Can you help me?
Thank you very much.
Como mi ingles es penoso lo traduzco a Español.
Hola,
Yo tengo un problema con Eclipse y JBoss. Yo tengo este código con una
tabla de tomahawk (proyecto apache)
<t:dataTable renderedIfEmpty="false" value="#{managedBean[data].list}"
id="#{id}"
rows="#{rows}" var="rowData"
binding="#{ManagerBean.object}"
styleClass="results" rowClasses="odd, even"
columnClasses="#{columnClasses}"
headerClass="header" cellpadding="0" cellspacing="0" rules="cols"
frame="vsides">
<ui:insert />
</t:dataTable>
Mi ManagerBean.object es de tipo Object. El codigo de la fuente es:
public String editEmployee() {
try {
System.err.println("object.getClass().getName():
"+object.getClass().getName());
System.err.println("object.getClass().getName() 2" + (
(org.apache.myfaces.component.html.ext.HtmlDataTable )object
).toString());
...
El resultado:
object.getClass().getName():
org.apache.myfaces.component.html.ext.HtmlDataTable
Lanza una ClassCastException en la linea
"System.err.println("object.getClass().getName() 2" + (
(org.apache.myfaces.component.html.ext.HtmlDataTable )object
).toString());".
¿Puedes ayurdame?
Muchas gracias
Re: ClassCastException JBOSS con t:dataTable
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> The result is:
> object.getClass().getName():
> org.apache.myfaces.component.html.ext.HtmlDataTable
>
> Launch ClassCastException in line
> "System.err.println("object.getClass().getName() 2" + (
> (org.apache.myfaces.component.html.ext.HtmlDataTable )object
> ).toString());".
>
Looks like a class loader issue.
Please search the archives, I think you have to delete the old JSF stuff
from jboss ... but I am not sure about this.
However, do not use the concrete class if not really required. Instead
in case of dataTable use UIData in your bean.
Ciao,
Mario