Sorry for resurrecting this old thread, but I'm in the same situation as the
thread starter. I tried the <t:updateActionListener> suggestion, but i'm
getting exceptions. Here is how my code looked like right now.


here is the tree2 component
<t:tree2 id="clientTree" value="#{treeBacker.expandedTreeData}" var="node"
varNodeToggler="t" clientSideToggle="true" binding="#{treeBacker.tree}" >

here is the a4j:commandLink

                <a4j:commandLink id="a4jLink" styleClass="#{t.nodeSelected?
'documentSelected':'document'}" actionListener="#{treeBacker.nodeClicked}" 
reRender="a4jGroup">                                                            
        <t:updateActionListener
property="#{treeBacker.clickedNode}" value="#{node}" />
                                                                                
                                                    <t:updateActionListener
property="#{t.setNodeSelected}" value="true" />
                                                                                
                                                           <h:outputText
value="#{node.description}"/>
                                                                                
                                                           <f:param 
name="docNum"
value="#{node.identifier}"/>
                                                                                
                                                           <f:param name="catid"
value="#{node.catId}"/>
                                                                                
                                                                        
</a4j:commandLink>


This is my exception:
javax.faces.el.PropertyNotFoundException: Bean:
org.apache.myfaces.custom.tree2.HtmlTree, property: setNodeSelected
        at
org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:500)
        at
org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:472)
        at
org.apache.myfaces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:325)
        at
org.apache.myfaces.custom.security.SecurityContextPropertyResolver.getType(SecurityContextPropertyResolver.java:113)
        at
org.apache.myfaces.el.ValueBindingImpl.getType(ValueBindingImpl.java:207)
        at
org.apache.myfaces.custom.updateactionlistener.UpdateActionListener.processAction(UpdateActionListener.java:136)
        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:51)
        at
javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:487)
        at javax.faces.component.UICommand.broadcast(UICommand.java:78)

Basically, I need a setNodeSelected in my treeBacker class(managed bean). I
thought the setNodeSelected  was already automatic for the HtmlTree. I dont
know how to setup the setNodeSelected in the managed bean. What kind of
object to associate with the set? I just want to change how my folder looked
like when it is clicked that's why I'm tinkering with the setNodeSelected
method. I didn't use the actionListener for that because the actionListener
is doing the necessary process when a folder is clicked. I went through
every single thread about this topic in the forum, but it seems I'm missing
out on something or I'm jsut confused. I hope anyone can shed some light
into my problem.




Jim the Standing Bear-2 wrote:
> 
> I tried to do the following, but apparently tomahawk doesn't like it:
> 
>                 <h:commandLink id="id1" action="nodeClicked"
> actionListener="#{Workspace.doGetDetail}"
>                   immediate="true" value="Project:
> #{node.description}"
> styleClass="#{t.nodeSelected?'highlighted':'nodeFolder'}"
> rendered="#{!t.nodeSelected}">
>                   <f:param id="resourceId" name="resourceId"
> value="#{node.identifier}" />
>                   <t:updateActionListener
> property="#{t.setNodeSelected}" value="true"/>
>                 </h:commandLink>
> 
> I also tried property="#{t.nodeSelected}" and it made no difference...
>   is there a way to do the equivalent of   t.setNodeSelected in the
> backing bean?
> 
> 
> 
> On 10/17/06, Jeff Bischoff <[EMAIL PROTECTED]> wrote:
>> Jim the Standing Bear wrote:
>> > In the sample code provided on the wiki, the code explicitly does
>> > t.setNodeSelected as the actionListener of the commandLink; but i
>> > cannot do that because as I said earlier, the actionListener is
>> > reserved to invoke a method at the backing bean.
>> >
>>
>> You do realize that you can have multiple t:updateActionListener tags
>> inside of a commandLink/commandButton? :)
>>
>> Regards,
>>
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>>
>>
> 
> 
> -- 
> --------------------------------------
> Standing Bear Has Spoken
> --------------------------------------
> 
> 

-- 
View this message in context: 
http://www.nabble.com/question-about-tree2%27s-t.nodeSelected-tf2461690.html#a11961682
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to