What I'm suggesting would not cause duplicate validation logic. The
(business) validation logic is still performed in the manager layer (no
matter the client). What I'm suggesting is simply a strategy to do
something similar to what Vic suggested, which is to map exceptions
related to properties to bundle messages (if not as strong a coupling as
Vic suggested). You *would* have to set up something more for your Swing
client as far as renderer value-fetching goes (I use nearly the
identical strategy in my Swing clients -- mapping error codes to bundle
messages), but it wouldn't cause duplicate business validation. Just to
make sure I made my suggestion clearly.
Good luck,
Erik
Rooney.Dave wrote:
-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: February 14, 2005 8:19 AM
To: Struts Users Mailing List
Subject: Re: Validation Strategies?
I use Struts' declarative exception handling abilities to handle
manager-layer validation errors. Exceptions that are not
caught by your Actions can be configured to be handled by Struts'
default
exception handler, or even better, your own exception handler (Struts
is easy to extend in this fashion). The Exception handler looks up an
appropriate message (for the user) in a resource bundle, just as the
Validator
plugin does when it encounters exceptions.
Erik
Erik,
Part of the problem is that our system has both a Swing GUI front-end
and Struts/JSP. We don't want to duplicate the validation logic.
Thanks!
Dave Rooney
Secure Systems Development
[EMAIL PROTECTED]
---------------------------------------------------------------------
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]