You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by dushyant agarwal <ag...@yahoo.co.in> on 2008/07/17 10:11:00 UTC

[TRINIDAD]ClassCastException:org.apache.myfaces.trinidad.component.CoreoOutputText

Hi,
I have a JSF page in which there is a tree-table.In the JSF I have put the nodestamp and pathstamp facets with a column in nodestamp and a outputText inside the column as well as inside pathstamp.
Now in the backing bean I create columns of the Tree Table dynamically with information available from a EJB.The columns have inputtexts as children.
 
I have a functionality where a user can delete a column. For deleting the columns I have first deleted all the columns from the tree table's getChildren() list. Then I call a method of the EJB and recreate the columns with inputTexts as their children.I also add a tr:commandLink to each column.But I have checked that it would not be the cause of exception.
 
This time during the time of rendering I get a ClassCastException:CoreOutputtext.
The server's stack trace does not indicate error on any line of the backing bean.
So it is hard to debug the code.
 
If I do not add the inputText as the children of the column then this exception does not come.So i guess that the view root is holding back some older definition of the page and when I recreate the table it causes the execption.
But even in the older definition the column contains inputText as child.Outputtext is added to the column only when I am adding the commandLink to the column(for the text part).
 
What could be the reason for this ? Any solutions?
 


      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Re: [TRINIDAD]ClassCastException:org.apache.myfaces.trinidad.component.CoreoOutputText

Posted by Bandaru <rb...@gmail.com>.
Hi,
   I faced such type of issue when in backing Bean while type casting with
different objects.
  ie, when we type cast outputText object with CoreInputText class this type
of issue will rise.
  This is one reason where such type of issues will rise.If this is not the
case past some sample code.

-Bandaru
   

dushyant agarwal wrote:
> 
> Hi,
> I have a JSF page in which there is a tree-table.In the JSF I have put the
> nodestamp and pathstamp facets with a column in nodestamp and a outputText
> inside the column as well as inside pathstamp.
> Now in the backing bean I create columns of the Tree Table dynamically
> with information available from a EJB.The columns have inputtexts as
> children.
>  
> I have a functionality where a user can delete a column. For deleting the
> columns I have first deleted all the columns from the tree table's
> getChildren() list. Then I call a method of the EJB and recreate the
> columns with inputTexts as their children.I also add a tr:commandLink to
> each column.But I have checked that it would not be the cause of
> exception.
>  
> This time during the time of rendering I get a
> ClassCastException:CoreOutputtext.
> The server's stack trace does not indicate error on any line of the
> backing bean.
> So it is hard to debug the code.
>  
> If I do not add the inputText as the children of the column then this
> exception does not come.So i guess that the view root is holding back some
> older definition of the page and when I recreate the table it causes the
> execption.
> But even in the older definition the column contains inputText as
> child.Outputtext is added to the column only when I am adding the
> commandLink to the column(for the text part).
>  
> What could be the reason for this ? Any solutions?
>  
> 
> 
>       Unlimited freedom, unlimited storage. Get it now, on
> http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD-ClassCastException%3Aorg.apache.myfaces.trinidad.component.CoreoOutputText-tp18503670p18522954.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.