Server Connect Using params Auto Loads When Redirecting to Another Page


I have a SPA built on ASP .NET with no DB connection. All data comes from SA which have APIs step configured in them.
I have numerous routes in the project such as /setup/:userid, /dash, /home/:userid etc.

On most routes, there are server connects which are set to auto-load. These server connects have parameters which are bound to query parameters such as params.userid, if any.
So, if I go to /setup/123, server connect loads with param set as 123.
Now, if I go to another page, say /dash, the SC on setup age loads again… this time with empty/NULL param.

This does not make sense. I am not even on the route page, where the SC is defined. So it should not have been even called.
Secondly, the param that I have is set to a local value - params.userid which is specific to that route. Why would that value even change (which invokes SC reload)? I have even tried setting the param as routeSetup.params.userid, but that does not make any difference.

Can someone please help me understand why this is not working and how is it supposed to work?
What I want & expect it should work like:

  1. When I get to setup page, the param value, if changed, should auto load the SC and fetch fresh data.
  2. If I redirect away from the setup page, that should NOT mean I have a different userid in params and it should NOT auto load the SC.
  3. Only if I come back to setup page via some other link, it should reload the SC, IFF param userid does not match from what it was earlier.
    For eg: /setup/123 > /dash > setup/444 this should load SC twice - once for 123 & then for 444.
    For eg: /setup/123 > /dash > setup/123 this should load SC just once for 123.
  4. If I press browser back, in that case the param remains the same, so it should not reload the SC.

Please help me understand if what I require can be achieved in Wappler SPA?

@Teodor Can you please take a look at this and help?

Bump. Please help.

@patrick / @Teodor Help please.

Another Bump. @patrick ?

We were able to recreate this issue, currently investigating what’s wrong.

Thank you for the update.

We fixed the issue and it works fine in my tests. Please test with: (1.9 KB)

and let us know if everything works as expected.


Thank you @patrick & @Teodor. Routing and auto-loads now work as expected. :slight_smile:

This has been fixed in Wappler 3.7.5

This topic was automatically closed after 44 hours. New replies are no longer allowed.