This content has been marked as final. Show 5 replies
Dila wrote:What will be selected with jQuery Selector +.checkLimit+ ? Is it APEX Button or Link or What-else?
my problem is, i have a dynamic action with true action "confirm" but if i click "cancel" the page is still submitting.
selection type: jquery selector
jquery selector: .checkLimit
true action: confirm
so, if the user clicks "cancel" i want to abort and NOT to submit . please help !!
Do you have any other D.A. that will fire when you click elements with class checkLimit?
.checkLimit is a button. the function isPULimitReachedForAll() checks if the value in a textfield is > than 9.
if yes, the true action fires where i can choose if the page has to be submitted or not. if not(click cancel) , it is submitting, but i want to cancel
i'm using 4.2.1.00.08
and the problem is happening in chrome and internet explorer
If your button is a button that submits, then unless you have defined your DA as 'Before Page Submit' (which you haven't), then the submit will still proceed, as you have found. There is also a problem with use of 'Before Page Submit' in APEX 4.2.1, which I will come onto. Therefore, I believe you should try the following:
1) Change your button to be 'Defined by Dynamic Action'.
2) Add an additional action to your DA, that fires after your 'Confirm' and does a 'Submit Page'. Set the 'Request / Button Name' to the name of the button (this ensures your page processing still work the same as before, and also by setting the request value equal to the button name, the button's 'Exexute Validations' property is respected).
If the user cancels, DA processing will stop and the submit will not proceed, if the user confirms, then DA processing continues and therefore the submit will proceed.
Theoretically, there is an alternative approach to this as mentioned earlier, where upon you could stick with a button that submits, and then utilise the DA's 'Before Page Submit' event type, where upon a cancelled 'Confirm' defined in a DA using that event would also prevent page submission. However there is a bug with IE and Firefox in 4.2.1 (fixed in 4.2.2), that means the page will incorrectly redirect to a blank page just showing the text 'false' on cancel. So I would stick with the approach outlined above for 4.2.1.
Hope this helps.
PS: Is your button a standard APEX button? If so, I would switch your DA When declaration to just select 'Button' and then select your button. This will be faster than a full page class selector and a cleaner approach, because you can just the built-in capability of APEX and are not reliant on a class to identify a single button.
Edited by: Anthony Rayner on May 2, 2013 11:14 AM