Event on a treenode
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
Event on a treenode  XML
Forum Index -> Components
Author Message
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


I have a problem with the event on a treenode.

On my ".jspx" file, I'm using the following code:
Code:
 ...
 <ice:tree id="applicationTree" value="#{bean.treeModel}" var="item" hideRootNode="false" hideNavigation="false" imageDir="/images/">
 <ice:treeNode id="treenode">
 <f:facet name="content">
   <ice:panelGroup style="display: inline">
     <ice:panelGroup style="display: inline">
       <ice:commandLink actionListener="#{bean.treeNodeClick}" value="#{item.userObject.text}" />
 
       </ice:panelGroup>
     </ice:panelGroup>
 </f:facet>
 </ice:treeNode>
 </ice:tree>
 
 ...
 


And in my bean:

Code:
 ...
 public void treeNodeClick(ActionEvent event) {
 		
 		HtmlCommandLink html = (HtmlCommandLink) event.getSource();
 		TreeNode treeNode = (TreeNode)html.getParent().getParent().getParent();
 		
 ...
 		
 		
 }


My problem is that the first time I click on one treenode of the tree I get it.
But the next times I always get the last treenode of the tree ???

I don't understand why...

Do you have any ideas ?
Thanks

regards,
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
Baleyba

Joined: 16/11/2006 00:00:00
Messages: 110
Offline


Any ideas ?

thx,

Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team