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);
}
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
WebSocketBehavior#onMessage(Text|Bina
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 IPartialPageUpdateHandler
> as parameter (this
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 onPush(Web
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(
>
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 need