You can use an action and an actionListener in the same tag. You can even
nest actionListener's in the tag and have multiple ones called.

----- Original Message ----- 
From: "Hendrik Neumann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, April 03, 2005 4:24 AM
Subject: Re: more about tree2 node selection


would it be possible to use the setNodeSelected-Event (to mark the currently
selected node) AND a normal action-method in one command link?

Something like

<h:commandLink
  immediate="true"
styleClass="#{t.nodeSelected ? 'documentSelected' : 'document'}"
actionListener="#{t.setNodeSelected}"
rendered="#{!t.nodeSelected}"
action="#{currentUser.userSelectsArticle}"
/ >

Because I want to use the nodes for navigation (action-method) and I also
would like to mark the currently selected node.

Are both things possible?

Greetings,
Hendrik

> <f:facet name="document">
> <h:panelGroup>
> <h:commandLink immediate="true"
> styleClass="#{t.nodeSelected ? 'documentSelected' :
'document'}"
> actionListener="#{t.setNodeSelected}"
rendered="#{!t.nodeSelected}">
> <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>

Reply via email to