1 person found this helpful
If do you want to have the button permanent disabled, just create some new column (for example: ACTIVATE_IDC) in a table where you can store the value like 'Y/N': (default 'N') - create it like some hidden item.
Then create a dynamic action (DA) on button "Activate" - "on Click" where you can use two true processes:
1) PL/SQL update the column ACTIVATE_IDC to Y
2) Submit page with some request or some other processing you need
Crete another DA - "Page load" with condition when "ACTIVATE_IDC = 'Y'"
when true: Disable the button
Don't forgot set the Static ID for the button when needed.
When you run the page again, the button will be disabled now.
Sorry for my English
In my verison, to create a dynamic action (DA) on button is not available.
Do I need to choose DOM object?
Is so, then I need the button attribute value right which is always returning NULL to me..
How can be defined then?
I used the same version of APEX before. You can choose it to DOM object or by jQuery selector.
I didn't use the DA on button. Only on jQuery selector (#BTN_ACTIVATE).
I can provide some example on apex.oracle.com if do you need.
here is some example using jQuery selector:
Hi J, Sorry!!! I m not good in JQuery. But seen ur application. That is requirement. Pls explain me how to use JQuery selector. Thanks, vk.
When you inspect your button element via firebug or chrome or some other HTML inspector, do you see nay ID of the button ? or button name ?
If yes, you can use jQuery selector by: #BTN_ACTIVATE (BTN_ACTIVE is the button ID) or [name='BUTTON_NAME'] here is used the button name attribute instead of ID.
You can choose first option..
First try a simple test with Dynamic action like this.
DA : Event: Click
Selection Type : jQuery Selector
jQuery Selector: #BTN_ACTIVATE (or [name='BUTTON_NAME'])
As a true action set only the alert with some message. If the message appear, the selector is written OK. If not try to look at the jQuery Selectors
Don't forgot to set the when click button option - there is Submit page as default.
Thanks J. It works fine..
I have tried like this..
In button 'Active' - gave Button Attributes - name = 'Active'.
In dynamic action, defined the hidden item, if flag sets to 'Y' then 'DOM object' - 'Active' is disabled.
Thanks for ur timely help.