Using XMLLIST - Enable/Disable Menu Items

I am using XMLList for creating menu items.
I want to enable / disable menu items based on the permissions to the user.
Below is the code snippet:
<fx:XMLList  id="newData">
                              <menuitem id="item1" label="{resourceManager.getString('taskmgmt', 'taskmgmt.label.newProject')}" />
                              <menuitem id="item2" label="{resourceManager.getString('taskmgmt', 'taskmgmt.label.projectFromTemplate')}" enabled="false"/>
                    </fx:XMLList>
private function ItemClickHandler(event:MenuEvent):void
     if(PermissionManager.isAddPermitted("WTM_PROJECT_PLANNING")){
                                                       ProjectAssignmentModel.projectAssignmentFlag=false;
                                                       if(event.item.@label == resourceManager.getString('taskmgmt', 'taskmgmt.label.newProject')){
                                                                 clearModel();
                                                                 dispatchEvent(new SwitchViewEvent(SwitchViewEvent.SWITCH_VIEW_EVENT,false));
protected function newMenuButton_clickHandler(event:MouseEvent):void
                                        if(! PermissionManager.isAddPermitted("WTM_PROJECT_PLANNING")){
                                                  newData.item1.enabled = false;
                                        else
                                                  menuList.dataProvider = newData;
                                                  menuList.show(event.stageX + 5 , event.stageY + 5);
                                                  mode = CREATE;
Based on the permission, I want to dynamically enable / disable the "New Project" button.
Can someone provide information how to achieve this ?
Further update on this, it is giving the following error while running of the application:
"TypeError: Error #1089: assignment to list with more than one item is not supported"

Resolved by using the correct Data Provider and iterating through the list

Similar Messages

  • How to hide/disable menu items using Javascript in Acrobat 9 pro or later

    We just wanted to know on how to hide/disable menu items for e.g. 'Open' menu item under 'File' menu in Acrobat 9 or later on Mac using Javascript. It would be useful if you could provide if any other option is in place already.

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • How do i disable menu items in Help manu, Photoshop cs6?

    How do i disable menu items in Help manu, Photoshop cs6?
    I packaged Photoshop cs6  using AAMEE CS6.
    I need to some menu items to disable.
    can any one please tell the process of doing , or which registries or files need to edit.
    Appreciate the immediate response.
    thanks in advance.

    Hello8
    Given the fact that you speak about AAMEE, it's not clear if you search for an automated and remote way to do it on multiple machines or not.
    (and therefore if this thread should be moved to the relevant forum, http://forums.adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent )
    To disable menu items, simply go to Edit>Menus and click on the eyeball next to the menus you do not want.
    It is then possible to save it in a workspace that by default will be located there: Documents and Settings/[user name]/Application Data/Adobe/Adobe Photoshop CS6/Adobe Photoshop CS5 Settings/Workspaces (Modified)
    I'm not sure if Photoshop will start if the default workspaces are removed, as there is an option to restore them in the preferences.
    Also, this is not customer support, but a forum fielded by volunteers that answer when they can, so inviting for an"immediate response" has no bearing; and might even have the opposite effect, but thanks for doing it in a polite and non too demanding way!

  • Enable disable toolbar items on click on any checkbox,radio button,text box.

    Hi Friends,
    I am create application in eclipse RCP E4 and now i am trying to Enable disable toolbar items on click on any checkbox, radio button, text box .
    Please Help me friends....

    Hello friend my proble is solve and now i am sharing my solution ....
    I am create RCP application and view side any listener click event fire time apply this code
    IEvaluationService evaludationService = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    evaludationService.getCurrentState().addVariable("noOfRowsChecked", noOfRowsChecked);
    evaludationService.requestEvaluation("com.jobsleaf.propertytester.canDeleteItem");
    and add plug in extension and create property tester class means listener property tester class side apply this code
    IEvaluationService ws = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    Integer integer = (Integer) ws.getCurrentState().getVariable("noOfRowsChecked");
    if (integer != null)
    if (integer.intValue() > 0)
    return true;
    I hope useful above code when use property tester in eclipse RCP

  • Why can't I use the function of menu item 'issue delivery output'?

    why can't I use the function of menu item 'issue delivery output' in main screen of delivery note?
    And at the same time I can't use the button of printing in main screen of delivery note.
    the main screen of delivery note I mean above is in screen of maintaining shipping data instand of the first screen of VL02N.
    TKS in advance.

    Hi,
    Because delivery will be having header level output and item level output. So if u try to print through main screen then system will not know whether it is header related or item related. That is the reason it is only print output at header level or item level but not in main screen.
    I think u may have doubt like how billin will be issued output through Main screen. Because for billing both header and item level data are same..
    Regards
    Sankar

  • Enable/disable an item in a multirecord block

    hello to all
    How is possible Enable/disable an item in a multirecord block?
    set_item_property change all instances of an item in a multi-record block
    SET_ITEM_INSTANCE_PROPERTY only affects the display
    thanks

    Hi,
    You cannot set the Enabled property in a multi-record block, instead you can change the INSERT_ALLOWED, UPDATE_ALLOWED properties. So that the user can't change the value in the item.
    Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • How to disable menu items through c# in adobe x standard. I didn't find the required APIs.

    Hi
    We are working on a desktop application on C# which uses Adobe Express 5.0. to view the PDF files. Recently we had an issue reported that PDFs created in Adobe 9 are not opening up. So we decided to upgrade to Acrobat Adobe X Standard. Now the issue is that I have to suppress controls (tool bars(or Panels), menu items) for which I'm using the below code which worked in express 5.0 but not on Adobe X. Also I want to view the toolbar by default instead of the translucent menu at the bottom of the page.
    Acrobat.CAcroApp.ToolButtonRemove("SaveFileAs");
    Acrobat.CAcroApp.MenuItemRemove("Quit");
    Please help.
    Thanks,
    vinay

    Hi
    We used javascript to find out the names of the menu items that are present in the Adobe 9.0 Std. I presume that it would work even for Adobe 10.o as well. After that in the .NET C# code we have used App.RemoveMenutItem ("<<MenuItemName>>") to disable all the menu items that we dont want You can search for javascript references for Acrobat and you would find many.
    Also I've figured out another way where you remove the .api files from your plugins folder, however I'm not sure if it would create any further problems. This is route is not taken, atleast for now.
    Please post here the route taken by you.
    Thanks.

  • How to Disable Menu item in Oracle Applications

    Hi,
    How can I disable a Menu (Actions->user defined menu) Item in Oracle applications by using forms personalization.
    Our requirement is to display a message on click of a standard menu using form personalization and it should retain the seeded functionality.
    Thanks
    Prasanna
    Edited by: user13029651 on Jul 30, 2010 6:47 PM

    As an Oracle Applications Developer, your best friends are going to be the following docuements:
    <ul><li>Oracle Applications Developer's Guide </li>
    <li>Oracle Applications User Interface Standards for Forms-Based Products</li>
    <li>Oracle Application Framework Personalization Guide</li></UL>
    These and all of the other related EBS documents can be found in the Oracle Applications (EBS) Documentation Home and don't forget the Oracle eTRM Technical Reference, but you will need an Oracle Support contract to access this site.
    When you can't find your answer in these document sources, you can always ask for help in the E-Business Suite group of forums.
    Craig...

  • Disabling Menu Items

    I can only seem to disable entire menus, not just their menu items. im using menuItem.disable() but it doesnt seem to affect it. ive tried this.validate() after calling disable() but that has no affect either. any suggestion?
    thanks,
    -t0bes

    Try this:
    menuItem.setEnabled(false);The API has all the info you'll need when you're looking for something like this. Just look up the class and search for the method name
    http://java.sun.com/j2se/1.4/docs/api/index.html

  • Using AppleScript to click menu items without access for assistive devices?

    Hi all,
    Is it possible to have AppleScript 'click' menu items without having 'Enable access for assistive devices' enabled?
    My script works fine with it on but with it off I just get this:
    'System Events got an error: Access for assistive devices is disabled.'
    Pretty clear and easy to fix. I don't really want assistive devices enabled, though ...
    Any ideas or is this just not possible?
    Sorry if this is a n00b question - I'm kinda new to the world of Mac and OS X ...
    Thanks!

    Ok cool - thanks for the reply.
    I've figured out how to set the bounds of the window I'm talking about:
    tell application "Transmit" to set bounds of window "Transcript" to {61, 1166, 2559, 1421}
    I'll have a hack and see if I can figure out how to open the Transcript window without needing assistive devices enabled.
    Thanks again!

  • Adobe interactive form : Disabled menu item

    Hi experts,
    we recenlty satred working in Adobe iteractive form in SAP. and we are facing folllowing issues
    1)submenu item is disable (submenu item from "Layout" and "Table" is not enable)
    any solution?

    Hi Sandy,
    Thanks for Replying
    yes i am in display mode but same thing happens when i am in edit mode..
    sorry i can not go in edit mode right now as another developer is working on it.
    SAP Net weaver version - 7.31 with EHP 6.0
    ALD version :  ES2 9.0
    See below Screenshot from other adobe form
    Message was edited by: Zubin ..

  • Why does LV(8.0.1) still track the keyboard shortcuts of disabled menu items?

    Hello all,
    when I disable a (super-) menu item, the submenu-items are grayed out as expected. But they still accept their keyboard- shortcuts. Is this a bug in LV? If I explicitly disable the submenu- items, all works fine, but the simple method would be nicer and comprehensibly.
    I made a VI to illustrate.
    Greets, Dave
    Message Edited by daveTW on 05-11-2006 01:56 PM
    Greets, Dave
    Attachments:
    Menu with shortcuts.zip ‏37 KB

    Hi Dave,
    it seems a bit strange but at the end it is a absolutely correct behaviour. If you deactivate a menu item than all sub-menu items are deactivated in the menu bar. But that is only a feature of the menu bar. To disable the short cut you have to deactivate the sub-menu item itself. In you zip-file the <STRG - C> is deactivated but the <STRG - V> still works. That depends on the settings in your test3.vi where you defined the items to be disabled. If you add "Paste" to the array of items or if you disable all items then the shortcuts will be disabled as well.
    Best regards,
    Carsten Sprung
    Application Engineer
    National Instruments Germany

  • Howto enable disable menubar items in actionscript

    Hello,
    My problem is that i want to enable/disable buttons in a
    menubar according to the loaded page.
    So what i did was when the user clicks on the menubar, it
    triggers a function. Inside that function there will become a check
    on which page is at front. According to that page i am gonna set
    menuitems on and off.
    Thats the idea i had, so now my problem.
    I first try to create a simple solution like my code beneath.

    I'd suggest changing things around a bit. See if the
    following works for you. The clickHandler() method has the syntax
    you're looking for.
    TS

  • Enable & Disable Menu option

    Hi,
    How to enable and disable File -> Save menu option for a form.
    Regards,
    --Prasanth                                                                                                                                                                                                       

    Hi again,
    you can forgot the question, I've found the answer in the developer's guide... :-P There is where the list I've mentioned before was placed.
    Thanks anyway.
    Jose.

  • How to enable File- Export  menu item in custom Form

    I have created a custom form.The File->Export menu item is disable by default.how can i enable this menu item? I have tried
    APP_SPECIAL.ENABLE('FILE.EXPORT',PROPERTY_ON) at block level (when-new-block-instance ) and form level trigger(when-new-form-instance) but not able to enable the same.
    plz suggest way to get this functionality in custom form.

    Hi,
    check below documents can help
    Unable To Export From Files => Export menu option in Applications 11i [ID 275224.1]
    Unable To File > Export Data From A Form [ID 552268.1]
    Unable to Open or Save Export to a File [ID 218209.1]
    Export Menu Item Under File Menu Is Not Bringing Up Dialogue Box Or Openning Up Document [ID 263348.1]
    Regards

Maybe you are looking for

  • New Synced Podcast doesn't play from start

    So I sync up new podcast that is downloaded to my itouch 2nd gen. When I disconnect I start to play the new podcast, however it doesnt start at 0:00, instead it sometimes start at 2 mins, 30 mins or last few mins. I haven't touched the podcast in itu

  • Sparsebundle with password, prompts incessantly

    I have a password protected sparsebundle where I keep projects which require a little additional security (I've had a computer stolen recently).  The problem I'm encountering is since the 10.7.1 update of Lion, the computer is constantly prompting me

  • Problem with Oracle Designer 10

    Hi, I have a problem with Oracle Designer 10 version 9.0.4.7 installed in Windows 2000 platform. I don't know if the origin of the problem is at the server side or client side. I try to launch the repository reports but it doesn't work. The screen ne

  • Del Date not populating using bapi_po_create1

    Hi, I am using Bapi_po_create1 and am having a problem with delivery dates. The Po creates fine but the delivery date will not populate. here is the code i use to populate the Bapi wa_po_item_schedules1-po_item = line_c.     wa_po_item_schedules1-del

  • Photoshop Elements 9upload photos  to Facebook.

    Photoshop elements 9 will not let me upload photos  to Facebook. After authorization from Facebook, the screen says error-unknown error How can I fix this problem?