I may be wrong but you don't need to mount the homepage which is why it is 
being executed twice. 

On Mar 23, 2012, at 1:36 PM, Paolo <irresistible...@gmail.com> wrote:

> I made bookmarkable the HomePage:
> 
> But it is executed two times!!!
> Infact it make me crazy!
> I put an System.out.printf to check it in the console log.
> Because the page in the browser look like to load only one time,
> but in the console I can read 2 times printf line!
> 
> If I mount it as something different by "/" homepage runs only one time.
> 
> This is the main of my app called watch:
> -----------------------
> public class MainApplication extends WebApplication
> {
>    @Override
>    public Class getHomePage()
>    {
>        return HomePage.class;
>    }
> 
>    @Override
>    protected void init()
>    {
>        super.init();
>        mountPage("/", HomePage.class);
>        mountPage("print.html", Print.class);
>        mount(new NoVersionMount("watch", V.class));    
>    }
> }
> -----------------------------------------------------
> If I replace it with mountPage("home", HomePage.class); it works normally.
> 
> Url string after first start:
> 
> http://localhost:8080/watch/?0
> 
> Url string after reload page:
> 
> http://localhost:8080/watch/?2
> 
> ----------
> 
> If I mount page as
> 
> mountPage("", HomePage.class);
> 
> I got this error:
> java.lang.IllegalArgumentException: Argument 'mountPath' may not be null or 
> empty.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

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

Reply via email to