I have basically concentrated on the CometD Service.... This should be a simple bug to fix.
On Fri, Jan 22, 2010 at 10:34 AM, Roland Vares <roland.va...@uptime.ee>wrote: > Hello, > > I'm currently developing wicket based application, which displays alarms on > map and allows their modification. > New alarms are sent to server through soap service and map with few other > components on page for all browser clients needs to be refreshed. > > I'm using wicketstuff-push for the push service implementation. > org.wicketstuff.push.timer.TimerPushService to be clear. > > > > As an in examples I have method on wicket page which is activated when > server sends notification about an event: > // set new listener for incoming events > final IPushTarget pushTarget = > getTimerPushService().installPush(this); > getPushService().addMapListener(new > MapServiceListener() { > public void onEventChange(final Event event) { > if > (pushTarget.isConnected()) { > Label label = new Label("labelonpage","label"); //label > to be replaced > pushTarget.addComponent(label); > pushTarget.trigger(); > } > else { // remove inactive listener > > LOG.debug("Removing map listener " + this); > > getPushService().removeMapListener(this); > } > ... > > Problems start with line : > Label label = new Label("labelonpage","label"); > > which results with: > org.apache.wicket.WicketRuntimeException: There is no application attached > to current thread btpool0-2 > at org.apache.wicket.Application.get(Application.java:179) > at > org.apache.wicket.Component.getApplication(Component.java:1323) > at org.apache.wicket.Component.<init>(Component.java:920) > > It seems that in this push method, context is lost, I have no session, > request,... > > Is there any way I gan regain it or make new? > > Or how should I implement push service, which needs to replace some > components on page? > > Thanks in advance, > Roland > -- Rodolfo Hansen CTO, KindleIT Software Development Email: rhan...@kindleit.net Mobile: +1 (809) 860-6669