[richfaces-issues] [JBoss JIRA] Updated: (RF-8607) ComponentControl: regression - cannot be activated by "oncomplete" (WAS: Regression in context menu on trees)

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Fri Apr 30 15:40:06 EDT 2010


     [ https://jira.jboss.org/jira/browse/RF-8607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-8607:
-------------------------------

        Summary: ComponentControl: regression - cannot be activated by "oncomplete" (WAS: Regression in context menu on trees)  (was: Regression in context menu on trees)
    Component/s: component-misc
                 regression
                     (was: component-tree)
                     (was: component-menu)


The problem is caused by the following new code in controlUtils.js:

 if (Richfaces.componentControl.checkDisableDefault(aevent, disableDefault)) {
var fixedEvent = jQuery.event.fix(event);
fixedEvent.stopPropagation();  // <--- breaks here, stored event doesn't have any methods
fixedEvent.preventDefault();
} 



> ComponentControl: regression - cannot be activated by "oncomplete" (WAS: Regression in context menu on trees)
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-8607
>                 URL: https://jira.jboss.org/jira/browse/RF-8607
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-misc, regression
>    Affects Versions: 3.3.3.Final
>            Reporter: Lukas Krejci
>
> The following code snippet illustrates how we use a context menu that is dynamically loaded on the oncontextmenu event. This works in 3.3.0.GA but stopped working in the later versions (I tried 3.3.1.GA, 3.3.2.GA, 3.3.3.CR1 and 3.3.3.Final).
>     <h:form>
>        <rich:contextMenu attached="false" id="resourceMenu" 
>                          binding="#{ResourceTreeContextMenuUIBean.menu}"
>                          disableDefaultMenu="false" style="z-index: 50;" 
>                          submitMode="ajax" />
>     </h:form>
>    <h:form>
>                 <rich:tree style="width: 100%; height: 100%; min-width: 100%; min-height: 100%" switchType="ajax"
>                            componentState="#{ResourceTreeStateAdvisor.treeState}"
>                            stateAdvisor="#{ResourceTreeStateAdvisor}"
>                            status="commonStatus"
>                            var="treeNode"
>                            icon="/images/icn_tree_Platform.gif"
>                            id="leftNavTree"
>                            preserveDataInRequest="false"
>                            adviseNodeSelected="#{ResourceTreeStateAdvisor.adviseNodeSelected}"
>                            changeExpandListener="#{ResourceTreeStateAdvisor.changeExpandListener}"
>                            nodeSelectListener="#{ResourceTreeStateAdvisor.nodeSelectListener}"
>                            ajaxSubmitSelection="true"
>                            showConnectingLines="false"
>                            nodeFace="#{treeNode.data.class.simpleName}"
>                            eventsQueue="resourceTreeQueue"
>                            ignoreDupResponses="true">
>                     <rich:recursiveTreeNodesAdaptor roots="#{ResourceTreeModelUIBean.roots}"
>                                                     var="resourceTreeItem"
>                                                     nodes="#{resourceTreeItem.children}" />
>                     <rich:treeNode type="Resource"
>                                    icon="/images/icons/folder_closed_#{resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up'}_16.png"
>                                    iconCollapsed="/images/icons/dir_closed.png"
>                                    iconExpanded="/images/icons/dir_open.png"
>                                    iconLeaf="/images/icons/Service_#{resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up'}_16.png">
>                         <a4j:support event="oncontextmenu" reRender="resourceMenu" timeout="5000"
>                                      disableDefault="true" status="commonStatus" limitToList="true"
>                                      ajaxSingle="true">
>                             <f:param name="contextResourceId" value="#{resourceTreeItem.data.id}"/>
>                             <rich:componentControl disableDefault="true" event="oncomplete" for="resourceMenu"
>                                                    operation="show" />
>                         </a4j:support>
>                         <h:outputText value="#{resourceTreeItem}"
>                                       styleClass="resourceLink" title="Right-click for more options."/>
>                     </rich:treeNode>
>      </rich:tree>
>   </h:form>
> The strange thing is that the backend code is called and fills in the intended contex menu component successfully and even the AJAX response is returned to the browser with what seems to be a correct javascript representation of the context menu. But the context menu is then not shown.

-- 
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