Apex - disable the button using PL/SQL code

Hi all

I use a PL/SQL code to get a DB value, depending on the value that I need to disable the buttons on the Page.

I tried code below

IF : P2_FLAG == ' not THEN

HTP.script ("document.getElementById ("SUBMIT") .disabled = false;", "Javascript");

END IF;

It is said screw the page saying - the/apex/f requested URL was not found on this server

I use Apex 5.0, please need your contributions.

Hello

However, if you want to show/hide the button, you can use conditions:

Open the properties of the button and put Conditions such as "Item = value '.

Point - P2_FLAG

Value - N

To turn on or off, you must run ajax with jquery to get the DB value before charge and then print button.

It may be useful

Sunil Bhatia

Tags: Database

Similar Questions

  • Disable the button Delete in the toolbar on EBS (Apps) Oracle using Custom pll.

    Hello

    I am trying to disable the button remove on Oracle Apps, I tried the following code, but it does not work. If the a person who has been able to do it please share.

    I tried this.
    begin
           
            if (event_name = 'WHEN-NEW-FORM-INSTANCE') then
                      app_special.enable('EDIT.DELETE', PROPERTY_OFF);
                       fnd_message.set_string('After APP_SPECIAL.ENABLE');
              
            end if;
      end;
    Thank you

    Hello

    Take a look at the following links.

    Custom.PLL
    Custom.PLL

    How can note: 561676.1 - I use SQL to disable a menu item?
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=561676.1

    Kind regards
    Hussein

  • Disable the button of the model

    Hello

    I m using Oracle 11 g and Apex - 4.0.2 version

    I m having a request to disable the button of the model based on the condition.

    Model name of the button 'enable '.

    Click the button for the first time he would execute a process and then it should disable the buttons.

    Is this possible?

    Kind regards

    VK.

    Hello

    When you inspect your via firebug or chrome or any other Inspector HTML button element, you see nay ID of the button? or button name?

    If so, you can use the jQuery selector by: #BTN_ACTIVATE (BTN_ACTIVE is the ID of the button) or [name = 'BUTTON_NAME'] is used instead of code name attribute here.

    You can choose the first option...

    First try a simple test with dynamic action like that.

    DA: Event: click on

    Selection type: jQuery Selector

    jQuery Selector: #BTN_ACTIVATE (or [name = 'BUTTON_NAME'])

    As a true action defined only the encrypted messages alert. If the message appears, the selector is written OK. If not try looking at the jQuery selectors

    Don't forget to put the when click the option button - send page by default.

    concerning

    J

  • disable a button using javascript

    Hi guys,.

    How to disable a button using javascript code?

    I used below the code, but its does not work any idea with this...
    document.getElementById('DELETE_BT').disabled = true; 
    My button key attributes is id = "DELETE_BT" .


    Thank you in advance

    Hello

    Try this:
    Use it in your JavaScript code.

    $('button[type="button"][value="Cancel"]').attr('disabled', 'disabled');
    

    It's a jQuery code I've tried on a button of the model with label/Alt text like "Cancel".
    which is used in above code * [value = "Cancel"] *.
    The normal deactivation mechanism with above methods do not work on the model function button
    as it is not built usinginternally in the ApEx, but using
    and that's why they don't have any idattribute.

    I hope this helps!
    Kind regards
    Kiran

  • Need to disable the button until all the elements of the array was posted

    Hello

    I get a lot of help from this Forum, thought about getting more out of it. I am very new to AS3 and to do my best to get as much as I can that are still a few problems to come through.

    I am trying to disable the button on a specific image until all the Clips of film in a table are bieng is displayed, otherwise it should show another clip from movie plurarite the message that all video Clips are not displayed.

    Here's the scenario-

    SUMMARY.

    There are three buttons on the stage, the next image button, button to load the 1st Movie Clip (note1), button to load the second film Clip (note2)

    I'm counting the Clips of film with the length of the array (I don't know if I'm doing things), but the idea is that once all the video clips are loaded, next picture button must be activated in the case otherwise he must remain inactive, rather would display another clip of film as notice that all Clips are not loaded)

    Here is my Code.

    import flash.events.MouseEvent;

    btnnxt.mouseEnabled = false;

    var note1:Mc_Notice1 = new Mc_Notice1;

    var note2:Mc_Notice2 = new Mc_Notice2;

    function next(Event:MouseEvent):void

    {

    if(Count.Length == 2)

    {

    btnnxt.mouseEnabled = true;

    nextFrame();

    trace ("mouse is on");

    }

    else {}

    btnnxt.mouseEnabled = false;

    }

    }

    notes of the var: Array = [note1, note 2, note3];

    var numbers: Array = new Array();

    btnnxt.addEventListener (MouseEvent.CLICK, next);

    btnload1.addEventListener (MouseEvent.CLICK, hearings1);

    btnload2.addEventListener (MouseEvent.CLICK, load2);

    function load1(Event:MouseEvent):void

    {

    addChild (notes [0]);

    Notes [0] .x = 100;

    Notes [0] there = 100;

    Count.push (1);

    trace ('Count' + count.length);

    }

    function load2(Event:MouseEvent):void {}

    addChild (notes [1]);

    Notes [0] .x = 100;

    Notes [0] there = 100;

    Count.push (1);

    trace (counting);

    count0 = 1;

    trace (count.length);

    }

    Please help in fixing this error that I do not receive the required results.

    Help, please.

    Best regards

    Part of the problem is that you try to count by clicking a disabled button to activate this button.  As long as the button is disabled you can not use it for himself.  Instead of adding an event listener to btnnxt immediately, just assign it when it is ready to be used.  Whenever you load you need to check the value of the counter and if it is equal to 2, then you can assign the event listener for the btnnxt.

    You do not have a (County) table for that since you're using only its length property... a simple integer value will suffice.

    As I do not see you create a variable named note3, you probably get an error for this.

    In your function load2 you always aim the remark 1 placement where it should be placed.

  • 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

  • Enable and disable the buttons depends on the connection of the user?

    How to enable and disable the buttons depends on the connection of the user?

    In fact I have a few buttons as remove, add, save, exit, it etc., zero page...

    depends on the user , I have to turn on and off specific keys.


    Thanks and respect,
    SKUD.

    Hi Skud,

    In fact Jeff's response are correct and handles the problem. I want to mention another way,

    Change the desired button > navigate to Conditions > Pick (exists SQL query returns at least one row) > Expression 1, enter code similar to the following:

    Select TOP (: app_user) where double UPPER(:app_user) in ('FATEH","MARY")

    Best wishes
    Fateh

  • Disable the buttons before webservice response

    Hello

    How to disable the buttons until the webservice response came, but when came the web service respone it will allow all the button

    can you give me any suggestions...

    Thank you

    Learning by doing. I've attached an example that does what you want to do, disable the buttons x, where x in this example is 5 seconds to activate the buttons and where x for you would be availability of webservice response.

    All what you need to do is:

    • Add ID to your buttons (see the example input elements I used)
    • Add the source to remove the attribute "disabled" of these buttons (see the example of function that I have documented)

    She's.

  • How can I disable the buttons next/previous slide show?

    Hi guys!

    I tried to play with a slide show earlier and wanted to change the colour or the next/previous buttons to image placement. But every time that you click on that it passes to the next photo! Is there a way to disable the buttons temporarily? It also appears that the buttons should be the same color for each photo. Am I wrong?

    Thanks in advance!

    Hello

    You cannot disable the buttons next and previous, you can hide them via the options menu flying if you want (select the widget > click the blue circle with the white arrow at the top right of the widget).

    However, even if the next/previous buttons will take you to another image, you can still change them, when they are selected, as the buttons remain same for all slides.

    In addition, the buttons should be the same color for each photo.

    It will be useful,

    Sonam

  • disable the button if the table is filtered

    Hello
    I have a command button and a table of the adf on a jspx page.
    I keep the filtering enabled for the table.

    My requirement is I have to disable the button if the table is filtered and as soon as table becomes 'normal' or a filtered ' I should activate this button.
    can anyone suggest a way to implement this use case?

    Thank you.

    Just add a listener of the request at the table that is called whenever the query is filtered. Detect if the filter criteria list is empty and refresh your button accordingly

    public void queryListener (QueryEvent queryEvent)
    {
    FilterableQueryDescriptor desc = queryEvent.getDescriptor ((FilterableQueryDescriptor));

    Card filterCriteria = desc.getFilterCriteria ();

    Refresh your button here.

    call listener default query to run the query
    Object query = JSFUtils.resolveExpression ("#{bindings.") MyROViewQuery}");
    (Query) .processQuery (queryEvent) (FacesCtrlSearchBinding);
    }

    to avoid using the class FacesCtrlSearchBinding uses the example of
    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/30-table-filter-queries-169172.PDF

    () invokeMethodExpression
    "#{bindings." DepartmentsView1Query.processQuery} «»
    Object.Class, QueryEvent.Class, queryEvent);
    }

    Published by: Don Kleppinger on June 4, 2013 12:02

  • Disable the button Save all the time

    Hello! I want to have a form that is with button "DISABLE" save all the time. When I put this code below into the trigger once - new - form - Instance:
    Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;  
    first of all, it's disable, but when I click the "RUN" button, the "Save" button is again enable. My question is where I must put the code above to disable the button Save all the time.

    TX in advance.

    indoracle wrote:
    Hello! I want to have a form that is with button "DISABLE" save all the time. When I put this code below into the trigger once - new - form - Instance:

    Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;  
    

    first of all, it's disable, but when I click the "RUN" button, the "Save" button is again enable. My question is where I must put the code above to disable the button Save all the time.

    TX in advance.

    Hello
    Is there another code in the form to activate this?

    Try the code at the moment-new Record Instance to the block level.

    Hope this helps.

  • Disable the button Archive in the custom Viewer

    Hello

    Does anyone know if it is possible to disable the button to archive in the custom viewers? I'm building a custom Viewer to be pre-installed on certain Android tablets for my users that wil Somphone software use to limit the use of the tablet to a few parameters and select applications. My concern is that if a user taps on then archive in my application they wil not be able to download the folio again due to the restrictions of the device, so disabeling the button archive would be the answer.

    I just request if this is an option, or even possible. We use a professional account DPS.

    Thanks for any help.

    John.

    You cannot delete the Archive button in the standard library.

    You can rename the button Archives using the option of custom in DPS App Builder strings, but I don't know if it will help in your situation.

  • Disable the button 'Start my camera' by default for rtc WebcamPublisher

    Hello

    I notice in the samples that webcam shows the cam. Is there an easy way to disable the button 'start my camera? " I want to this control of the application itself.

    <rtc:WebCamera width="65%" height="396" id="webCamPub"/>

    I noticed in the webcam sample realizes remove the button 'Start my camera' by default, giving the RTC webcam a width and a height of 1 and manipulation using the WebCamPublisher class, but I don't see anywhere a 'button' = disabled or something similar.

    Hello

    In situations like this, we recommend that you build your own

    a user interface customized using the WebcamPublisher / WebcamSubscriber. He got all the

    same features as the webcam pod, but with a LOT more flexibility.

    Nigel

  • disable the button in the current state

    Hello world

    I am new to catalyst, so my question may seem stupid probably ;-)

    I build a small site in PS CS4 one try to bring it to live in the catalyst. My problem is the folloing:

    How can I disable a button in the selected state?

    I can configure the appearance when it is disabled, but cannot find an option to disable the button.

    «for example, when I clicked 'links' - button, it must be disabled (and watch in a special way) until I choose another State and leave the links ' States '.»

    Thank you

    Hey dm.

    Without seeing the layout of the fxp/how the custom button is configured, it is sometimes difficult to provide the right steps!

    Hopefull this post will clarify a bit my last.

    Regarding the change of the State of the button when you go to the States, it is indeed easier by checking a box in the properties panel.

    (1) navigate to the State in which you would like the button disabled (or enabled).

    (2) in the properties panel, in the common section, see the box "enabled."

    (3) check it so that a button is enabled (in the normal state) in that State. Clear the checkbox to make this option disabled in this State.

    To make sure you have the right look, double click on the button.  You should now see four different States, which is a disabled"" State.

    Check to make sure that the button looks like as you wish in the disabled state.

    Using this strategy, navigate to a State and by setting the property enabled in the properties panel, you reach the look you're looking for?

    I'm always kind of unclear on the button click/No seeing the disabled look?

    Perhaps what you are looking for, is to add an interaction to the button, such as "click", in order to move from one State in particular, to another second particular State?  In which case, in the second State the button is disabled?

    If you could clarify that would be awesome?

    Or, if you feel you could post/send me your fxp so I can measure the best approach.

    Let me know how it works for you, and if the enabled checkbox is indeed what you are looking for.

    Tara

  • How to enable and disable the buttons on the table

    Hello

    My requirement is that I need to activate or disable the button on the table, if there is no result then I need to turn off the button other wise, I need to activate the button.

    I drag the primary key field on the page as an entry filed the false set visiable page abandoned and set the partial trigger as table and disable button is

    Disable = ' #{bindings. " AuthorizationNumber.inputValue not 'null'}', but the button is still crippling it allows not when I have data.

    where I am doing wrong?

    Note: this view is read-only view, I can't use undo disable features here.

    Published by: user5802014 on May 22, 2010 12:36

    Try the following:

    * Disable = ' #{bindings. " AuthorizationNumber.inputValue == null} "*"

    This will disable the button when the AuthorizationNumber is null.

    You can also use the current row of the iterator:

    * Disable = ' #{bindings. " YourIterator.currentRow == null}. "

    Nick

Maybe you are looking for