Re: Web socket connected event and onConfigure

2017-09-14 Thread Peter Henderson
On 14 September 2017 at 10:54, Maxim Solodovnik 
wrote:

> I'm afraid you cannot update page on websocket connected
> You need to workaround this
>
> Here is what we are are using:
> Java: handling of special `connected` message:
> https://github.com/apache/openmeetings/blob/master/
> openmeetings-web/src/main/java/org/apache/openmeetings/
> web/common/MainPanel.java#L235
> JS: send `connected` message
> https://github.com/apache/openmeetings/blob/master/
> openmeetings-web/src/main/java/org/apache/openmeetings/
> web/common/MainPanel.html#L40
>
> works as expected
>

Brilliant.

Thanks




>
>
> On Thu, Sep 14, 2017 at 4:24 PM, Peter Henderson
>  wrote:
> > Hi All,
> >
> > I have a link on a panel which should only be enabled while there is a
> > connected web socket.
> >
> > The link overrides onConfigure and calls setEnabled [1]
> >
> > When a web socket connected event is received I store the connected
> message
> > and add the link to the payload handler. [2]
> > I expect the handler to trigger a call on link.onConfigure  (just like an
> > ajax update) but it is not.
> >
> > What am I doing wrong.
> >
> > Quick start (in Java!)
> > https://github.com/bollinger/WsOnConnect
> >
> > Many thanks
> > Peter.
> >
> >
> > [1]
> > https://github.com/bollinger/WsOnConnect/blob/
> ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/
> mycompany/MyPanel.java#L48
> >
> > [2]
> > https://github.com/bollinger/WsOnConnect/blob/
> ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/
> mycompany/MyPanel.java#L99
> >
> > --
> > Peter Henderson
>
>
>
> --
> WBR
> Maxim aka solomax
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Peter Henderson


Re: Web socket connected event and onConfigure

2017-09-14 Thread Maxim Solodovnik
I'm afraid you cannot update page on websocket connected
You need to workaround this

Here is what we are are using:
Java: handling of special `connected` message:
https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java#L235
JS: send `connected` message
https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.html#L40

works as expected


On Thu, Sep 14, 2017 at 4:24 PM, Peter Henderson
 wrote:
> Hi All,
>
> I have a link on a panel which should only be enabled while there is a
> connected web socket.
>
> The link overrides onConfigure and calls setEnabled [1]
>
> When a web socket connected event is received I store the connected message
> and add the link to the payload handler. [2]
> I expect the handler to trigger a call on link.onConfigure  (just like an
> ajax update) but it is not.
>
> What am I doing wrong.
>
> Quick start (in Java!)
> https://github.com/bollinger/WsOnConnect
>
> Many thanks
> Peter.
>
>
> [1]
> https://github.com/bollinger/WsOnConnect/blob/ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/mycompany/MyPanel.java#L48
>
> [2]
> https://github.com/bollinger/WsOnConnect/blob/ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/mycompany/MyPanel.java#L99
>
> --
> Peter Henderson



-- 
WBR
Maxim aka solomax

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Web socket connected event and onConfigure

2017-09-14 Thread Peter Henderson
Hi All,

I have a link on a panel which should only be enabled while there is a
connected web socket.

The link overrides onConfigure and calls setEnabled [1]

When a web socket connected event is received I store the connected message
and add the link to the payload handler. [2]
I expect the handler to trigger a call on link.onConfigure  (just like an
ajax update) but it is not.

What am I doing wrong.

Quick start (in Java!)
https://github.com/bollinger/WsOnConnect

Many thanks
Peter.


[1]
https://github.com/bollinger/WsOnConnect/blob/ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/mycompany/MyPanel.java#L48

[2]
https://github.com/bollinger/WsOnConnect/blob/ba7ec25a2843c64b3e436f6054b60944adb4114c/src/main/java/com/mycompany/MyPanel.java#L99

-- 
Peter Henderson