String errorMessage
=Application.get().getResourceSettings().getLocalizer().getString(key,
someComponentOrNull,defaultMsg);

Maurice

On Mon, Apr 21, 2008 at 9:46 PM, Enrique Rodriguez <[EMAIL PROTECTED]> wrote:
> I'm curious what's up here, too, since Pro Wicket Listing 6-15 shows
>  the use of StringResourceModel with Component#info.  However, when I
>  tried that once, I simply got the Object#toString()-style output in my
>  FeedbackPanel!
>
>  Enrique
>
>
>
>
>  On Mon, Apr 21, 2008 at 12:40 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:
>  > Ryan Gravener wrote:
>  > > I think you can do error((String)(new
>  > ResourceModel("page.error").getObject()))
>  > >
>  >
>  > Nah.. besides beeing incredibly nasty, you just instantiate and unwrap it
>  > right away. Can't see how that will help? :)
>  >
>  >
>  >
>  > >
>  > > On Mon, Apr 21, 2008 at 3:11 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:
>  > >
>  > > > Sometimes, I want to redirect to another page with an error message
>  > because
>  > > > of something I discover when the constructor runs. I would like to do:
>  > > >
>  > > >  if(some_condition) {
>  > > >        Session.get().error("errmsg");
>  > > >        setResponsePage(PageClass.class);
>  > > >        return;
>  > > >  }
>  > > >
>  > > >  The problem is that Session#error() doesn't take a resource-key, only
>  > the
>  > > > final text. In the constructor it might be too early to determine the
>  > > > language etc. What's the Wicket way around this one? :)
>  > > >
>  > > >  -- Edvin
>
>  ---------------------------------------------------------------------
>  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