I just also uploaded an updated tree2 example for the simple examples.
 It uses setNodeSelected to make the most recent node selected bold. 
It works in both client-side and server-side mode.

sean


On Apr 4, 2005 5:10 PM, Sean Schofield <[EMAIL PROTECTED]> wrote:
> I just tested the setNodeSelected.  I was unable to reproduce the
> error.  Here is what I did using the latest CVS code ...
> 
> changed tree2.jsp in simple examples (server version) by adding
> actionListener of the document link
> 
> ...
>        <f:facet name="document">
>            <h:panelGroup>
>                <h:commandLink immediate="true" styleClass="document"
> actionListener="#{t.setNodeSelected}">
>                    <h:graphicImage value="/images/document.png" border="0"/>
>                    <h:outputText value="#{node.description}"/>
>                    <f:param name="docNum" value="#{node.identifier}"/>
>                </h:commandLink>
>            </h:panelGroup>
>        </f:facet>
> 
> ...
> 
> Then I changed setNodeSelected method in HtmlTree and added a "debug"
> statment of: System.out.println("***** setNodeSelected: " +
> getNodeId());
> 
> Then I clicked the first node and got: ***** setNodeSelected: 0:0:4:1
> Can you verify that my specific example at least works on your
> machine?
> 
> sean
> 
> On Apr 3, 2005 9:49 PM, Rob Decker <[EMAIL PROTECTED]> wrote:
> > I tried logging from queueEvent and broadcast on UITreeData and they never
> > get called either. My impression the actionListener on the commandLink
> > should propagated up through those methods on it's way to the UIViewRoot.
> > Well, that's not happening.
> >
> >
> > ----- Original Message -----
> > From: "Sean Schofield" <[EMAIL PROTECTED]>
> > To: "MyFaces Discussion" <[email protected]>
> > Sent: Sunday, April 03, 2005 10:17 PM
> > Subject: Re: selecting nodes in tree2
> >
> > > Rob,
> > >
> > > Sorry it has taken a while to respond.  I've been busy with some
> > > personal stuff.  Is this still a problem for you?  I noticed your
> > > response on another thread mentioning this bug as well. BTW, node
> > > selection is definitely *not* a client side only thing.
> > >
> > > The way I am reading your posts, you are saying that t.setNodeSelected
> > > is not getting called.  Does this mean you are unable to highlight a
> > > selected node at all?  I definitely had the code that I posted a while
> > > back on this working so I would be suprised.  In any event I am going
> > > to check into this by updating the sample to show how this is done so
> > > I will take another look.  Please open a JIRA issue on this one as
> > > well if it is indeed a bug.
> > >
> > > sean
> > >
> > > On Apr 1, 2005 6:14 PM, Rob Decker <[EMAIL PROTECTED]> wrote:
> > > > Yes, it gets called, although it's never true because the actionListener
> > method never
> > > > gets called.
> > > >
> > > > --
> > > > Rob
> > > >
> > > > @objectsource.org
> > > >
> > > > ---------- Original Message -----------
> > > > From: Eric Hsieh <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Sent: Fri, 1 Apr 2005 13:53:16 -0800 (PST)
> > > > Subject: Re: selecting nodes in tree2
> > > >
> > > > > Rob,
> > > > >
> > > > > Does that check for t.nodeSelected work in the
> > > > > styleClass clause?
> > > > >
> > > > > I tried doing what you did but am getting some kind of
> > > > > javascript errors.
> > > > >
> > > > > --- Rob Decker <[EMAIL PROTECTED]> wrote:
> > > > > > I have the following:
> > > > > >
> > > > > >   <h:panelGrid columns="4"
> > > > > > styleClass="#{t.nodeSelected ? 'selected' :
> > > > > > 'unselected'}">
> > > > > >     <h:commandLink
> > > > > > actionListener="#{t.setNodeSelected}"
> > > > > > immediate="tree" id="branch">
> > > > > >       <h:graphicImage
> > > > > > value="/images/yellow-folder-open.png"
> > > > > >                rendered="#{t.nodeExpanded}"
> > > > > > border="0"/>
> > > > > >       <h:graphicImage
> > > > > > value="/images/yellow-folder-closed.png"
> > > > > >                rendered="#{!t.nodeExpanded}"
> > > > > > border="0"/>
> > > > > >     </h:commandLink>
> > > > > >   .
> > > > > >   .
> > > > > >   .
> > > > > >   </h:panelGrid>
> > > > > >
> > > > > > When I click on the folder the actionListener is
> > > > > > supposed to be called. It never
> > > > > > happens. Is node selection a client-side only thing?
> > > > > > Even if it is, why does't the
> > > > > > actionListener get called?
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Rob
> > > > > >
> > > > > > @objectsource.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Yahoo! Messenger
> > > > > Show us what our next emoticon should look like. Join the fun.
> > > > > http://www.advision.webevents.yahoo.com/emoticontest
> > > > ------- End of Original Message -------
> > > >
> > > >
> >
> >
>

Reply via email to