try getString("header")
i think get() returns String[]
-igor
On Jan 9, 2008 2:09 PM, palun <[EMAIL PROTECTED]> wrote:
>
> That would be the first line in the constructor:
>
> public MyPopupPage(PageParameters params) {
> add(new Label("header", (String) params.get("header"))); <-------
> line 12
> add(new Label("text", (String) params.get("text")));
> add(new PopupCloseLink("return"));
> }
>
> /ulf
>
>
>
> igor.vaynberg wrote:
> >
> > exception is happening in your code...what is on line MyPopupPage.java:12
> > ?
> >
> > -igor
> >
> >
> > On Jan 9, 2008 1:11 PM, palun <[EMAIL PROTECTED]> wrote:
> >>
> >> WicketMessage: Can't instantiate page using constructor public
> >> com.mycompany.pages.wicketutils.MyPopupPage(org.apache.wicket.PageParameters)
> >> and argument text = "[answer...]" header = "[Answer]"
> >>
> >> Root cause:
> >>
> >> java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to
> >> java.lang.String
> >> at
> >> com.mycompany.pages.wicketutils.MyPopupPage.<init>(MyPopupPage.java:12)
> >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> >> at
> >> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:154)
> >> at
> >> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:96)
> >> at org.apache.wicket.request.target.component.BookmarkablePageRequestTa
> >>
> >>
> >>
> >>
> >> igor.vaynberg wrote:
> >> >
> >> > huh?
> >> >
> >> > -igor
> >> >
> >> >
> >> > On Jan 9, 2008 12:50 PM, palun <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> But how do I change this part if I want to use a constructor with
> >> >> arguments?
> >> >>
> >> >> > item.add(new BookmarkablePageLink("popupButtonLink",
> >> >> > MyPopupPage.class,
> >> >> > params).setPopupSettings(popupSettings));
> >> >>
> >> >> /ulf
> >> >>
> >> >>
> >> >> use the public MyPopupPage(PageParameters params) constructor
> >> >>
> >> >> -igor
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >> http://www.nabble.com/popup-problem-tp14710176p14721301.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]
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/popup-problem-tp14710176p14721705.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]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/popup-problem-tp14710176p14722766.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]