Well, you could create your own BusinessPropertyModel class that subclasses PropertyModel and catches those exceptions, perhaps. You'd have to figure out an elegant way to propagate the error message to the FormComponent that caused the issue. If you don't need component-specific error messages you could just call error() on the Session, I guess.
On Fri, Jan 28, 2011 at 3:34 PM, fernandospr <[email protected]> wrote: > > Thanks James that was a quick response. > The problem is that I already have many classes designed this way. > Also, the classes where created on purpose this way as an analysis/design > decision, I mean, only valid business objects should be created. > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-businness-model-classes-that-check-for-rules-tp3245298p3245323.html > Sent from the Users forum 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]
