Disable Button when no rights to enter Form

I have a form which i can open from another form with use of a button.
The problem is:
One of our users have the rights to enter form1 on but not to enter form2 through menu. But on form1, i have a button to goto Form2.
Now i want to know how to disable this button when she enters form1. We tried to use a get_menu_property procedure. Does anyone knows a code to disable a button.
Our code is:
PROCEDURE Toggle_Enabled( consultant_profielen VARCHAR2) IS
mi_id MenuItem;
BEGIN
mi_id := Find_Menu_Item( consultant_profielen );
IF Get_Menu_Item_Property(mi_id,ENABLED) = 'TRUE' THEN
Hide_button('consultantprofiel');
ELSE
Null;
END IF;
END;
This code doesn`t work, anyone know how it will work.
Thanks,
Vincent

set_item_property on the button should do it. check the online help

Similar Messages

  • Disable button when user clicks

    Hi.,
    I am using jdev 11.1.5
    I need to disable button when user clicks the record which contain the value 'No'
    My scenario
    Id          Value
    1            Yes
    2            No
    3            YesThe button should get enabled for the first record which contain value 'Yes'
    In the above table the button should get enabled for
    Id        Value
    1          Yes          //while user clicks the record button must enabledfor 2 and 3 the button must be disabled
    could any one pls help me

    Hi,
    First get the selected value in bean and set it to String attribute,in your value change listener.
            public void customVLC(ValueChangeEvent valueChangeEvent) {
              //write code to get selected value
              this.selectedValue = "No";//Depend on your selected value on above
              AdfFacesContext.getCurrentInstance().addPartialTarget(getCbButton());//Bind button to bean and get UI here to refresh
       private String selectedValue;
        public void setSelectedValue(String selectedValue) {
            this.selectedValue = selectedValue;
        public String getSelectedValue() {
            return selectedValue;
        }in page put as
    disabled="#{YourBean.selectedValue eq 'No' ? true : false}"Here selectedValue keep the state for disable and enable the button
    I hope above information enough to resolve the issue..

  • Shutdown button when i right clik @ desktop

    Plz help me out .... I want to add option of shutdown button when i right clik @ desktop and dialog box appears in this dailog boz i want to direct shutdown option button plzzzzzz heeellpppppp!!!!
    Moderator Note; subject edited.

    This site shows you how to modify the desktop context menu to include power and other options: http://www.eightforums.com/tutorials/5215-power-add-cascading-desktop-context-menu-windows-8-a.html

  • Disable button when no records in multirecord block.

    Hello,
    In a tabular multirecord block we have a button that will open another window for the selected row. The problem is that when there are no records in the multirecord-block, the first line is still selected, and the pushbutton is enabled. This will cause an error when the user press the button when there are no records. Adding code to the button will of course take care of the error, but it is still enabled. How do we disable the entire line when there are no records?

    how about - directly after querying the master record...
    go_block(<block>)
    if :blk.key (or :blk.rowid) is null then
      SET_ITEM_PROPERTY('<buttonname>',enabled, property_false);

  • How do I hide a button when certain data is entered in other fields?

    I'm working on a tax form in which I need the user to select the filing period and enter their Fed ID before the form will print.  I have a button using an icon message which will cover the form except the title area.  This button is set as "hidden but printable" which I want to be just "hidden" once the required data is input.  Required data would be a check-box for the reporting period, and a 9-digit field for the Fed ID.  On one of my forms, selecting the reporting period enters the appropriate month names (January, February, ...) into the form so the user will know which month's data goes where.
    I'm using Adobe Acrobat XI.  I have learned a little bit about JavaScript, but this issue is eluding me.
    Any assistance is greatly appreciated.

    Hi,
    I try to hide a column with CSS like this, you can refer to the selector and apply it to your script:
    Feel free to reply if this is not what you need or there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Disable button when text field is empty

    Hi
    How can I disable a button in JDialog box when the text field is empty and enable it when the user gives some input.
    Balaap

    You will have to use a keyListener since the use is not able to type into a disabled TextField. Listen for KeyEvents, if you get one enable the TextField a fill it with the char of the pressed key.
    Rommie.

  • How to disable buttons when another button is clicked

    I have an application with 5 buttons that each play or pause
    different movieclips. How can I prevent other buttons from playing
    different movieclips when a movieclip is already playing.

    I looked in the help and found an example actionscript. I
    changed the button instance names to the button names in my app. I
    put the actionscript on frame 1 that holds the movieclip being
    played. Here it is
    mycase3_btn = true;
    mycase1_btn = false;
    mycase2_btn = false;
    //button code
    // the following function will not get called
    // because myBtn2_btn.enabled was set to false
    mycase1_btn.onRelease = function() {
    trace( "you clicked : " + this._name );
    mycase2_btn.onRelease = function() {
    trace( "you clicked : " + this._name );
    mycase3_btn.onRelease = function() {
    trace( "you clicked : " + this._name );
    It doesn't disable the other 2 buttons. As may be obvious I
    am new to all but the simplest actionscripts. What am I doing
    wrong?
    thank you for your time!

  • Why would iPad mini disable itself when correct passcode is entered?

    My daughter's iPad mini disabled itself even though an incorrect password was never entered? It started with a 15 minute lock out followed by 30. At some point it went to a 60 minute lockout and after a half hour or so reverted back to 60 minutes for no reason. I finally got my hands on it and after the 60 minute clock expired I correctly entered the first three digits of the passcode and the iPad promptly disabled itself for good. This makes no sense. I'm aware of the restore drill.  What I want to know is this: Why did this happen and is there some sort of Hail Mary play that will prevent a complete restore.

    Did you reboot the router?
    If that doesn't work, test it... will it connect to a public router (wifi) like in a bookstore or public area?  If it works, then the problem is with your router.

  • Adding a button when a system form is opened

    Hiya, I'm trying to add a button to a system form in vb.net.  For some reason when i run my code the button will add to the form succesfully only when I have that form open in SAP.  If the form isn't open I get the error 'Form - Not found'  Can anyone show how to just add the button when the user opens the form rather than the button appearing from the form being already open. 
    My code is like this:
    Private Sub SBO_Application_ItemEvent(ByVal FormType As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Select Case pVal.EventType
                Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
                    If pVal.FormType = 152 And pVal.BeforeAction = False Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And Not pVal.BeforeAction Then
                            CreateMySimpleForm()
                        End If
                    End If
            End Select
        End Sub
    Public Sub CreateMySimpleForm()
            Dim oItem As SAPbouiCOM.Item
            Dim oButton As SAPbouiCOM.Button
            oForm = SBO_Application.Forms.GetForm("152", 0)
            oItem = oForm.Items.Add("51", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 88
            oItem.Width = 95
            oItem.Top = 558
            oItem.Height = 21
            oItem.FromPane = 24
            oItem.Visible = True
            oButton = oItem.Specific
            oButton.Caption = "View Document"
            oForm.Visible = True
            oForm.Update()
        End Sub
    Any help would be appreciated

    ok guys I've solved the problem.....this code adds a button to the Open Items List and its in vb.net
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If ((pVal.FormType = 152 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                    Try
                        oItem = oForm.Items.Add("ViewDocBtn", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                        oItem.Left = 88
                        oItem.Width = 95
                        oItem.Top = 295
                        oItem.Height = 21
                        oItem.Visible = True
                        oButton = oItem.Specific
                        oButton.Caption = "View Document"
                        oForm.Visible = True
                        oForm.Update()
                    Catch
                        SBO_Application.MessageBox("button not added")
                    End Try
                End If
            End If
        End Sub

  • To click submit button when I press Enter

    I want to activate my SUBMIT link(not button) when I press the "ENTER" button in my Key board. I am using Struts.
    Message was edited by:
    ashish.0532
    Message was edited by:
    ashish.0532

    You have to use javascript to do this. Most browsers only support default buttons, not links.

  • How to disable buttons in ADF form so it can be reused

    I would like to reuse the same Human Task ADF form for multiple User Activities in the same BPM 11g process definition.  The only difference between the User Activities in the process are the outcomes (buttons) allowed.  For example, in some User Activities, the outcomes allowed are APPROVE and REJECT.  In others, it might be APPROVE, REJECT, and REPROCESS.  Is it possible to hide, or disable, buttons in a Human Task ADF form based on some settings done in the User Activity, or something passed to the Human Task ADF form?
    I started digging, and I see in the jspx file for the form, there is an attribute named "visible" that is set as follows on the button:
    <af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
                           text="#{wf:getResourceValue('APPROVE', 'bindings.customActions')}"
                           disabled="#{!bindings.APPROVE.enabled}"
                           action="#{invokeActionBean.invokeOperation}"
                           partialSubmit="false"
                           visible="#{wf:isCustomActionAvailable('APPROVE', 'bindings.customActions')}"
                           id="ctb2">
        <f:attribute name="DC_OPERATION_BINDING" value="bindings.APPROVE"/>
    </af:commandToolbarButton>
    So if I can figure out a way to pass flags to the form, and then use those in the setting of the "visible" flag, would that do it?  Is there a better method?
    Thanks,
    Joe A.

    Set the binding to the button in the managed bean based on the input form parameter. For example if parameter value is paramValue1
    <task-flow-definition id="sourceTaskflow">
      <input-parameter-definition>
          <name>inputParameter1</name>
          <value>#{pageFlowScope.paramValue1}</value>
          <class>java.lang.String</class>
       </input-parameter-definition>
    </task-flow-definition>
    Set binding to not enabled.
    #{!bindings.CreateInsert.enabled}
    Some relevant references
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
    Using Parameters in Task Flows

  • Trigg the 'Query' button when pressing 'Enter' on the keyboard

    I have a form with 2 buttons, 'query' and 'reset'.
    I would like that the 'query' button is triggerd (pressed) when the user presses 'Enter' on the keyboard. In regular html I think this is accomplished if the button is a 'submit' rather than a 'button' type, but I haven`t found a way to edit the
    type of button in Portal.
    Users belive it`s very annoying to have to move the mouse over the 'query' button to execute the query, and would rather like to just press 'Enter'.
    I`ve tried to use a javascript (onKeyPress), but if you make a javascript in Portal, you`re not allowed to add this to your button, only as an 'form-' or 'field validation' in a textbox.
    Is there anyone who knows a way to get this functionality?
    Regards,
    Orjan

    One of the AVG add-ons for Firefox has been reported to cause that to happen. Disable that add-on until AVG fixes it.

  • Firefox 29 When I right click to open in a new tab, the tab will open but it will be a blank page. Tried Firefox Safe Mode & with Ad On Disabled Nothing

    When I right click to open in new tab, the new tab will open but the page is blank. I have tried it in Firefox Safe Mode & with Add Ons Disabled, still doesn't work.

    Hi UKBlue,
    Is your new tab page set to about:blank? You can change this from the about:config page or you can restore defaults by resetting Firefox.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
    '''Note''': ''This will cause you to lose any Extensions and some Preferences.''
    *Open websites will not be saved in Firefox versions lower than 25.
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • How to disable save as option in forefox when we right click on the image?

    Hi Folks,
    Can somebody help to disable save as option when i right click on the image which is showing in the browser.

    Hi,
    '''sorry,it is impossible by code'''
    you can use addons.
    or
    you can disable while developing webpage using:
    <script language="javascript">
    document.onmousedown=disableclick;
    status="Right Click Disabled";
    Function disableclick(event)
    if(event.button==2)
    alert(status);
    return false;
    </script>
    Regards
    '''Deepak Krishnan'''

  • How to disable 'Save' button when OAF and XML Publisher integrated...URGENT

    Hi,
    I am new to the OA Framework and XML publisher. I have been working on a requirement where I am designing a new page in Manager Self Service with few fields and a submit button. Also designed a RTF template in XML publisher to display the output in PDF format.
    When the details are entered on the page and click on 'Submit' button, the PDF will Open with the data populated. This is working perfectly... thanks to the forum.
    But my issue is: When the submit button is clicked, it displayes a dialog box with Open/Save/Cancel options and if I click the 'Open', the PDF will be opened. But my client is a retail client and they don't want store managers to save this PDF so either I have to skip this dialog box and directly open the PDF or I have to disable the 'Save' on the dialog box.
    Gurus -- Please help me how to achieve this. This is very urgent
    Below is the piece of code I am using in the controller to generate the PDF.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    APP_NAME,
    TEMPLATE_CODE,
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    inputStream,
    TemplateHelper.OUTPUT_TYPE_PDF,
    null,
    pdfFile);
    Thanks in Advance,
    Naren

    Frank, thanks for the update.
    But do you want me to try ControllerContext.getInstance().getCurrentViewPort().isDataDirty(); in button disable property?
    I have written one method in my am like
    public boolean isTransactionDirty(){
    return getDBTransaction.isDity();
    and exposed that method to client side and i try to use this method in my button disable property as
    disable#{bindings.isTransactionDirty.execute} but this is not working.
    Thanks

Maybe you are looking for

  • I need to unregister my

    I need to unregister my phone # from imessage. How?

  • How i can create scrollable table in indesign interactive PDF?

    I am trying to create dynamic table with the help of indesign script and render content on table using xml file, but when xml content is more and more then situation is that content out of doc and not show able when  i export document as interactive

  • Planning getting hanged when i change a member hierarchy

    Hi, When i try to change the hierarchy of a member by cutting and pasting it or through outlineload.cmd, planning is getting hanged. I get java heap space error. We have set the intial and max heap size in the registry as 1. Initial heap size = -Xms1

  • My Sony Vaio Model PCG-61611L LED Green Light Turns on but nothing else happens

    When I turn on my Sony Vaio Model PCG-61611L, the green LED light goes on, but nothing much happens. The laptop is from 2010 and is never abused, so I do not know what has happened. It just started doing this on occasions and now I can't turn it on a

  • Soundbooth CS4 input question

    Help!!! I'm trying to export audio from my analog mixer through a Canopus ADVC-110 analog to digital converter box which outputs via firewire to my MAC G5. I've tried the various hardware preference settings in Soundbooth but so far I have not been a