Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
João Carvalho
2
Views
3
Comments
executing a screen action, does the prepariton action always occurs?
Question
when executing a screen action, for example thru a button, what´s the diference between ending the same with the page it self or an END?
And wy does the page execute prepariton even when i use ajax in that same action triggered by the same button?
best regards
Rodrigo Castelo
Staff
Hi João,
Everytime your screen Action terminates with an End element, it means the page will maintain all its context, that is, all the variable values will be remembered and accessible in subsequent requests. Now, if your Button Method property is set to Submit, the Screen Preparation will be executed again. If your Button Method property is set to Ajax, the Screen Preparation will not be executed.
When your screen Action terminates with a Destination element (either to the same page or another), it means you will loose all the context, that is, all the variables will be reset to their default values and the page will be rendered again from scratch. In this process, the Preparation is executed again.
For more information on this topic, please check the following Service Studio's documentation pages:
Create a Screen Action
Create the Screen Preparation
Hope this clarifies,
Rodrigo Castelo
P.S.: If your Button Method property is set to Ajax and the Preparation is executing, as you state, this is a bug. Please submit this to
support@outsystems.com
so that we can take a look into it and fix the problem.
João Carvalho
hi Rodrigo,
Thank you for your help, but it seems that there is still a problem with the method ajax. I´ve got a button wich method is Ajax, and when i execute the action screen prepararation still occurs, if the terminal scope of the action is the same page! It seems that AJAX method only works when combined with END as terminal scope in the action. Is this correct?
Best regards
Thanks
Rodrigo Castelo
Staff
Exactly João.
When you use a Destination to terminate the Action you are saying you want to get rid of all the Screen context and render it again from scratch. Hence, independently of being Ajax or not, the Screen Preparation must be executed, otherwise the screen would display no data.
If you want to keep the Screen context (all the variable values) and only change a part of it, then you must use Ajax and terminate the Action with the End element.
Cheers,
Rodrigo Castelo
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...