put a breakpoint in your page constructor and see why it is called twice

On Mon, May 23, 2011 at 11:48 PM, Jered Myers
<jer...@maplewoodsoftware.com>wrote:

> I am attempting to open a new browser tab to a bookmarkable page.  The
> constructor of my page is being called twice.  Is there a way I can prevent
> this from happening?  When I remove the PopupSettings the constructor is
> only called once, but the page does not open in a new tab.
>
> Here is an example fragment of my implementation in Wicket 1.4.16:
>
> ApplicationClass.java... mount(new QueryStringUrlCodingStrategy("MyPage",
> MyPage.class));
>
> MyPageLink.java
> public class MyPageLink extends BookmarkablePageLink<Integer>
> {
>  public MyPageLink(String id, IModel<Integer> identifierModel)
>  {
>     super(id, MyPage.class);
>     setParameter("Identifier", identifierModel.getObject());
>     PopupSettings popupSettings = new PopupSettings( blah | blah | blah);
> <-- Only PopupSettings.blah here
>     setPopupSettings(popupSettings);
>  }
> }
>
> MyPage.java
> public class MyPage extends WebPage
> {
>    public MyPage(final PageParameters params)
>    {
>       super(params);
>    }
> }
>
> --
> Jered
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to