Disable a commandMenuItem in a MenuChoice

Hi,
I have a menu choice component and many commandMenuItems in the menu choice for displaying like a drop down list. I want some of the commandMenuItems to be seen disabled and some to be seen enabled.
When i set the disable property of the commandMenuItem as true, this item is completely not seen when i run the page. But i just want it to be seen disabled. How do i do it?

Hi,
works for me
          <af:menuChoice>
            <af:commandMenuItem text="commandMenuItem 1"/>
            <af:commandMenuItem text="commandMenuItem 2" disabled="true"/>
            <af:commandMenuItem text="commandMenuItem 3"/>
          </af:menuChoice>Frank

Similar Messages

  • Displaying pop up on click of commandMenuItem

    Hello,
    I wan to display popup window when I click on commandMenuItem
    <af:popup binding="#{backing_showData.delPopup}" id="delPopup">
    <af:commandMenuItem text="Item One"
    binding="#{backing_showData.deleteRow}"
    partialTriggers="logTable" action="#{backing_showData.moveAction}"
    id="deleteRow"
    disabled="#{!bindings.Delete.enabled}"/>
    <af:clientListener method="loadItem" type="click"/>
    </af:commandMenuItem>
    I am calling client listener to show pop up , this function get called and popup component is there on the page, but popup.show() does not do anything , any idea?
    function loadItem(event) {
    alert("clicking to show popup ");
    var popup = AdfPage.PAGE.findComponent("delPopup");
    popup.show();
    }

    Hi!
    First, your code is not correct: clientListener does not have property name but method for client script invokation.
    Second, as you have not provided complete page, I cannot tell you if something else is wrong.
    Anyhow, the folowing page works fine for me in FF3.0.3:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document>
          <af:messages/>
          <af:form>
            <af:table value="#{bindings.SampleGraphDataRow.collectionModel}" var="row"
                      rows="#{bindings.SampleGraphDataRow.rangeSize}"
                      emptyText="#{bindings.SampleGraphDataRow.viewable ? 'No rows yet.' : 'Access Denied.'}"
                      fetchSize="#{bindings.SampleGraphDataRow.rangeSize}"
                      selectedRowKeys="#{bindings.SampleGraphDataRow.collectionModel.selectedRow}"
                      selectionListener="#{bindings.SampleGraphDataRow.collectionModel.makeCurrent}" rowSelection="single"
                      contextMenuId="myRightClickMenuPopup">
              <af:column sortProperty="year" sortable="false" headerText="#{bindings.SampleGraphDataRow.hints.year.label}">
                <af:outputText value="#{row.year}"/>
              </af:column>
              <af:column sortProperty="value" sortable="false"
                         headerText="#{bindings.SampleGraphDataRow.hints.value.label}">
                <af:outputText value="#{row.value}">
                </af:outputText>
              </af:column>
            </af:table>
            <af:popup id="myRightClickMenuPopup">
              <af:menu id="newMenu">
                <af:commandMenuItem id="item1" text="first item"/>
                <af:commandMenuItem id="item2" text="second item"/>
                <af:commandMenuItem id="item3" text="third item">
                  <af:clientListener type="click" method="test"/>
                </af:commandMenuItem>
              </af:menu>
            </af:popup>
          </af:form>
          <f:facet name="metaContainer">
            <f:verbatim>
              <script>
                    function test(e) {
                        alert(e);
                </script>
            </f:verbatim>
          </f:facet>
        </af:document>
      </f:view>
    </jsp:root>Regards,
    PaKo

  • How to bring commandMenuItem to the right side of the MenuBar (Menu2)

    Hi All,
    I need to display the command menu item in menu bar to right side.
    Currently
    CommanMenuItem in Menu Tab by default is on the right side
    and CommanMenuItem in Menu Bar by default is on the left side.
    I need CommanMenuItem in Menu Bar to be on the right side or
    CommanMenuItem in Menu Tab to be on the left side.
    Thanks & Regards
    Vimalan Balan

    Dear Friend,
    Please find the code snippet.
    <f:facet name="menu1">
    <af:menuTabs var="menuTab" value="#{menuModel.model}">
    <f:facet name="nodeStamp">
    <af:commandMenuItem text="#{menuTab.label}" immediate="true"
    action="#{menuTab.getOutcome}"
    rendered="#{menuTab.shown and menuTab.type=='default'}"
    disabled="#{menuTab.readOnly}"/>
    </f:facet>
    </af:menuTabs>
    </f:facet>
    <f:facet name="menu2">
    <af:menuBar startDepth="1" var="menuTab" value="#{menuModel.model}">
    <f:facet name="nodeStamp">
    <af:commandMenuItem text="#{menuTab.label}" immediate="true"
    action="#{menuTab.getOutcome}"
    rendered="#{menuTab.shown and menuTab.type=='default'}"/>
    </f:facet>
    </af:menuBar>
    </f:facet>
    So, If i click arabic link in home page means menubar item should be in left side.
    Thanks & Regards
    Vimalan Balan

  • Af:menuChoice with af:goMenuItems: targetFrame doesn't open new Window

    Hi,
    I've got a af:menuChoice with af:goMenuItems. They are implemented like the navigation from the tutorial exept for the goMenuItems instead of the commandMenuItems and using destination instead of outcome. Navigating also works fine, but the pages are all opend in the same browser window although I set targetFrame="_blank" in the goMenuItems.
    Any ideas?

    In form add targetFrame="xx" ,就能解决!

  • Get value from table record and set Disabled property...

    Hi! I have table in my JSPX page. I search for records and then press on one of the records with right click, see: http://my.jetscreenshot.com/2677/20120203-fas1-30kb
    I set disabled property like this of my commandMenuItem:
    #{row.GenResGrupa != 'true'}But as You can see from my picture above, the disabled property do not work. Where I am wrong with my code:
    <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.GenResGrupa != 'true'}"/> Please correct me! If You need some other information, please let me know.
    Best regards, Debuger!

    Dear fedor! Popup is in facet contextMenu. contentDelivery="lazyUncached" for my popup:
    <af:popup id="p1" contentDelivery="lazyUncached">
                            <af:menu text="menu 1" id="menu1">
                              <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"/>
                            </af:menu>
                          </af:popup>In my pageDef I have this code:
    <bindings>
        <tree IterBinding="LVAIMeklesanaIterator" id="LVAIMeklesana">
          <nodeDefinition DefName="kokaugi.model.view.LVAIMeklesana"
                          Name="LVAIMeklesana0">
            <AttrNames>
              <Item Value="Accename"/>
              <Item Value="LvaiKolekcijaPk"/>
              <Item Value="Accenumb"/>
              <Item Value="AvsGrupa"/>
              <Item Value="Cropname"/>
              <Item Value="EkspGrupa"/>
              <Item Value="GenResGrupa"/>
              <Item Value="Genus"/>
              <Item Value="Species"/>
              <Item Value="Sinonims"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <action IterBinding="LVAIKolekcijaDatiIterator"
                id="setCurrentRowWithKeyValue"
                InstanceName="KokaugiModuleDataControl.LVAIKolekcijaDati"
                DataControl="KokaugiModuleDataControl" RequiresUpdateModel="false"
                Action="setCurrentRowWithKeyValue">
          <NamedData NDName="rowKey" NDValue="#{row.LvaiKolekcijaPk}"
                     NDType="java.lang.String"/>
        </action>
      </bindings>And disabled property is like this:
    disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"But it is still do not working. I am wrong somewhere? Maybe the only way to correct my problem is like Hohn said?
    Best regards, Debuger!

  • How can I disable sending from one Mail account?

    Hello. I have a gmail account that I use to subscribe to various newsletters and accounts. So it's essentially a read-only account for me. But I too frequently accidently send mail from that account. Is there a way to prevent mail from being sent from that account?

    I want to do the same thing as the OP.  I have tried making outgoing server none. And checking "always use this server so it prompts me to edit the message so that I manually select a different address to send from inthe drop down list. And selecting a different account for composing.  Actually, all my outgoing emails keep coming from the one account I am attempting to disable.  Got any other ideas?

  • Not null and enable or disable  column in tabular form

    Hi,
    Using apex version 4.1 and working on tabular form.
    ACT_COA_SEGMENT_MAS is Master table
    and
    ACT_SEGMENT_VALUES_MAS is detail table
    I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
    How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
    I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
    Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 9, 2013 9:12 PM

    Vedant,
    You need to create you own manual tabular form and not use the wizard.
    Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
    select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
    Hope that help.
    Vivek

  • NOT disabling keyboard/trackpad on tablet fold...

    This is probably the opposite of user problems regarding the keyboard/trackpad and turning the Yoga Pro 2 in tablet mode... Here's the situation:
    I'm a Java programmer and I'm sharing my files with my home PC, so I can work from my laptop or desktop easily without transferring files back and forth.
    It's no fun adjusting my typing to multiple different keyboards for different PCs, and overall I tend to prefer a trackpad over a mouse for what I do which makes using my lenovo yoga keyboard ideal for everything (majority of wireless keyboards also aren't backlit).
    I'm using the program Mouse without Borders (from the Microsoft website) so that I can use my lenovo yoga keyboard/trackpad on my desktop.
    What I want to do: keep my keyboard and trackpad enabled when putting the yoga into tablet mode. I've already figured out how to disable the touchscreen for such uses, but the only way I know to keep the keyboard and trackpad active is to uninstall the synaptics driver/software. Obviously that isn't an ideal solution to have to install and uninstall it every time I switch between PCs.
    Is there any way to stop synaptics from disabling the keyboard and trackpad when in tablet mode? Preferrably something such as disabling something in device manager, not uninstalling and reinstalling software depending my use for the moment.

    Please provide more information.
    First, I have no idea what "Jimi to Jimi" means. This is probably just something you need to explain to me; a Google search didn't turn up anything useful.
    You said that the keyboard and trackpad aren't working right. What does this mean, exactly? Regardless, the monitor you use should have no effect on the function of your other peripherals.

  • HT4528 My apple I'd is disable how do I get it working to download apps again

    My apple ID is disable and wont let me download my apps back to my phone how do i fix the problem

    Try to reset your password at http://iforgot.apple.com.
    If that doesn't work, time to contact iTunes Support - http://apple.com/support/itunes/contact/

  • Got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    If it's showing the red disabled screen due to incorrect passcodes then you may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808 - you should then be able to reset the iPad via your computer's iTunes and restore/resync your content to it

  • Disabled JMenuItem doesn show animated gif

    Hi there
    I would like to have a popup menu with actions that are enabled after they have finished with some background task taking some time. Basically this works fine for the enabling action on a shown popup. However, adding an animated gif as the icon or disabled icon does not show it in disabled state. In enabled state it works perfect. Please have a try with the sample code. You should see the disabled item for 2 secs and the icon is not showing up. After being enabled, it does. Invoking the menu again shows the animated gif in its last state left, but not moving any more.
    I guess, repaints are not done appropriately in disabled state... Any ideas how to solve that would be highly appreciated :-)
    Actually I used the icon at http://mentalized.net/activity-indicators/indicators/pascal_germroth/indicator.white.gif
    Cheers
    Daniel
    public class Main
      public static void main(String[] args)
        final JFrame frame = new JFrame();
        frame.addMouseListener(new MouseAdapter()
          public void mousePressed(final MouseEvent e)
            final JPopupMenu popup = new JPopupMenu();
            popup.add(new JMenuItem("Open..."));
            popup.add(new JMenuItem("Close"));
            final JMenuItem action = new JMenuItem("Long loading until enabled");
            action.setIcon(new ImageIcon("C:/spinner.gif"));
            action.setDisabledIcon(new ImageIcon("C:/spinner.gif"));
            popup.add(action).setEnabled(false);
            popup.show(e.getComponent(), e.getX(), e.getY());
            SwingUtilities.invokeLater(new Runnable()
              public void run()
                try
                  Thread.sleep(2000);
                  action.setEnabled(true);
                catch (InterruptedException e1)
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 200);
        frame.setVisible(true);
    }Edited by: daniel.frey on Apr 22, 2009 7:50 AM

    The problem is that you are causing the EDT to sleep, which means the GUI can't repaint itself. Read the section from the Swing tutorial on Concurrency to understand what is happening.

  • How to disable IE Security Warning on opening a "local" visio file with Visio Viewer ActiveX?

    Hello all,
    Everyone knows that Microsoft released ActiveX based Visio Viewer for free and allow the users to open Visio drawing and view/print via IE browser.
    The problem that I am facing is that some users are complaining about IE browser's security warning on "active content to run in files on My Computer".
    It means that opening .VSD files from the network, internet, intranet would be all OK but if the user wants to open .VSD files from the local hard drive (or open it as a mail attachment, which will extract it to a temp folder), it prompt the user to select "Allow Blocked Content" EVERYTIME they open them.
    I know that I can GLOBALLY disable this warning by going through Tools - Internet Options - Security section and enable "Allow active content to run in files on My Computer" but I hope that there is a way (or workaround) to allow them by file type or location, etc.
    Questions:
    1. Is there any way to disable those warning for all .VSD only while we still UNCHECK the option on Internet Options?
    2. Is there any 3rd party Win32 based viewer which wouldn't have those restriction?
    3. Is it safe assumption that McAfee VirusScan and Host IPS protection is sufficient enough to remove the IE's security warning feature?
    Thanks in advance?
    Young-

    Are you able to host/launch the VSD file via an HTM page? In that case you can format the HTM page as shown below. This will trick IE into thinking it is loading the file off of a website. Commonly called 'mark of the web'.
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html>
    </html>

  • How can I display step info in User Interface with Tracing Disabled?

    I'm trying to modify the CVI Operator Interface application to update the execute panel with some step information during the execution of the program. i.e. I want to display the measurement, high & low limits during the run WHEN TRACING IS DISABLED. (Doing this, when tracing is enabled is easy, all you do is access the step record that's been constructed (I can cope with that!))
    I've successfully implemented a User defined execution event to signal the User Interface application when the current step is a result (using TS_UIMsg_UserMessageBase etc. I'm posting a UI Message in the Process Model under the ProcessModelPostStep so that I will only display if its a result step.) I've added a user defined
    entry in the execute.c module execution event switch statement which will call a function in the exedisp.c module to update the display. However, I don't have a context to the step that I can use. (I can't use e.g. the exeRec record since this is only completed with the context if tracing is enabled.) I've got a handle to the correct panel to write the information to, but how do I get the context to the current step when tracing is disabled?
    Regards,
    Brian

    Hi,
    no problem - btw, if you wanted to acheive this in TS 1.x, you could always write to a local variable with the ActiveX reference for the step concerned, and then use the msg reference that you have in the OI within the UI Message handler, to dig through to the Execution ->Sequence File->Sequence->Locals, or Execution->Thread->SequenceContext (and you can get almost anywhere from that).
    Hope that helps
    S.
    // it takes almost no time to rate an answer

  • Using a Radio Button to Disable Multiple Checkboxes

    Hi everyone,
    My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
    The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
    Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
    Christian

    I suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm.  Get the most simple case working then add the javascript, css, and CF code to make your application work.
    <!--- contents of input.cfm --->
    <html>
    <head>
         <title>Input</title>
    </head>
    <body>
         <form action="action.cfm" method="POST">
              Choose type: <br />
              <input name="type" type="radio" value="male" />     Male<br />
              <input name="type" type="radio" value="female" /> Female<br />
              <input type="submit" />
         </form>
    </body>
    </html>
    <!--- content of action.cfm --->
    <html>
    <head>
         <title>Action</title>
    </head>
    <body>
         <cfif form.type eq "male">
              Type is male.
         <cfelseif form.type eq "female">
              Type is female.
         </cfif>
         Here is a cfdump of the form variables:<br />
         <cfdump var="#form#" />
    </body>
    </html>
    Message was edited by: JR "Bob" Dobbs
    Added sample for action.cfm

  • How can I disable 1142N from providing IPv6 access ?

    subject says it all, I failed to find the command in configuration..

    Hi Andre,
    As per my knowledge, you cant disable from ur AP.
    Ipv6 is currently not support on any of the Cisco AP's in autonomous mode. However, they will be able to pass ipv6 traffic.
    May be newer IOS version like : Cisco IOS Release 15.2(4)JA supports IPv6 protocols
    Regards

Maybe you are looking for