Re: [Wicket 8m7] websockets?

2017-08-17 Thread nino martinez wael
I will, and thanks for your feedback:) I have some idea that for most users we can simplify it a bit, I will come back when I have something more than just the idea of it. Thinking about it, websocket technology will require more of the backend, because of its nature.. For Jetty 9.3.x I will

Re: [Wicket 8m7] websockets?

2017-08-17 Thread Martin Grigorov
On Thu, Aug 17, 2017 at 10:51 AM, nino martinez wael < nino.martinez.w...@gmail.com> wrote: > so in it's simplest form my page would look like this: > > > final MarkupContainer anotherComponent = add(new > Label("anotherComponent", "Updating should be pushed")); > > anotherComponent.add(

Re: [Wicket 8m7] websockets?

2017-08-17 Thread nino martinez wael
so in it's simplest form my page would look like this: final MarkupContainer anotherComponent = add(new Label("anotherComponent", "Updating should be pushed")); anotherComponent.add( new WebSocketBehavior() { @Override protected void

Re: [Wicket 8m7] websockets?

2017-08-17 Thread nino martinez wael
Thanks Martin! Yes specially 2.2.x will probably be used a lot.. Would be great to have an sample for it.. I'll conjure one up for pax wicket.. On Thu, Aug 17, 2017 at 9:29 AM, Martin Grigorov wrote: > WebSocketBehavior has only callbacks. They have

Re: [Wicket 8m7] websockets?

2017-08-17 Thread Martin Grigorov
WebSocketBehavior has only callbacks. They have IPartialPageUpdateHandler as parameter (this is the base interface for AjaxRequestTarget and IWebSocketRequestHandler) which you can use to add components. There are two use cases: 1) the browser sends a message

Re: [Wicket 8m7] websockets?

2017-08-17 Thread Maxim Solodovnik
you need something like this: public void onEvent(IEvent event) { if (event.getPayload() instanceof WebSocketPushPayload) { WebSocketPushPayload wsEvent = (WebSocketPushPayload) event.getPayload(); IPartialPageRequestHandler handler = wsEvent.getHandler(); handler.add( your components); }

Re: [Wicket 8m7] websockets?

2017-08-17 Thread nino martinez wael
But how do I then refresh the target from serverside? WebSocketBehavior does not have an method that lets me get a target? On Thu, Aug 17, 2017 at 7:45 AM, Martin Grigorov wrote: > Yes. > The API is the same. > > On Aug 17, 2017 08:44, "nino martinez wael"