You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mauro Ciancio <ma...@gmail.com> on 2009/07/02 07:06:53 UTC

AjaxSelfUpdatingTimerBehavior and Panels

Hi everyone,
  I'm having an issue with the AjaxSelfUpdatingTimerBehavior and panels
in my page. The thing is I have a panel that is switched via ajax. All the
others parts of my page remains without change.
  In a specific panel (one of those being changed) I added an
AjaxSelfUpdatingTimerBehavior. It works fine, but when i replace the panel
with a new instance of the panel a new timer its appended to the page.
So, after that I have two timers refreshing my page.
  If the panel is replaced another time, a third timer come up.
  But, if the original panel is replaced with other panel, this exception is
thrown:

Root cause:

java.lang.NullPointerException
at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Any idea to fix this issue?
How should I do to make the panel changeable without having this issue?

Thanks in advance,
Cheers!
-- 
Mauro Ciancio

Re: AjaxSelfUpdatingTimerBehavior and Panels

Posted by Mauro Ciancio <ma...@gmail.com>.
On Wed, Jul 8, 2009 at 1:29 PM, Mauro Ciancio <ma...@gmail.com>wrote:

> Thanks for the reply Igor. I could not test it yet.
> I'll test it and then write I'll write what happened.
>

It works pretty cool. Thanks for the advice!
-- 
Mauro Ciancio

Re: AjaxSelfUpdatingTimerBehavior and Panels

Posted by Mauro Ciancio <ma...@gmail.com>.
On Thu, Jul 2, 2009 at 2:43 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> you can attach the behavior to a container around the panels, just a
> simple webmarkupcontainer should do.


Thanks for the reply Igor. I could not test it yet.
I'll test it and then write I'll write what happened.

Cheers!
-- 
Mauro Ciancio

Re: AjaxSelfUpdatingTimerBehavior and Panels

Posted by Igor Vaynberg <ig...@gmail.com>.
you can attach the behavior to a container around the panels, just a
simple webmarkupcontainer should do.

-igor

On Wed, Jul 1, 2009 at 10:06 PM, Mauro Ciancio<ma...@gmail.com> wrote:
> Hi everyone,
>  I'm having an issue with the AjaxSelfUpdatingTimerBehavior and panels
> in my page. The thing is I have a panel that is switched via ajax. All the
> others parts of my page remains without change.
>  In a specific panel (one of those being changed) I added an
> AjaxSelfUpdatingTimerBehavior. It works fine, but when i replace the panel
> with a new instance of the panel a new timer its appended to the page.
> So, after that I have two timers refreshing my page.
>  If the panel is replaced another time, a third timer come up.
>  But, if the original panel is replaced with other panel, this exception is
> thrown:
>
> Root cause:
>
> java.lang.NullPointerException
> at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:295)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> Any idea to fix this issue?
> How should I do to make the panel changeable without having this issue?
>
> Thanks in advance,
> Cheers!
> --
> Mauro Ciancio
>

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