How to disable the button submit when running

Hello

I create a page with buttons createEmployee, deleteEmployee and updateEmployee employee management.

I want to disable the buttons send above if the user is "OPERATIONS".

My code as follows:

String userName = pageContext.getUserName ();

{if ('Operations'. Equals (username))}
OAPageLayoutBean page = pageContext.getPageLayoutBean ();
page.prepareForRendering (pageContext);
OAGlobalButtonBarBean buttons = (OAGlobalButtonBarBean) page.getGlobalButtons ();
OAGlobalButtonBean button = (OAGlobalButtonBean) buttons.findIndexedChildRecursive ("CreateEmployeeButton");
button.setDisabled (true);
}

but he throws NullPointerException.

For this code, I guide the OAF Dev R12.

can you explain what is function_name in the next line

Button OAGlobalButtonBean = (OAGlobalButtonBean) buttons.findIndexedChildRecursive ("< function_name >");

I tried with the id of the button, but I didn't work.

Can you explain about this clearly.

Thanks in advance,
SAN

Hello

I think that your button on the page is in the region of pageButtonBar.

Use code below.

String userName =pageContext.getUserName();

if("OPERATIONS".equals(userName)){
OASubmitButtonBean button = (OASubmitButtonBean) webBean.findChildRecursive("CreateEmployeeButton");
if(button!=null)
{
    button.setDisabled(true);
}
} 

Kind regards
GYAN

Tags: Oracle Applications

Similar Questions

  • How to disable the backup works when you print an email?

    How to disable the backup works when you print an email.  Whenever I try to print an e-mail, save it as a PDF is displayed.  I then have to save, then open the file to print.

    Hello

    Thanks for posting your query on the Microsoft Community.

    To disable this feature, you need to uninstall Adobe reader and then check if still back you the question quickly.

    Kind regards

    Jesinta Rozario

  • How to disable the autostart (application) when restarting the server managed?

    Hi Ppl,

    How to disable the autostart (application) when restarting the server managed?

    I want that some apps do not stay started. In WebSPhere, we have an option to disable auto-start for the application.

    I don't find in weblogic.

    Thank you

    You can force stop the application before you restart the server.

    -Faisal

    http://www.WebLogic-wonders.com

  • How to disable the button create and edit button in IMPORT environment for all the modules of 6.1.1.1?

    Hi all

    I am trying to disable some built-in options for all modules as well as all users in paragraph 6.1.1.1.

    How to disable the button create and edit button in IMPORT environment for all the modules of 6.1.1.1.?

    Please help me solve this problem.

    Thank you

    Nefertari

    Thank you Ivy, Yes.

    I made some changes more in environment settings that helped me to turn off the button the user create a user/edit.

    Thank you

    Nefertari

  • How to link or to disable the button submit virtual keyboard in blackberry 10 webworks?

    Hi all

    I developed Blackberry 10 Web application using Ripple emulator and Blackberry Webworks SDK 1.0.4.11.In that I am faced with the question of the connection... While the virtual keyboard-click submit button... it will not validate the credentials and without validating it goes to the actual page... So, how to validate or disable the virual submit button 10. Please Blackberry keyboard me... Thanks in advance.

    Kind regards

    Marimuthu_P

    Hi Mc Donald,

    You are using a

    element in your application with a built-in element
  • How to disable the button after the first click (click multiple problem)

    Hello

    I have a ' create' button related to processes of insertion in the database view. The problem is that when I click on him twice, I have two insertion in my database (even with the option run processes: "Once a visit to Page"). Is it possible to disable the button after the first click? and activate on load before the header?
    or maybe there's better solution? I thought that the process of the option run must stop multiples (insertion).

    Przemek

    Przemek:

    You can do the following.
    (1) set the "button"style"of the 'Create' button to be 'Button HTML'"
    (2) set the "key Attributes" have
    ID = "myButton".
    (3) in the "optional Redirect URL" section set to 'Target' ' "URL".
    (4) for the URL, specify {code}
    JavaScript: $x('myButton').disabled = true; doSubmit ('CREATE') {code}

    CITY

  • Tecra A10 - how to disable the fingerprint reader when it is docked

    Hello

    I use a Tecra A10 with a 2 Express Port Replicator.
    How can I disable the fingerprint reader when it is docked and still use it when undocked?

    Thanks for your help

    Hello

    As far as I know that something like this is not possible.
    Following this logic, it will be possible to have access to protected files when the laptop is on docking station.

    Either you use fingerprints or not.

  • How to disable the button called auto reset XP pro. After closing it restarts auto.

    How to disable the automatic reset button in windows xp pro. On the closure of this computer goes out, but then restarts auto in minutes. Thank you, john

    Tried the remedies without results. I would appreicate help.

    Thank you john

  • Disable the button "submit" after the presentation

    We have a form that we distributed to multiple users. The shape is defined so that presentations go to a predefined server location. The problem is that some users submit the form several times (don't know why). Maybe they do not notice the message that says 'submit form '. In any case, we want to disable the button send after submitting the form (even it is only for this "session"). I know that once the form is closed and reopened the button works again, and that's ok. If anyone has any suggestions I would be grateful. Thank you.

    Hello

    Modify the script above to:

    This.Access = "readOnly";

    your submit button will be set to read-only.

    Regards-

    Chalukya

  • How to disable the right panel when opening a document?

    When I open a document in 9.2007 there is this annoying Panel on the right side of the document that presents itself.  I always have to hide it, but it will come if you open another doc (in the same Instance of player)... a new tab.

    Do not know what is called the Panel, but here are the buttons that appear:

    PDF export

    Create a PDF file

    Change the PD
    Comment

    Fill & sign

    Send for Signature

    Sending / track

    How can I disable this so that the Panel is not displayed everytime I open a doc?

    Hi discoBallz,

    Please visit the following link and know about the ToolPane permanently in the drive of DC of masking:

    Hide the tools constantly Panel in Acrobat and Acrobat Reader DC

    Hope that helps.

    Kind regards

    Ana Maria

  • How to disable the ghosting effect when moving windows

    original title: trail window Disable

    In Windows XP, how do disable you the window trail?  In other words, the outline of the window when you drag.

    Go to control panel | Mouse. Probably in a tab as the pointer Options, you will find a trail of pointer option, you can uncheck.

  • How to disable the button to remove the application.

    I want to implement a feature to disable a button Delete a particular application so that the user can not remove it applications.

    How can I implement this.

    is not possible

  • How to put the button submit as Checked

    Hello

    I need to adjust my login button submit as Checked. for the HTML input tag we have checked attribute, but in our jspx for command button how to put this button that checked.

    Someone can help me.

    you mean enter button don't call action?

    Move your af:form from the top of the jsf to your input fields all about; defaultCommand here is your id of the button.





  • Satellite P500-127 - how to disable the buttons of enlightenment?

    Hello

    I ve bought the Satellite P500-127, but I m protruding on the buttons on the left side of the keyboard. I Don t know the exact term for this button. So, does someone knows how to deavtivate them?

    Thank you.

    Hey,.

    Please check this thread:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=55505

    The same question but with answer ;)

  • How to disable the home page when popup is opened?

    Hello

    With the help of Jdev 11.1.2.3

    I have two buttons on each row in a table that open pop-up windows.

    If I open one of them (say p1), I can still click on the page and open the other popup (p2). In this case, two pop - up is open on top of the other which is a mess.

    So my question is: is there a way to prevent the user to click on the page, while a popup is open?

    Also, one of the popups (p1) launches a btf where very probably other popups will be open also (different from p2), so I would like to prevent the user from clicking anything on the page for the duration of the taskflow.

    Thank you!

    MB

    Hello

    1 - can you use a dialog inside your popup? In my view, using a dialog box, you disable the rest of the page.

    2 - you can create a link for each popup variable. The attribute, then disable/measure the other button based on this variable, then using events setPropertyListeners and popupClose to set true / false.

    Concerning

Maybe you are looking for