[Users] How to disable a button wrapped in an action?

Robert Buckley robertdbuckley at yahoo.com
Mon Nov 5 10:36:45 CET 2012


Hi,

I have an WMSGetFeatureinfo button defined within an action as follows in Extjs 3.4

    action = new GeoExt.Action({
        id:"wms_info_btn",
        text: "",
        tooltip: "Features Abfragen",
        toggleGroup: 'mapTools',
        icon: 'images_big/10_identify.png',
        hidden:false,
        control: featureInfo,     
        map: map
    });
    actions["Select"] = action;
    toolbarItems.push(action);
 

This work fine....but if the layer node - "activemode" - isn´t checked, the busyMask runs indefinately. I am trying to identify if the node is checked or not. I can do this with the following code.


   if (typeof(activenode) == "undefined"){
//                  Ext.get('wms_info_btn').dom.disabled = true;
               }

but I can't reference the button in the toolbar to disable it .....I guess because it is an action.


Can anyone help me get a reference to the actual button?

yours,

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121105/fd213700/attachment.htm 


More information about the Users mailing list