Why does UI.getCurrent() in my onMessage method always returns a null UI?
The UI has been already instantiated before, because this method pushes a JMS notification on the ui (chat-style), so I cannot figure why this method returns null in this case.
Hi Antlia, you are not processing a request so the current UI has not been defined.
UI : “The current UI is automatically defined when processing requests to the server. In other cases, (e.g. from background threads), the current UI is not automatically defined.”
If you need a reference to your BaseUI in onMessage, and your BaseUI is the MessageListener implementor. Use “this” to get a reference to your current ui. I mean: UI currentUI = this
.