[richfaces-issues] [JBoss JIRA] (RF-2494) Multiple clicks on a particular Tree node doesn't fire nodeSelectListener method for each click (only for the first time)
Kristina Chyzhewska (JIRA)
issues at jboss.org
Mon Feb 24 05:29:47 EST 2014
[ https://issues.jboss.org/browse/RF-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12947262#comment-12947262 ]
Kristina Chyzhewska commented on RF-2494:
-----------------------------------------
I solved this problem in our project as follows:
For the corresponding <rich:treeNode> uses <a4j:support> which calls <a4j:commandLink> which processes such action like nodeSelectListener
{code:title=treeNode.xhtml|borderStyle=solid}
<rich:tree id="treeId"
var="node"
ajaxkeys="#{null}"
ajaxSubmitSelection="true"
switchType="ajax"
nodeSelectListener="#{treeBean.processSelection}"
adviseNodeSelected="#{treeBean.adviseNodeSelected}"
adviseNodeOpened="#{treeBean.adviseNodeOpened}"
changeExpandListener="#{treeBean.processExpansion}"
limitToList="true"
reRender="…"
…>
<rich:treeNodesAdaptor var="root" nodes="#{ treeBean.getNodes()}">
<rich:treeNode>
<a4j:outputPanel layout="block">
<h:outputText value="…" />
</a4j:outputPanel>
<a4j:support event="onclick" oncomplete="document.getElementById('#{facesClientUtil.getClientIdSafely('nodeLink')}').click()" />
</rich:treeNode>
<a4j:commandLink id="nodeLink" actionListener="#{treeBean.processSelection}" reRender="…"/>
{code}
> Multiple clicks on a particular Tree node doesn't fire nodeSelectListener method for each click (only for the first time)
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: RF-2494
> URL: https://issues.jboss.org/browse/RF-2494
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.1.4
> Reporter: Mareks Malnacs
>
> Here is the problem:
> -construct Tree with recursiveTreeNodesAdaptor, switchType="client" and ajaxSubmitSelection="true"
> -add method binding to nodeSelectListener so that every click on tree node executes some business method (for tests - simple log message displaying clicked node id for example)
> Result:
> -tree is rendered fine, clicks on different node elements in a tree executes specified nodeSelectListener method also fine, BUT when user clicks same tree node twice, nodeSelectListener method is not fired - to get it fired for this particular node again You have to click some other node in a tree and then click back on desired one. Shouldn't nodeSelectListener be fired on each click on a tree node even though user is clicking on the same node multiple times ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list