Display Modal Pop-up window during controller action execution - asp.net-mvc-3

I have a controller action, which during its HTTP Post action, should display a Modal Pop-up window during a certain business condition.
It is basically a Product terms and conditions pop-up, which the user should accept to continue with the execution.
Any suggestion on how to implement this pop-up ?
Once the user accepts the terms and conditions, the execution should continue
Is it possible in the same controller action ?
Any suggestion would be of great help.
Thanks in advance

Related

NGXS ofActionSuccessful

I have an angular component that subscribes to ofActionSuccessful. This action is dispatched as the user clicks on a button on the page. It is possible that the user may click on this button multiple times resulting in multiple dispatch events for this action
this.actions$.pipe(ofActionSuccessful(UpdateCommunicationPreferences)).subscribe(() => {
console.log('Action Successful');
});
this.store.dispatch(
new UpdateCommunicationPreferences(this.communicationPreferenceForm.value)
);
The issue that I am running into is ofSuccessful is triggered in an accumulated manner. In other words, the first time the user clicks on the button, the "Action Successful" is printed once. Second time the user clicks on the button, it is printed twice and so forth.
Can anyone help if there is a way to not get duplicate ofSuccessful events for the past actions?
Appreciate any insight.
This package was developed with your issue in mind:
https://www.npmjs.com/package/#ngxs-labs/actions-executing
#Select(actionsExecuting([UpdateCommunicationPreference])) myActionIsExecuting$: Observable;
you can use myActionIsExecuting$ in your template with async pipe. you can also simply subscribe to myActionIsExecuting to familiarize yourself with what is returned. null will be returned when all instances of that particular action are finished.
I hope that helps!
Take a look this: https://www.ngxs.io/advanced/cancellation
Extracted from the link: "If you have an async action, you may want to cancel a previous Observable if the action has been dispatched again. This is useful for canceling previous requests like in a typeahead."
Alternatively, you can consider a pattern that disables the UI when the button is clicked (e.g. via 'in progress' dialog) before triggering the action dispatch. When the action is done processing, close the dialog.
Hope this helps.

Can we have multiple submit buttons on the same page in oracle apex?

I have created a page in oracle apex where I have multiple regions and each region has a Submit page button.
Each submit has an ajax callback associated with it.
Will clicking on any one submit, also execute the other ajax callbacks?
In other words, when we click a Submit page button in one region, is it exclusive only to that regions ajax callback or will it execute all ajax callbacks of that page?
Button name determines value of the REQUEST attribute. If you look at the process values, you can set the "Editable Region" (which shows which region is associated with this process), as well as the request itself (under the "Server-side condition" properties; see the "When button pressed" and "Type").
So, if you create your own process which does something and set properties described above, each SUBMIT button should affect only its own region.
Unless I'm wrong, if there's only one SUBMIT button (created with its default settings) on the page, it'll affect all regions.

Validations not working on page submit of oracle apex

I know that all validations get executed on Page Submit, but i have actions defined on page submit which i want to be executed first followed by the validations, ie decide the execution options for these dynamic actions to be executed first and then the validations, because right now my validations don't seem to work.My dynamic actions are defined in function and global declaration as $("#submit").click( function (){ })
Don't override events in Javascript. I forget, but you may interfere with how Apex handles them. What you want to do is:
Set your button's action to be Defined By Dynamic Action
Create a Click Dynamic Action on your button
Add a True event for whatever it is you're trying to do
Your final True event should be Submit, with an appropriate Request value
If your Validations are not executing correctly, turn on debugging mode and look in the debug log for why they're not working.

Oracle Apex 5: How do I redirect page when (dynami-action)button clicked?

I have a dilemna. I want to redirect the APP_USER to another page when a button is clicked. The thing is the button has a dynamic action with PLSQL body. The PLSQL does a few checks and validations and then redirects the individual to another page. How would I do that? Many thanks.
I suggest you use Branches because they are easier and better from a security point of view.
On your page create a button that will submit the page (has attribute Action=Submit Page) then create a Branch at the Processing point where you will select the page that you want the user to be redirected to.
Now to make this branch run just in some conditions go to the Condition attribute of the branch and at When Button Pressed select your button and at Type select PLSQL Function Body and add your logic there or select some other type that suits you best.

Web Form with more than 100 fields

What would be the best design layout for a web form with more than 100 fields? Right now I have grouped the fields to tabs.I am having tough time in validating the fields.I should either validate it on 'Submit' of the form or on tab change.Both has its own drawbacks. If I validate on tab change then user cannot view other tabs till they fill all the mandatory fields in the previous tab.Also it is not an good idea to throw so many validation messages to the user when he submits the form.
Please share your thoughts..
You can use a stepwise process. In the first step provide all the most important fields. Then on the click of a 'Next' button you can go to the next step and so on. By validating the fields you can allow the user to go to the next step.

Resources