use the  public MyPopupPage(PageParameters params) constructor

-igor


On Jan 9, 2008 3:41 AM, palun <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am trying to open a popup window from a page. Code looks like so:
>
>             PopupSettings popupSettings = new PopupSettings(PageMap
>                     .forName("popuppagemap")).setHeight(300).setWidth(200);
>             PageParameters params = new PageParameters();
>             params.add("header", "Answer");
>             params.add("text", "[answer is shown here]");
>             item.add(new BookmarkablePageLink("popupButtonLink",
>                     MyPopupPage.class, 
> params).setPopupSettings(popupSettings));
>
> The constructor of my popup window looks like:
>
>     public MyPopupPage() {
>         add(new Label("header",(String) getPageParameters().get("header")));
>         add(new Label("text",(String) getPageParameters().get("text")));
>       add(new PopupCloseLink("return"));
>     }
>
> When I run it, the popup window pops up alright, but it displays a
> NullPointerException. Apparently getPageParameters() returns null. Anyone
> knows why?
>
> (Sorry if this is elementary wicket stuff. I'm a beginner.)
>
> Thanks
> /ulf
>
>
> --
> View this message in context: 
> http://www.nabble.com/popup-problem-tp14710176p14710176.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to