Reputation: 51
I have an AuthenticatedWebSession which stores Room and Home information.
BUT, while retrieving Room's information the session discovers that Home changed too, and decides to send a HomeChangedEvent, so that, other components will update their states. How can i do that ?
Upvotes: 0
Views: 289
Reputation: 17533
The update of the other pages makes sense only if you push the update to the browsers as well. Otherwise every page (or better a base page) could check whether there is something new in the Session in its #onConfigure()
and update itself accordingly.
If you want to update all pages immediately (with server push) then take a look at Wicket Native WebSocket module (https://ci.apache.org/projects/wicket/guide/7.x/guide/nativewebsockets.html). By using WebSocketRegistry.Holder.get(application).getConnections() you can easily get all active pages with opened WebSocket connection.
Upvotes: 1