Controls File Upload is re-run when screen is resized

Controls File Upload is re-run when screen is resized

  

Hi All,

I have a controls / File Upload widget setup, works fine. However, if I resize the browser screen after submitting the action the refresh of the screen executes the button action again...

The button action in this case converts an excel file to a list and creates new entities (so when the screen is refreshed data is added to the entities again).
Note: I can have repeated data entries in this case.

I tried assigning the Upload widget Content with nullBinary() after it loaded but that does not seem to work. 

Any other ideas?

Solution

Hi Andre.

Wouldn't this be just the SilkUi simulator? It is enabled just in Dev, by default, that when the screen is resized it checks the size and change the screen to simulate a device (mobile, tablet, etc).

In prod this behaviour is off as the environment Dev property is turned off.

Cheers

Solution

Eduardo Jauch wrote:

Hi Andre.

Wouldn't this be just the SilkUi simulator? It is enabled just in Dev, by default, that when the screen is resized it checks the size and change the screen to simulate a device (mobile, tablet, etc).

In prod this behaviour is off as the environment Dev property is turned off.

Cheers

Hi Eduardo, I am not hugely experienced and don't yet have a fully licensed environment so this might only really happen in Dev. Thanks for the clarification, nonetheless it is strange, I would not expect the action to re-run unless I pressed the button again.

Andre

If you have submitted something to the server and do a refresh, the browser will resend the request.
I never noticed this happening on resizing the screen on DEV environments, but probably just because I didn't resized after a submit. I'll try to confirm :)

Eduardo

One aditional question. It's possible to turn off this behaviour in a personal enviroment ?

Hello @Alberto

No. In Personal, you can't set the environment to "Production".
But you can "disable" the reload of the page made by SilkUI setting the Device Emulation to off.

This must be done by browser, as this seems to be stored as a cookie. The option appears when you resize the screen.

And @Andre, for what I've read, the page is "reload" when resizing and SilkUI doing its magic, so the reload will resend any request previously made. 

But this feature is disable in production.