You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by walnutmon <ju...@gmail.com> on 2009/02/05 14:49:23 UTC
Custom Domain Exception Handling
All,
I am working with a domain where the POJOs have a method that checks there
values, and throws an exception with the error message if there is a problem
with one of there property values. I am using panels to model these
objects, is there something I can do to utilize this behavior when a form
submits. So that the form submit, and persisting of the models properties
will make the panel aware that there is an error.
I"m not looking for a full explanation of an implementation, just a quick
explanation of how the model objects properties get persisted.
Thanks!
Justin
--
View this message in context: http://www.nabble.com/Custom-Domain-Exception-Handling-tp21851678p21851678.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: Custom Domain Exception Handling
Posted by Sven Meier <sv...@meiers.net>.
In our projects we let domain and service exceptions trickle down into
Wicket and be handled in a custom RequestCycle.
Of course this requires them to be RuntimeExceptions, but this seems to
be en vogue anyway.
Nice thing is this technique works non-form requests (e.g. links) too.
Sven
Igor Vaynberg schrieb:
> class myform extends form {
> public void process() {
> try {
> super.process();
> } catch (basedomainexception e) {
> error(e.getusermessage());
> }
> }
> }
>
> -igor
>
> On Thu, Feb 5, 2009 at 5:49 AM, walnutmon <ju...@gmail.com> wrote:
>
>> All,
>>
>> I am working with a domain where the POJOs have a method that checks there
>> values, and throws an exception with the error message if there is a problem
>> with one of there property values. I am using panels to model these
>> objects, is there something I can do to utilize this behavior when a form
>> submits. So that the form submit, and persisting of the models properties
>> will make the panel aware that there is an error.
>>
>> I"m not looking for a full explanation of an implementation, just a quick
>> explanation of how the model objects properties get persisted.
>>
>> Thanks!
>> Justin
>> --
>> View this message in context: http://www.nabble.com/Custom-Domain-Exception-Handling-tp21851678p21851678.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
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: Custom Domain Exception Handling
Posted by Igor Vaynberg <ig...@gmail.com>.
class myform extends form {
public void process() {
try {
super.process();
} catch (basedomainexception e) {
error(e.getusermessage());
}
}
}
-igor
On Thu, Feb 5, 2009 at 5:49 AM, walnutmon <ju...@gmail.com> wrote:
>
> All,
>
> I am working with a domain where the POJOs have a method that checks there
> values, and throws an exception with the error message if there is a problem
> with one of there property values. I am using panels to model these
> objects, is there something I can do to utilize this behavior when a form
> submits. So that the form submit, and persisting of the models properties
> will make the panel aware that there is an error.
>
> I"m not looking for a full explanation of an implementation, just a quick
> explanation of how the model objects properties get persisted.
>
> Thanks!
> Justin
> --
> View this message in context: http://www.nabble.com/Custom-Domain-Exception-Handling-tp21851678p21851678.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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org