ADF: Disable Menu

Hello everyone!
I'm using JDev11.1.2
The menu of the application has got 5 tabs (options). I try to disable the third one, since the pages are not ready yet. Actually, this menu is to be developed. I don't want it disappeared but disabled.
In the order_menu.xml I have disabled the group node and all item nodes, but I get the error: ADFC-02013: The ADF Controller cannot find metadata for activity 'orderAdvisory'
<?xml version="1.0" encoding="UTF-8" ?>
<menu xmlns="http://myfaces.apache.org/trinidad/menu">
<groupNode id="itemNode_orderRouting" idref="itemNode_orderAdvisory" label="Order Routing" disabled="true" >
<itemNode id="itemNode_orderAdvisory" label="Advisory"
action="abandon:adfMenu_advidory" focusViewId="/orderAdvisory"*disabled="true"* />
<itemNode id="itemNode_orderExecution" label="Execution"
action="abandon:adfMenu_execution" focusViewId="/orderExecution" disabled="true" />
</groupNode>
</menu>
Please advise
Thanks a lot!

can u try to set the activation for the corresponding taskflow inside the showdetailitem of the paneltab.. this has to be done in the taskflow
http://blogs.oracle.com/adf/entry/how_to_set_conditional_activation_to_taskflows
http://blogs.oracle.com/vijaymohan/entry/adf_bounded_taskflow_activation

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.

  • Opening pdf in ADF popup menu

    Hi All,
    I have big issue in opening a pdf file under ADF popup menu. currently, the popup menu is working fine and but i dun know how to load the pdf once the popup menu is loaded. I tried to put javascript code in <body> with "onLoad=...", however, i dun know how to load pdf from javascript.
    Any one has a good idea to get around this problem???
    Cheers,
    -T

    Hi!
    I would like to insert a pdf file into the database and then display it. Actually I do not know how to insert the file into the db nor how to extract it. I use a library (jpedal) to show the pdf and am able to represent a byte stream, but how do I get it?
    regards,
    Mario Udina

  • ADF navigation menu

    Hi,
    I downloaded this 11g rel 2 application for creating ADF navigation menu. On jdeverloper 11.1.1.5., I get some deployment problems. Any feedback are appreciated.
    http://download.oracle.com/docs/cd/E18941_01/tutorials/jdtut_11r2_43/jdtut_11r2_43.html
    <Unable to load descriptor C:\Documents and Settings\xxx\Application Data\JDeveloper\system11.1.1.5.37.60.13\o.j2ee\drs\MenuWebApp/META-INF/weblogic-application.xml of module MenuWebApp. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:161)
         at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
         at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
         at weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:324)
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:181)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationForAppDeployment(MBeanConverter.java:67)
         at weblogic.management.deploy.internal.MBeanConverter.setupNew81MBean(MBeanConverter.java:315)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.compatibilityProcessor(ActivateOperation.java:81)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.setupPrepare(AbstractOperation.java:295)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:97)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@86fa01d8(/LibraryRefs[[CompoundKey: adf.oracle.domain]])"
         at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:54)
         at com.bea.staxb.runtime.internal.RuntimeBindingType$BeanRuntimeProperty.setValue(RuntimeBindingType.java:539)
         at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType$QNameRuntimeProperty.fillCollection(AttributeRuntimeBindingType.java:381)
         at com.bea.staxb.runtime.internal.MultiIntermediary.getFinalValue(MultiIntermediary.java:52)
         at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType.getFinalObjectFromIntermediary(AttributeRuntimeBindingType.java:140)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:200)
         at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:169)
         at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
         at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:150)
         ... 27 more
    Caused by: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@86fa01d8(/LibraryRefs[[CompoundKey: adf.oracle.domain]])"
         at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:231)
         at weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl.setLibraryRefs(WeblogicApplicationBeanImpl.java:1440)
         at sun.reflect.GeneratedMethodAccessor257.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:48)
         ... 35 more
    .>
    <Oct 31, 2011 1:12:11 PM EDT> <Error> <Deployer> <BEA-149605> <Failed to create App/Comp mbeans for AppDeploymentMBean MenuWebApp. Error - weblogic.management.DeploymentException: Unmarshaller failed.
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:193)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@86fa01d8(/LibraryRefs[[CompoundKey: adf.oracle.domain]])"
         at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:231)
         at weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl.setLibraryRefs(WeblogicApplicationBeanImpl.java:1440)
         at sun.reflect.GeneratedMethodAccessor257.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         Truncated. see log file for complete stacktrace
    >
    <Oct 31, 2011 1:12:11 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1320081129102' for task '1'. Error is: 'weblogic.management.DeploymentException: Unmarshaller failed'
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:193)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@86fa01d8(/LibraryRefs[[CompoundKey: adf.oracle.domain]])"
         at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:231)
         at weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl.setLibraryRefs(WeblogicApplicationBeanImpl.java:1440)
         at sun.reflect.GeneratedMethodAccessor257.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         Truncated. see log file for complete stacktrace
    >
    <Oct 31, 2011 1:12:11 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'MenuWebApp'.>
    <Oct 31, 2011 1:12:11 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException: Unmarshaller failed
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:193)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@86fa01d8(/LibraryRefs[[CompoundKey: adf.oracle.domain]])"
         at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:231)
         at weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl.setLibraryRefs(WeblogicApplicationBeanImpl.java:1440)
         at sun.reflect.GeneratedMethodAccessor257.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         Truncated. see log file for complete stacktrace
    >
    Many Thanks.

    This might be the problem:
    C:\Documents and Settings
    Spaces in the directory is not really a good idea. You should modify it to some dir without spaces.

  • 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!

  • 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

  • ADF toolbar menu

    Hi,
    I developed a page with two different regions, one contains menu toolbar and banner section and another one contains body section. When I click on menu items body of page change, but I'm not able to change also the image inside banner section, how I can do this.
    Jdev 11.1.2.3
    Thk in advance.

    Hi Timo,
    following the code of my page:
    [code]
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <f:view>
            <af:document title="untitled4.jspx" id="d1" binding="#{backingBeanScope.backing_untitled5.d1}">
                <af:form id="f1" binding="#{backingBeanScope.backing_untitled5.f1}">
                    <af:panelStretchLayout id="psl1" binding="#{backingBeanScope.backing_untitled5.psl1}"
                                           inlineStyle="border-color:Black; border-style:solid;" topHeight="50px">
                        <f:facet name="bottom"/>
                        <f:facet name="center">
                            <af:panelGroupLayout id="pgl2" binding="#{backingBeanScope.backing_untitled5.pgl2}">
                                <af:image source="#{resource['images:banner-dashboard.jpg']}" id="i1"
                                          binding="#{backingBeanScope.backing_untitled5.i1}"/>
                            </af:panelGroupLayout>
                        </f:facet>
                        <f:facet name="start"/>
                        <f:facet name="end"/>
                        <f:facet name="top">
                            <af:panelGroupLayout layout="default" id="pgl1"
                                                 binding="#{backingBeanScope.backing_untitled5.pgl1}"
                                                 inlineStyle="border-color:Black; vertical-align:middle; text-align:center;">
                                <af:toolbox id="t1" binding="#{backingBeanScope.backing_untitled5.t1}"
                                            inlineStyle="border-top-style:solid; border-top-width:1px;">
                                    <af:menuBar id="mb1" binding="#{backingBeanScope.backing_untitled5.mb1}" flex="2"
                                                inlineStyle="height:40px; text-align:center; vertical-align:middle;"
                                                disabled="false">
                                        <af:menu text="menu 1" id="m1"
                                                 binding="#{backingBeanScope.backing_untitled5.m1}"
                                                 inlineStyle="width:100px; height:30px; background-repeat:no-repeat; text-align:center; font-weight:normal; font-style:normal;"
                                                 styleClass="GLOBAL">
                                            <af:commandMenuItem text="commandMenuItem 2" id="cmi2"
                                                                binding="#{backingBeanScope.backing_untitled5.cmi2}"
                                                                inlineStyle="width:200px;height:30px;" styleClass="GLOBAL"/>
                                        </af:menu>
                                        <af:commandMenuItem text="commandMenuItem 1" id="cmi1"
                                                            binding="#{backingBeanScope.backing_untitled5.cmi1}"
                                                            inlineStyle="width:200px; height:30px; vertical-align:middle; text-align:center; outline-width:thin;" styleClass="GLOBAL"/>
                                    </af:menuBar>
                                </af:toolbox>
                            </af:panelGroupLayout>
                        </f:facet>
                    </af:panelStretchLayout>
                </af:form>
            </af:document>
    [/code]
    Thk
    L-

  • Validating enabled and disabled menu bar in JInternalFrame

    hi,
    everybody.
    i have created a main window using JInternalFrame and JDesktopPane. The window has a menu bar in which document menu is used for closing the main window, while employee menu is used for adding new frame for the employee. while the login frame is displayed when the application is executed.
    my problem is, i want to validate that before login process, employee menu should be disabled, and after login is performed employee menu is enabled.
    the following is my code.
    please reply me as i am stucked with it.
    waiting for the reply
    thanks in advance.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    public class InternalFrameDemo extends JFrame implements ActionListener
    JDesktopPane desktop;
    public InternalFrameDemo()
    super("InternalFrameDemo");
    int inset = 50;
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setBounds(inset, inset, screenSize.width - inset*2, screenSize.height - inset*2);
    desktop = new JDesktopPane();
    setContentPane(desktop);
    desktop.setBackground(Color.white);
    setJMenuBar(createMenuBar());
    desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    createLogin();
    public JMenuBar createMenuBar()
    JMenuBar menuBar = new JMenuBar();
    JMenu menu = new JMenu("Document");
    menu.setMnemonic(KeyEvent.VK_D);
    menuBar.add(menu);
    JMenuItem menuItem = new JMenuItem("Quit");
    menuItem.setMnemonic(KeyEvent.VK_Q);
    menuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_Q, ActionEvent.ALT_MASK));
    menuItem.setActionCommand("quit");
    menuItem.addActionListener(this);
    menu.add(menuItem);
    JMenu employee = new JMenu("Employee");
    employee.setMnemonic(KeyEvent.VK_E);
    employee.setActionCommand("employee");
    menuBar.add(employee);
    JMenuItem additem = new JMenuItem("Add");
    additem.setMnemonic(KeyEvent.VK_A);
    additem.setActionCommand("add");
    additem.addActionListener(this);
    employee.add(additem);
    return menuBar;
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    if(str.equals("add"))
    System.out.println("Employee Form Invoked");
    createEmployee();
    else if(str.equals("quit"))
    quit();
    public void createEmployee()
    MyEmployeeFrame employeeframe = new MyEmployeeFrame();
    employeeframe.setVisible(true);
    desktop.add(employeeframe);
    try
    employeeframe.setSelected(true);
    catch(Exception e)
    public void createLogin()
    MyLogin loginframe = new MyLogin();
    loginframe.setVisible(true);
    desktop.add(loginframe);
    try
    loginframe.setSelected(true);
    catch(Exception e){}
    public void quit()
    System.exit(0);
    private static void createAndShowGUI()
    JFrame.setDefaultLookAndFeelDecorated(true);
    InternalFrameDemo frame = new InternalFrameDemo();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(800,600);
    frame.setVisible(true);
    public static void main(String a[])
    createAndShowGUI();
    class MyEmployeeFrame extends JInternalFrame implements ActionListener
    JFrame employeeframe;
    JLabel labelfirstname;
    JLabel labellastname;
    JLabel labelage;
    JLabel labeladdress;
    JLabel labelcity;
    JLabel labelstate;
    JTextField textfirstname;
    JTextField textlastname;
    JTextField textage;
    JTextField textaddress;
    JTextField textcity;
    JTextField textstate;
    JButton buttonsave;
    FileOutputStream out;
    PrintStream p;
    String strfirstname,strlastname,strage,straddress,strcity,strstate;
    GridBagLayout gl;
    GridBagConstraints gbc;
    public MyEmployeeFrame()
    super("Employee Details",true,true,true,true);
    setSize(500,400);
    labelfirstname = new JLabel("First Name");
    labellastname = new JLabel("Last Name");
    labelage = new JLabel("Age");
    labeladdress = new JLabel("Address");
    labelcity = new JLabel("City");
    labelstate = new JLabel("State");
    textfirstname = new JTextField(10);
    textlastname = new JTextField(10);
    textage = new JTextField(5);
    textaddress = new JTextField(15);
    textcity = new JTextField(10);
    textstate = new JTextField(10);
    buttonsave = new JButton("Save");
    gl = new GridBagLayout();
    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 3;
    gl.setConstraints(labelfirstname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 3;
    gl.setConstraints(textfirstname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 5;
    gl.setConstraints(labellastname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 5;
    gl.setConstraints(textlastname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 7;
    gl.setConstraints(labelage,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 7;
    gl.setConstraints(textage,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 9;
    gl.setConstraints(labeladdress,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 9;
    gl.setConstraints(textaddress,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 11;
    gl.setConstraints(labelcity,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 11;
    gl.setConstraints(textcity,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 13;
    gl.setConstraints(labelstate,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 13;
    gl.setConstraints(textstate,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 3;
    gbc.gridy = 17;
    gl.setConstraints(buttonsave,gbc);
    Container contentpane = getContentPane();
    contentpane.setLayout(gl);
    contentpane.add(labelfirstname);
    contentpane.add(textfirstname);
    contentpane.add(labellastname);
    contentpane.add(textlastname);
    contentpane.add(labelage);
    contentpane.add(textage);
    contentpane.add(labeladdress);
    contentpane.add(textaddress);
    contentpane.add(labelcity);
    contentpane.add(textcity);
    contentpane.add(labelstate);
    contentpane.add(textstate);
    contentpane.add(buttonsave);
    buttonsave.addActionListener(this);
    public void reset()
    textfirstname.setText("");
    textlastname.setText("");
    textage.setText("");
    textaddress.setText("");
    textcity.setText("");
    textstate.setText("");
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    System.out.println(str);
    if(str.equalsIgnoreCase("Save"))
    try
    out = new FileOutputStream("myfile.txt",true);
    p = new PrintStream( out );
    strfirstname = textfirstname.getText();
    strlastname = textlastname.getText();
    strage = textage.getText();
    straddress = textaddress.getText();
    strcity = textcity.getText();
    strstate = textstate.getText();
    p.print(strfirstname+"|");
    p.print(strlastname+"|");
    p.print(strage+"|");
    p.print(straddress+"|");
    p.print(strcity+"|");
    p.println(strstate);
    System.out.println("Record Saved");
    reset();
    p.close();
    catch (Exception e)
    System.err.println ("Error writing to file");
    class MyLogin extends JInternalFrame implements ActionListener
    JFrame loginframe;
    JLabel labelname;
    JLabel labelpassword;
    JTextField textname;
    JPasswordField textpassword;
    JButton okbutton;
    String name = "";
    FileOutputStream out;
    PrintStream p;
    Date date;
    GregorianCalendar gcal;
    GridBagLayout gl;
    GridBagConstraints gbc;
    public MyLogin()
    super("Login",true,true,true,true);
    setSize(400,300);
    gl = new GridBagLayout();
    gbc = new GridBagConstraints();
    labelname = new JLabel("User");
    labelpassword = new JLabel("Password");
    textname = new JTextField("",9);
    textpassword = new JPasswordField(5);
    okbutton = new JButton("OK");
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 5;
    gl.setConstraints(labelname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 2;
    gbc.gridy = 5;
    gl.setConstraints(textname,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 10;
    gl.setConstraints(labelpassword,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 2;
    gbc.gridy = 10;
    gl.setConstraints(textpassword,gbc);
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.gridx = 1;
    gbc.gridy = 15;
    gl.setConstraints(okbutton,gbc);
    Container contentpane = getContentPane();
    contentpane.setLayout(gl);
    contentpane.add(labelname);
    contentpane.add(labelpassword);
    contentpane.add(textname);
    contentpane.add(textpassword);
    contentpane.add(okbutton);
    okbutton.addActionListener(this);
    public void reset()
    textname.setText("");
    textpassword.setText("");
    public void run()
    try
    String text = textname.getText();
    String blank="";
    if(text.equals(blank))
    System.out.println("First Enter a UserName");
    else
    if(text != blank)
    date = new Date();
    gcal = new GregorianCalendar();
    gcal.setTime(date);
    out = new FileOutputStream("log.txt",true);
    p = new PrintStream( out );
    name = textname.getText();
    String entry = "UserName:- " + name + " Logged in:- " + gcal.get(Calendar.HOUR) + ":" + gcal.get(Calendar.MINUTE) + " Date:- " + gcal.get(Calendar.DATE) + "/" + gcal.get(Calendar.MONTH) + "/" + gcal.get(Calendar.YEAR);
    p.println(entry);
    System.out.println("Record Saved");
    reset();
    p.close();
    catch (IOException e)
    System.err.println("Error writing to file");
    public void actionPerformed(ActionEvent ae)
    String str = ae.getActionCommand();
    if(str.equals("OK"))
    run();
    loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    I realize this post is from a few days ago, but if you're still looking for help:
    This is my first thought on how to do this. Unfortunately, it's a bit messy. JMenuItems can be enabled and disabled but JMenus don't have this option...
    public class InternalFrameDemo extends JFrame implements ActionListener
        JDesktopPane desktop;
        JMenuBar menuBar;
        public InternalFrameDemo()
         setJMenuBar(createMenuBar());
         desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
         createLogin();
        public JMenuBar createMenuBar()
         menuBar = new JMenuBar();
         JMenu menu = new JMenu("Document");
         menu.setMnemonic(KeyEvent.VK_D);
         menuBar.add(menu);
         JMenuItem menuItem = new JMenuItem("Quit");
         menuItem.setMnemonic(KeyEvent.VK_Q);
         menuItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_Q, ActionEvent.ALT_MASK));
         menuItem.setActionCommand("quit");
         menuItem.addActionListener(this);
         menu.add(menuItem);
         JMenuItem additem = new JMenuItem("Add");
         additem.setMnemonic(KeyEvent.VK_A);
         additem.setActionCommand("add");
         additem.addActionListener(this);
         employee.add(additem);
         return menuBar;
        public void createLogin()
         MyLogin loginframe = new MyLogin( menuBar );
         loginframe.setVisible(true);
         desktop.add(loginframe);
         try
             loginframe.setSelected(true);
         catch(Exception e)
    class MyLogin extends JInternalFrame implements ActionListener
        JMenuBar menuBar;
        public MyLogin( JMenuBar menuBar1 )
         super("Login",true,true,true,true);
         menuBar = menuBar1;
        public void actionPerformed(ActionEvent ae)
         String str = ae.getActionCommand();
         if(str.equals("OK"))
             run();
             JMenu employee = new JMenu("Employee");
             employee.setMnemonic(KeyEvent.VK_E);
             employee.setActionCommand("employee");
             menuBar.add(employee);
             loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

  • How do you disable menu bar icons from being moved?

    The students at our school have discovered that if you hold down the Command key and click on certain menu bar items (such as the icons for Displays, Sound, Date & Time, Keyboard Layout, etc.) it is possible to move them around. It is also possible to drag them out of the menu bar and they disappear in the normal "puff of smoke" which you get when dragging items out of the Dock. Is there a way of disabling this nifty little feature, or at least of having it reset at login?
    We are using Workgroup Manager (XServe, OS X 10.4.8) to manage the setup of the student computers, and I cannot find a setting relating to management of the actions I have described. The problem is that we have enabled a Vietnamese keyboard layout. The students can select it when needing to type in Vietnamese in Word 2004, and then set it back to the normal layout (Australian, in this case). Occasionally they forget to set it back to normal. Then, if a student in the next class decides to command-drag the keyboard layout icon out of the menu bar, the Vietnamese layout either becomes the default (with no way for them to change it back) and/or sometimes "kicks in" without any discernible reason when trying to connect to the server, making logging-on a challenge (the layout re-maps some of the characters). Any suggestions would be appreciated. We have already tried enabling access to the "International" System Preference, but some students then go out of their way to add every keyboard layout (there are dozens of them!) and/or change the language settings - have you (as a mono-lingual person) ever tried to navigate through menus when they are in Chinese, Arabic, or Hungarian? We would like to be able to somehow "lock down" the icons which are displayed in the menu bar (top RH corner) so that they can not be deleted or, alternatively, re-appear at next login if they have been deleted.

    Go to Settings>General>Auto-Lock and set a longer interval.

  • 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.

  • Disabling Menu Options on New Button in Form Library

    In InfoPath form libraries on SharePoint online, I've noticed a new menu that now pops up when clicking the "new" button.
    I do not see a setting in the library to disable this. Is there a setting some place I'm overlooking?
    Thanks!

     The only way to remove them is customization.

  • How to disable menu bar and dock when playing a full screen game? Like sims 4

    i play sims 4 on my MacBook pro and if I go to close to the bottom of the screen or the top the menu bar or dock pops up I was wondering if there is A program or a setting I can use to disable that while in something full screen or gaming

    The game itself should already have the option for full screen. But you can go to system preferences dock and check the hid dock option. Then you would have to go to the very edge of the screen to get the dock to reappear.

  • 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...

  • Disable Menu on System Form( like Purchase Order)

    Hi,
             I need to Change status of  Menu on System Form. Is this Possible?
    I want to disable Print Preview(Menu UID "519") And Print("520")  Menu on System Form. Please reply ASAP...
    Thnx & Warm reg
    Deepak Gaur.

    Deepak,
    tehre are 2 ways
    1. capture the menuevent for thsi and set bubble event to false
    2. directly set the icon inactive (enabled false)
    preview is pval.menuid = 519
    print is 520.
      Dim oMenuItem As SAPbouiCOM.MenuItem
    oMenuItem = SBO_Application.Menus.Item("519")
    omenuitem.enabled = false

  • How can I disable menu animations

    Is there any way to disable gratuitous menu animations, such as the swooping down and rolling up of directory window when selecting the "Save As..." menu item?
    I would really like to do this for all applications running on 10.5. Is there a way to adjust Core Animations to disable annoying motions?
    Swooping, sliding, shrinking, and wiggling motions are cute once, then distracting, then annoying, then maddening. I struggle hard enough to stay focussed on my content. Stealing focus with animation is destructive.
    Thank you. I apologize if this is misposted.
    Message was edited by: Lawrence Jones1
    Message was edited by: Lawrence Jones1

    I think you would be better answered if you used the proper terms for your discussion topic. You're not dealing with 'menu' animations; what you are talking about is a feature of Mac OS X introduced in the very first version of the Aqua interface called a sheet. Sheets replaced the Open/Save dialogue in Mac OS 9.2.2 and earlier (what we collectively call Classic Mac OS).
    To 'disable' them is impossible as it is a part of the interface. However, software such as Onyx from Titanium Software can increase the speed at which sheets unfold, to the point that they appear to just 'appear', as I think is your desire.
    Simply install the software, launch it, cancel the SMART checkup and the startup disk check, and pick Parameters. Then, in the General chooser, change the speed of the sheets from the second drop-down list.
    Hope that serves you well.
    Message was edited by: zapzupnz

Maybe you are looking for

  • MacBook Pro 17" late 2009 - Black screen on boot, not even a grey screen

    Got a monstrous problem. Started up my MacBook Pro (bought in Feb. This year, core 2 duo 2.88GHz/4 Gb RAM - basically the top specced model.) Booted up today, no grey start-up screen. No screen at all. Yet I can still log into Snow Leopard, but again

  • How do I get music to stream to Apple TV from my macbook air with Mavericks

    Just bought a Macbook Air last week. I am very conversant with Apple TV and Macs.  I have two iMacs and stream music from them to Apple TV and it's fine. They are running Lion and Snow Leopard. My Air is running Mavericks. I open iTunes, enable Home

  • No Notification LED Light for Missed Calls Since Update

    I used to get a LED light notification when a call was missed. Now since the new "update" I no longer get the notification. Anyone else notice this? How do I get the LED notification light back?

  • User Exit in Purchase Order

    Hi, Can anyone tell me which User Exit is triggered, when one enters Material in the Purchase Order?? Also which Include contains the User Exit? I need it urgently... Thanks...

  • AD group nesting in OD groups failing

    So here is my setup. Lab with 10.5.4 clients. Xserve running 10.5.4. All users in AD. Xserve and clients bound to OD and AD. On clients AD is first in auth order. AD auth works fine. What works: I can control access to OD computer groups via login |