Spa page calling unused server connects

I don’t want to confuse the issue any further, but I do see the problem. A SPA is in reality a single page with content being loaded/unloaded as required. As such, any links with the back-end will linger through to the end. In case of SESSION variables, you will need to unset the variable before creating a new variable value, there is no need for multiple SESSIONs.

As far as data sources are concerned, it should be possible to filter these out per view when using Data View on top of the Data Source.

This is purely a theoretical idea of mine, so please do not blast me if it does not work out.

Can't do that. The pages are still in development.
I will send you a URL on Monday. And when you are ready to check, just reply and I will make changes in the code.

This explanation is the best I could come up with. If you want more than this, lets connect on Monday.

That's correct. The application has a single session manager only in the index page. So that is not the issue.

This is not exactly what is happening with Wappler's routing I think. The route is removed from UI, but is still cached and takes part actively in all dynamic (DMX?) activities.

That sounds like a good solution, but i'm not sure I understand. :man_shrugging: :sweat_smile:

I’ll try to come up with an example, that way I will find out for myself as well if this works.

2 Likes

This is a very simple example where I have two product pages, each page with a filtered data source (read: Data View).

image

The Server Connect, containing all records is loaded once when the Home page is loaded

When the first product page is shown, there is no interaction with the back-end, only the HTML page is loaded.

The same happens with the second product page

This is what the filter looks like:

<dmx-data-view id="dvProduct" dmx-bind:data="scProducts.data.qryProducts" filter="productsub == browser.location.pathparts[1]"></dmx-data-view>

where I have used pathparts For my local system, pathname would have included the site directory, SPA/

What this shows is that all of the activity should be placed in the main document rather than in each individual section.