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