MKS
MKS

Reputation: 59

same dynamic action for multiple buttons APEX 5.0

I have a apex report page where there are multiple submit buttons for each region of charts display. Each submit button is supposed to have same dynamic actions- the dynamic action is supposed to run if user does not selects any data so an error message will pop up and this dynamic action I want to work for all the buttons, so instead of adding dynamic action which is common for every button , I want to define it somewhere in the code so that it can be called during click of any button. How this can be done?

Upvotes: 2

Views: 1877

Answers (2)

Boris Girsch
Boris Girsch

Reputation: 11

What you can do is assign the same CSS class to all the buttons you want your dynamic action to fire on. Let's say you assign a class .mybutton to all the buttons in your chart regions.

Second create your dynamic action.

Event: Click
Selection Type: jQuery Selector
jQuery Selector: .mybutton

Define the condition if you need to. Go on with Action etc.

So now your dynamic action will be fired whenever the user clicks on a button with the .mybutton class.

If you need to identify each button by ID when clicked and your action is Execute JavaScript Code, you can use thisTriggeringElement.id.

Upvotes: 1

Chaitanya Kotha
Chaitanya Kotha

Reputation: 476

For the particular Dynamic Action, in Condition region, under Condition Type you can select Request is contained within Expression 1 and give your request(button request) in Expression 1

Upvotes: 0

Related Questions