voyent
CommnadLink problems inside TreeNodes  XML
Forum Index -> Components
Author Message
Marioko

Joined: 14/Nov/2006 00:00:00
Messages: 125
Offline


Hi, i have this tree

Code:
        <ice:tree id="insumosTree" hideRootNode="false" hideNavigation="false" 
                               value="#{linea.treeModel}" var="item" 
                               imageDir="css/royale/css-images/">
                         <ice:treeNode>                   
                             <f:facet name="icon">
                                 <ice:panelGroup style="display: inline">
                                     <ice:graphicImage value="#{item.userObject.icon}"/>
                                 </ice:panelGroup>
                             </f:facet>                        
                             <f:facet name="content">
                                 <ice:panelGroup style="display: inline">                          
                                     <ice:commandLink value="#{item.userObject.text}" actionListener="#{item.userObject.nodeClick}"/>                                    
                                 </ice:panelGroup>
                             </f:facet>                        
                         </ice:treeNode>                                    
                     </ice:tree> 


It works nice, but when i click a commandLink inside TreeNode, the actionlisteners is never called. I was searching over the forums but no answer..
There is something special/differents with actionsListener in TreeNodes??

I need your help..

thanks :D
joe.user

Joined: 04/Apr/2008 00:00:00
Messages: 2
Offline


I have exact the same problem. I copied the tree example from the icefaces component showcase but it does not work. The tree is displayd with its icons and nodes but the actionlistener never gets triggered.

I use the tree inside a facelet framework. Can this be the reason for the actionlisteners to fail?

Code:
 <ui:composition template="/layout/template.xhtml">
 	<ui:define name="body">
 		<ice:form>
 		    <ice:panelGroup styleClass="treeContainer">
 		        <ice:tree id="tree"
 		                  value="#{featureCategoryTreeEditor.model}"
 		                  var="item"
                       action="#{featureCategoryTreeEditor.nodeClicked}"
 		                  hideRootNode="false"
 		                  hideNavigation="false">
 		            <ice:treeNode>
 		                <f:facet name="icon">
 		                    <ice:panelGroup style="display: inline">
 		                        <ice:graphicImage
 		                                value="#{item.userObject.icon}"/>
 		                        <ice:commandLink                       actionListener="#{item.userObject.nodeClicked}">
 		                            <ice:outputText id="TreeNode"
 		                                    value="#{item.userObject.text}"/>
 		                        </ice:commandLink>
 		                    </ice:panelGroup>
 		                </f:facet>
 		                <f:facet name="content">
 		                    <ice:panelGroup style="display: inline">
 		                		<ice:outputText id="dummyText"
 		                        	styleClass="treeNodeName"
 		                        	value="#{item.userObject.text}"/>
 		                    </ice:panelGroup>
 		                </f:facet>
 		            </ice:treeNode>
 		        </ice:tree>
 		    </ice:panelGroup>
 		</ice:form>
 	</ui:define>
 </ui:composition>
 
potter15

Joined: 12/Feb/2008 00:00:00
Messages: 10
Offline


I'm having the same problem. Following the icefaces facelets tutorial for dynamic includes.

The example project works but when I try to implement it in my own project the action listener is not called for any commandLinks within treeNodes. CommandLinks outside the tree work fine.

Any advice on where to start debugging the problem? when I click the link I don't get any output at all so I'm not sure where to start.
potter15

Joined: 12/Feb/2008 00:00:00
Messages: 10
Offline


I fixed my problem.
At the top of my jspx file was this


<div
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets">

the file was being used as a template in a decorate tag in another file.

I added

xmlns:f="http://java.sun.com/jsf/core"

to that div tag and the actionListener is called now. I guess it wasn't recognizing the f:facet tag.

Why wouldn't it give any error or warnings messages in this case? I finally found it because I noticed my IDE (myeclipse) was giving warning messages, but I'm surprised the page even rendered.

 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team