WidgetClick to open a popup

WidgetClick to open a popup

  

Good morning friends,


I'm using the widgetClick to open a popup, but when you open the popup, the

selected data on the previous screen are lost.

Any concerns how I can keep the data from the previous screen selected, even by opening this popup?


(images of the attached flow)


Thank you.


Hi Agno,

Did you try change the method of your linkDeleteDocument to Ajax Submit? When you use submit, the preparation of your screen will rerun, so, your selected data will be lost. Probably if you change it to ajax submit this behavior will be fixed.


Att.

Fantato


 

Hi Agno,

The submit type of the Popup button must be set to navigation. But when using navigation you are doing a HTTP GET request. And in this case you can not send data from input fields. To send data from input fields you have to use the Submit method (HTTP POST).

Thus, to do what you want to do you have to:

  • Create a Local Variable in your screen
  • In the Device List (input parameter for the PopUp) set the Local Variable
  • In the PrioritizeSelectedDocument assign to that Local Variable the values that you want to send to the PopUp.

This way, the input value of the Popup do not come directly from the input widgets. 

Let me know if that works.

Cheers,

José

Solution

Hi Agno,

Actually, a simpler solution is to refresh the button (of the popup) before the widget click.

Cheers,

José

Solution

Fantato wrote:

Hi Agno,

Did you try change the method of your linkDeleteDocument to Ajax Submit? When you use submit, the preparation of your screen will rerun, so, your selected data will be lost. Probably if you change it to ajax submit this behavior will be fixed.


Att.

Fantato


 

Hello Fantato,
The way you said  works, however the variable that I pass to the popup gets lost (DevicePriorizationList, type text).
Hug.


José Costa wrote:

Hi Agno,

Actually, a simpler solution is to refresh the button (of the popup) before the widget click.

Cheers,

José


It worked, thank you.

José Costa wrote:

Hi Agno,

The submit type of the Popup button must be set to navigation. But when using navigation you are doing a HTTP GET request. And in this case you can not send data from input fields. To send data from input fields you have to use the Submit method (HTTP POST).

Thus, to do what you want to do you have to:

  • Create a Local Variable in your screen
  • In the Device List (input parameter for the PopUp) set the Local Variable
  • In the PrioritizeSelectedDocument assign to that Local Variable the values that you want to send to the PopUp.

This way, the input value of the Popup do not come directly from the input widgets. 

Let me know if that works.

Cheers,

José


Http post will use the body to send the information. The get will send that info in the URL with some limitations in terms of size. But you can send information in both strategies 


Regards

Miguel,

You can send information in both ways. And you are right in general regarding GET vs POST. 

But in OutSystems, if you use the navigate method (GET), the end-user input values will not be sent to the server.

Check this:

https://www.outsystems.com/help/SErviceStudio/9.0/Miscellaneous/Behavior_of_the_Button_Widget.htm

Cheers,

José