1. #11
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    891
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    You should change the baseparams and set the loadingstate to false just after the user value has been changed
    PHP Code:
    var msm Ext.getCmp('myStoreMenu');
    msm.baseParams = {userTXTuserValue,                mailTXT emailValue};
    msm.loaded=false
    the next time the menu is shown it will be forced to reload the itemconfig.

  2. #12
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    baboog is on a distinguished road

      0  

    Default


    hey guys,
    sorry its a noob question but, please need help,
    i have one 'StoreMenu' defined
    i wanted to use that menu for multiple items of a TOOLBAR (rather than a new StoreMenu for each )and in baseParams send the id or text of the toolbar item clicked. and using that param in server side to decide what MENU to send .. any way how i can get the id/text of clicked toolbar item in baseParams ???
    thanks
    baboog

  3. #13
    Sencha User luisparada's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    94
    Vote Rating
    2
    luisparada is on a distinguished road

      0  

    Default


    I'm trying to do the same thing, but i need to dynamically load the entire items of the toolbar even the root ones, this is my code:
    Code:
      init : function(){
            this.initRecordDef();
            var records = this.getRecordDef();
            var storeMenu = new Ext.data.JsonStore({
                        proxy:new Ext.data.HttpProxy({url:'modules.php'+'?action=getMenu&response=menu&mname=menu'}),
                        fields:[records],
                        root:'rows'
                    });
            
            var mainMenu = new Ext.ux.menu.StoreMenu({
                    store:storeMenu,
                    listeners:{
                        'beforeshow':function(){
                            console.log(this.store)
                            this.loaded=false;
                        }
                    } 
                });
            
            var panel = new Ext.Panel({
            header:false,
            width:896,
            autoHeight:true,
            tbar: new Ext.Toolbar([{
                text:'StoreMenu 1(normal menu entries)',
    			menu:mainMenu
            }]),
                renderTo: Ext.getDom('titulo-tools')
            });     
        }
    });
    I mean how can I load all items from jsonStore using storemenu as the root of the toolbar ?
    something like this:
    Code:
    var panel = new Ext.Panel({
            header:false,
            width:896,
            autoHeight:true,
            tbar: new Ext.Toolbar([///mainMenu using storeMenu////]),
                renderTo: Ext.getDom('titulo-tools')
            });
    ____________________________________
    do not make install, just compile it.!!!
    --------------------------------------------------
    //*************k4m1k4z3************\\

  4. #14
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    891
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    StoreMenu is a special Menu-Item with ajax-load-store functionality. it cannot be used as a toolbar. You need to create a similiar toolbar-UX like i did with the Menu-function.

  5. #15
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default


    Hi,
    I'm trying to use this with Ext3. Pretty much works except one minor visual glitch. When mousing over the menu item, whose submenu is a StoreMenu, the submenu doesn't show correctly, but if I mouse away and then back, I get the "Loading" and then the items show properly. After that, its ok.

    Is there some css/style tweak needed for Ext3? Thought I'd ask before I start tweaking..

  6. #16
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    891
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by Sesshomurai View Post
    Hi,
    I'm trying to use this with Ext3. Pretty much works except one minor visual glitch. When mousing over the menu item, whose submenu is a StoreMenu, the submenu doesn't show correctly, but if I mouse away and then back, I get the "Loading" and then the items show properly. After that, its ok.

    Is there some css/style tweak needed for Ext3? Thought I'd ask before I start tweaking..
    i cannot reproduce this with Ext 3.0-RC2 (using my demopage). Could you provide some testsite where this occurs?

  7. #17
    Ext User
    Join Date
    Sep 2008
    Posts
    5
    Vote Rating
    0
    ibradley is on a distinguished road

      0  

    Default StoreMenu renders off-screen on first load

    StoreMenu renders off-screen on first load


    Hi there. Have been using this excellent extension for a while, but come across a small issue with it.
    I'm using it as a dynamic context menu in a Ext grid and Ext Tree. When the menu (or a storemenu sub-menu) is loaded for the first time and the XY coordinates clicked are near the bottom or right of the viewport/screen the menu gets cropped (see screenshot).
    If you click-out of the menu/submenu and then reload it the menu is then positioned correctly within the bounds of the viewport/screen. This happens whether the menu is set to auto-reload or not.
    I'm guessing that Ext is trying to reposition the menu before it is fully loaded or something like that.
    Any ideas?
    Attached Images

  8. #18
    Sencha User
    Join Date
    Dec 2008
    Posts
    33
    Vote Rating
    0
    iceblast_01 is on a distinguished road

      0  

    Default


    hi i looked at the sample, everytime i click or mouse over the menu it always loads, is there a way to load the menus upon loading the panel, and not loading it again? like loading it once and thats it

    -edit: ok nvrmind i made it to load only once, what i want to do now is to have something like this for the whole toolbar, with menus and submenu and do it on a single request, what i mean is here it ask for new json for each menu, is it posible to create several menu in a single json string?

  9. #19

  10. #20
    Sencha User
    Join Date
    Jun 2007
    Posts
    260
    Vote Rating
    4
    hallikpapa is on a distinguished road

      0  

    Default


    Like this plugin.

    If I return a list of 10 checkboxes, I would like to submit all the unchecked checkboxes to the server. So far I just have it doing it one at a time. It only sees the most recent unchecked box. Ideas on what I should do?

    Here's what php is sending back in my handler, and it works, but there's got to be a cleaner way.

    Code:
    $data[$i]['handler'] = "function(item) { var sp = Ext.getCmp('test-aaa').menu.items; var array = new Array();
    						for(i in sp.items) { 
    							if(sp.items[i].checked == false) { 
    								array.push(sp.items[i].id); } }
    						array.push(item.id);
    						 Ext.getCmp('service-provider-column-chart').store.load( {params:{id: Ext.encode(array)}}) } ";