Registering windows

46 views
Skip to first unread message

Everton Marques

unread,
Dec 1, 2016, 12:37:41 PM12/1/16
to gowebuitoolkit
My app manages many devices.

I would like to display a per-device window whenever the user opens an address such as /app/device/<deviceID>.

I am unkeen about pre-creating costly windows for all devices.

My initial attempt was to dynamically create a device window when the user clicked on a Link pointing to /app/device/<deviceID>.
However, that did not work well, because the browser often hit the URL before the server finished creating the new window.

Right now I am considering other alternatives:

1. Is it somehow possible to pre-register window names in order to create them only on demand?

2. Otherwise, I guess I could actually pre-create all those per-device windows with minimal dummy content and then dynamically load rich contents only on windows actually loaded be the user (within the window load event).

What is the most promising course of action?

One last question.
I noticed I could not create windows as "device/<deviceID>", so I am currently using "device-<deviceID>".
Is such a limitation actually intended?

Thanks a lot,
Everton



András Belicza

unread,
Dec 2, 2016, 6:45:09 PM12/2/16
to Everton Marques, gowebuitoolkit
You could register your own HTTP handler which could be called prior to opening the window of a device.
For example the link for a device could be: /device/<deviceID>, which when finished creating the window, could send a redirect to /device-<deviceID>

No reason comes to my mind why it would be an intended limitation, I think it was just for simplicity, and it was never insufficient.
Reply all
Reply to author
Forward
0 new messages