1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default How to open button menu

    How to open button menu


    Hello,
    I have a button with a menu.

    When I click the button, open menu and select one of the elements the menu is closed?

    How can I prevent menu from close or how can I reopen the menu?

    Here is my button:
    PHP Code:
    {
                    
    xtype'button',
                    
    text'<fmt:message key="Show"/>',
                    
    icon:'<c:out value="${pageContext.request.contextPath}"/>/icons/magnifier.png',
                    
    menu: [
                        {
                            
    text'<fmt:message key="AltTextStoppedVehicles"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },
                        {
                            
    text'<fmt:message key="AltTextMovingVehicles"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },{
                            
    text'<fmt:message key="AltTextIdleVehicles"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },
                        {
                            
    text'<fmt:message key="AltTextViolationVehicles"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },
                        {
                            
    text'<fmt:message key="AltTextVehiclesInRegion"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },
                        {
                            
    text'<fmt:message key="AltTextVehiclesOutOfRegion"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    },
                        {
                            
    text'<fmt:message key="AltTextVehiclesWithNoData"/>',
                            
    checkedfalse,
                            
    checkHandleronItemCheck
                        
    }
                    ]   
                } 
    Here is my item check function:
    PHP Code:
    function onItemCheck(itemchecked){
        
    item.parentMenu.????????
        if( 
    item.text == '<fmt:message key="AltTextStoppedVehicles"/>' ){
            
    stopFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextMovingVehicles"/>' ){
            
    moveFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextIdleVehicles"/>' ){
            
    idleFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextViolationVehicles"/>' ){
            
    violationFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextVehiclesInRegion"/>' ){
            
    inRegionFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextVehiclesOutOfRegion"/>' ){
            
    outOfRegionFilter checked;
        }else if( 
    item.text == '<fmt:message key="AltTextVehiclesWithNoData"/>' ){
            
    noDataFilter checked;
        }

    Thanks.

    --
    Mehmet

  2. #2

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    Thank you very much Animal, I though I should handle that from the parentMenu item.

  4. #4

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    7
    Vote Rating
    0
    loeischandra is on a distinguished road

      0  

    Default


    i have similar problem in extjs 4
    and still confusing until now

    i want to show submenu on click instead of hover??

  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    Quote Originally Posted by loeischandra View Post
    i have similar problem in extjs 4 and still confusing until now

    I want to show submenu on click instead of hover??
    I would recommend asking in the EXT4 menu:
    http://www.sencha.com/forum/forumdis...Ext-Discussion

Similar Threads

  1. Replies: 0
    Last Post: 13 Sep 2010, 6:51 AM
  2. Replies: 0
    Last Post: 3 Sep 2010, 12:38 PM
  3. Replies: 6
    Last Post: 12 Aug 2010, 9:40 AM
  4. [OPEN][BETA3]Duplicate menu items in context menu
    By R.J in forum Ext.nd for Notes/Domino
    Replies: 0
    Last Post: 7 Dec 2009, 9:23 PM
  5. Toolbar button to open a div like a menu?
    By jorenm in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Oct 2008, 5:15 PM

Thread Participants: 3