You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2005/08/15 19:37:35 UTC

Fwd: Help needed for tree2 component.

Please send messages to users list instead of directly to component authors.
 sean

---------- Forwarded message ----------
From: Kolhe, Pallavi (Cognizant) <Pa...@cognizant.com>
Date: Aug 15, 2005 4:49 AM
Subject: Help needed for tree2 component.
To: sean.schofield@gmail.com

 Hi,

 When a use clicks the "expand" icon in a serverside Tree2 component(i'm 
using myfaces implementation classes), I
would like my application to go out and grab more data from the database
to fill in the details of that node's children. Also for some reason i need 
the path information of the node clicked .....

 So following thing I added in my actionListener class :

 *public* *void* processAction(ActionEvent event) *throws*

AbortProcessingException {

UIComponent component = event.getComponent();

HtmlTree parentComponent =(HtmlTree) component.getParent()

varNodeId = parentComponent.getNode().getIdentifier();

varPathInfo = parentComponent.getPathInformation(nodeId);

}

}

The varNodeId , i'm setting while creating TreeNodeBase instance e.g:

TreeNode personNode = *new* TreeNodeBase("person", childNode.getName(),
"IdentifierChild", *true*);

personNode.getChildren().add(*new* TreeNodeBase("person ", "X050001", 
"IdentifierGrandChild1",*true*));

personNode.getChildren().add(*new* TreeNodeBase("person", "X050002",
"IdentifierGrandChild2" ,*true*));

but the varPathInfo value returned is not correct and is holding the same 
value of varNodeId .

I'm in need of the varPathInfo .

Can U please figure out to u'r earliest why this is happening ??

I'm using tree2 package of myfaces .

Also the varNodeId is returning the correct value which I have setted while 
crteating the TreeNodeBase instance.

I have also declared varPathInfo as an array of Strings. But the 
getPathInformation() method is not returning me the correct value. It always 
returns length as 1 if I do varPathInfo.length with its value as the same as 
the varNodeId.

 Is there any other way to get the path information ??

 Thanx and regards.

Pallavi.

  This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged 
information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, 
printing or copying of this email or any action taken in reliance on this 
e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com