Rob,

I now realise that my ClassCastException was due to using;

import org.apache.myfaces.custom.tree.HtmlTree;

not

import org.apache.myfaces.custom.tree2.HtmlTree;

You did mean HtmlTree (not HTMLTree).

When I run you example I just get a continuous loop, as it appears not to be finding an instance of HtmlTree.

Have I misunderstood something?

Thanks,

Roger Lee


Internet communications are not secure and therefore NOTiFY does not accept legal responsibility for the contents of this message. Although NOTiFY operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of NOTiFY. Replies to this email may be monitored by NOTiFY for operational or business reasons.


----- Original Message ----- From: "Rob Decker" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <[email protected]>; "Roger Lee, NOTiFY" <[EMAIL PROTECTED]>
Sent: Tuesday, March 29, 2005 12:38 AM
Subject: Re: Getting Description from tree Node



UIComponent parent = null;
while (!(parent instanceof HTMLTree))
   parent = component.getParent();

HtmlTree tree = (HtmlTree)parent;


----- Original Message ----- From: "Roger Lee, NOTiFY" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <[email protected]>
Sent: Monday, March 28, 2005 5:07 PM
Subject: Getting Description from tree Node




I have an ActionListener on a x:commandLink on a Document in a tree2. In
the
backing class I have;

  public void selectLoan(ActionEvent actionEvent) throws
AbortProcessingException {
        UIComponent component = actionEvent.getComponent();

        HtmlTree tree = (HtmlTree) component.getParent().getParent;
 }

But I get a ClassCastException.

What is the correct way to get the description from the Tree2 node.

Thanks,

Roger Lee


Internet communications are not secure and therefore NOTiFY does not accept legal responsibility for the contents of this message. Although NOTiFY operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of NOTiFY. Replies to this email may be monitored by NOTiFY for operational or business reasons.








Reply via email to