You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Enrique Rodriguez <en...@gmail.com> on 2008/04/05 03:57:25 UTC
wicketstuff-push-examples compilation error
Hi, Wicket users,
I thought I'd examine wicketstuff-push, since I could use push on a
project. After a fresh check-out of wicketstuff-push,
wicketstuff-push-examples, and wicket-stuff-dojo, I found that
wicketstuff-push-examples wouldn't compile. Keep in mind I just
starting looking at this code, but I made the following change to
class WicketAbstractPushChat to get it to compile (and now the
examples do appear to work):
Replace:
final IPushTarget pushTarget = getPushService().installPush(this);
CHAT_ROOM.addListener(new ChatListener() { ... });
With:
final IPushInstaller pushInstaller = new IPushInstaller() {
public void install(Component component, final IPushTarget pushTarget) {
CHAT_ROOM.addListener(new ChatListener() {
public void onMessage(Message msg) {
if (pushTarget.isConnected()) {
pushTarget.appendJavascript("document.getElementById('" +
chat.getMarkupId() + "').innerHTML += '" + msg + "<br/>'");
pushTarget.trigger();
} else {
CHAT_ROOM.removeListener(this);
}
}
});
}
};
getPushService().installPush( this, pushInstaller );
Does that make sense? Again it appears to work but there are a ton of
errors saying TimerPushService is not serializable.
Otherwise, looks pretty cool and I hope to do more experimenting next week.
HTH,
Enrique
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org