Actually it should be

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


----- Original Message ----- 
From: "Rob Decker" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <[email protected]>; "Roger Lee,
NOTiFY" <[EMAIL PROTECTED]>
Sent: Monday, March 28, 2005 6:38 PM
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