[richfaces-issues] [JBoss JIRA] Created: (RF-8369) a4j:support rerendering problem with rich:tree

John Leed (JIRA) jira-events at lists.jboss.org
Thu Feb 11 13:30:10 EST 2010


a4j:support rerendering problem with rich:tree
----------------------------------------------

                 Key: RF-8369
                 URL: https://jira.jboss.org/jira/browse/RF-8369
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 3.3.3.BETA1
         Environment: Glassfish v3, Facelets 1.1.15
            Reporter: John Leed


I have a rich:tree with a rich:contextmenu that is dynamic depending on the type of node currently selected:

<rich:tree id="diagram-tree" value="#{standardPogSetCrud.treeRoot}" var="item"
    ajaxNodeKeys="#{standardPogSetCrud.ajaxNodeKeys}" treeNodeVar="node" nodeFace="#{node.face}"
    nodeSelectListener="#{standardPogSetCrud.selectionListener}"
    dragIndicator="drag-indicator" dropListener="#{standardPogSetCrud.dropListener}"
    ajaxSubmitSelection="true" preserveModel="none" oncontextmenu="return false;"
    adviseNodeOpened="#{standardPogSetCrud.adviseNodeOpened}"
    binding="#{standardPogSetCrud.treeComponent}" rightClickSelection="true">
    <rich:treeNode id="standardPogSet-node" type="standardPogSet" acceptedTypes="pogRow, pogRow-new"
         icon="images/report.png" iconLeaf="images/report.png">
         <h:outputText value="#{node.entity.label}" rendered="#{not empty node.entity.label}"/>
         <h:outputText value="New #{node.entity.classLabel}" rendered="#{empty node.entity.label}" />
         <a4j:support event="oncontextmenu" ajaxSingle="true" immediate="true"
              reRender=":standardPogSet-crudpanel-form:contextmenu" limitToList="true"
              oncomplete="#{rich:component('contextmenu')}.show(event, null);" />
...

On a contextmenu event, the tree fires the selectionlistener, which sets the currentNode in backing bean. This works fine. The a4j:support tag should then rerender the contextmenu and finally show it. The problem is that even though a4j:support shows the context menu, it isn't rerendered.

As a workaround, I bound the contextmenu to the backing bean and added AjaxContext.getCurrentInstance().addComponentToAjaxRender(contextMenu); to the selectionListener. 

Before you ask, I also outputted contextMenu.getClientId() to the logger - my reRender id is correct.

Very similar code works correctly in 3.3.2 SR1 on Glassfish v2.1, so this might be a regression.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list