Re: ClientProperties.getBrowserWidth() always returns -1

2015-05-22 Thread Martin Grigorov
Hi, On Thu, May 21, 2015 at 4:40 AM, smallufo small...@gmail.com wrote: 2015-05-20 23:27 GMT+08:00 Martin Grigorov mgrigo...@apache.org: You can use AjaxBrowserInfoBehavior. I think you mean AjaxClientInfoBehavior http://www.wicket-library.com/wicket-examples-6.0.x/ajaxhellobrowser/?0

Redirecting to another Wicket after 5 seconds

2015-05-22 Thread MartinoSuperman
Dear, I want to make a timer on a WicketPage. When my Wicket website starts at the begin page, it must redirect after 5 seconds to another. I already have the following code: = public final class TimerTestPage extends WebPage { Timer timer; public

Re: Redirecting to another Wicket after 5 seconds

2015-05-22 Thread Don Ferguson
By the time the timer goes off, the page has already been rendered and control has returned to the browser. The server has no way to tell the browser to redirect. I’d recommend moving the timer logic to the client side. The TimerTestPage can render javascript, executed on the client. After

Re: Redirecting to another Wicket after 5 seconds

2015-05-22 Thread Don Ferguson
The following works for me: public TimerTestPage() { add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { @Override protected void onTimer(AjaxRequestTarget target) { setResponsePage(TimerTestPage2.class, new PageParameters()); } }); } On May 22, 2015,