You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Seven Corners <se...@gmail.com> on 2008/10/06 20:32:04 UTC

How to expose regular exception message in FeedbackPanel?

I have a form whose submission can possibly generate exceptions.  I would
like to expose the exception text in the FeedbackPanel.  How can I do this?

I've tried getting the FeedbackMessagesModel and doing a setObject() on that
but it's not accepting a String, a FeedbackMessages List, or a new
FeedbackMessage.  Obviously I'm going about this the wrong way.

Ideas?

Thanking you in advance for your time and trouble.
-- 
View this message in context: http://www.nabble.com/How-to-expose-regular-exception-message-in-FeedbackPanel--tp19843597p19843597.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to expose regular exception message in FeedbackPanel?

Posted by Ryan Gravener <ry...@ryangravener.com>.
In your catch clause in onsubmit, call error(e.getMessage())


Ryan Gravener
http://twitter.com/ryangravener


On Mon, Oct 6, 2008 at 2:32 PM, Seven Corners <se...@gmail.com>wrote:

>
> I have a form whose submission can possibly generate exceptions.  I would
> like to expose the exception text in the FeedbackPanel.  How can I do this?
>
> I've tried getting the FeedbackMessagesModel and doing a setObject() on
> that
> but it's not accepting a String, a FeedbackMessages List, or a new
> FeedbackMessage.  Obviously I'm going about this the wrong way.
>
> Ideas?
>
> Thanking you in advance for your time and trouble.
> --
> View this message in context:
> http://www.nabble.com/How-to-expose-regular-exception-message-in-FeedbackPanel--tp19843597p19843597.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: How to expose regular exception message in FeedbackPanel?

Posted by Shelah Horvitz <Sh...@blackwave.tv>.
Thank you.  I can't believe you got back to me so fast!

This is a slick solution.  I appreciate it.


________________________________________
From: Serkan Camurcuoglu [serkanc@telenity.com]
Sent: Monday, October 06, 2008 2:36 PM
To: users@wicket.apache.org
Subject: Re: How to expose regular exception message in FeedbackPanel?

you can use the info, warn, error or fatal methods of component to
generate feedback messages.. usually you can just write:

catch (Exception e) {
  error(e.getMessage());
}



Seven Corners wrote:
> I have a form whose submission can possibly generate exceptions.  I would
> like to expose the exception text in the FeedbackPanel.  How can I do this?
>
> I've tried getting the FeedbackMessagesModel and doing a setObject() on that
> but it's not accepting a String, a FeedbackMessages List, or a new
> FeedbackMessage.  Obviously I'm going about this the wrong way.
>
> Ideas?
>
> Thanking you in advance for your time and trouble.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to expose regular exception message in FeedbackPanel?

Posted by Serkan Camurcuoglu <se...@telenity.com>.
you can use the info, warn, error or fatal methods of component to 
generate feedback messages.. usually you can just write:

catch (Exception e) {
  error(e.getMessage());
}



Seven Corners wrote:
> I have a form whose submission can possibly generate exceptions.  I would
> like to expose the exception text in the FeedbackPanel.  How can I do this?
>
> I've tried getting the FeedbackMessagesModel and doing a setObject() on that
> but it's not accepting a String, a FeedbackMessages List, or a new
> FeedbackMessage.  Obviously I'm going about this the wrong way.
>
> Ideas?
>
> Thanking you in advance for your time and trouble.
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org