> -----Original Message-----
> From: Erik Weber [mailto:[EMAIL PROTECTED] 
> Sent: February 14, 2005 8:39 AM
> To: Struts Users Mailing List
> Subject: Re: Validation Strategies?
> 
> 
> 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

Erik,

OK - I misunderstood your previous reply a bit.  Sorry...

The problem isn't so much the error messages, but associating them with
the GUI controls.

Our Swing application handles its validation differently from the web
apps... The application has a 'tabbed' interface, but we force a
validation and save any time the user changes tabs.

In the web world, we have also a 'tabbed' interface, but the validation
is performed when the user explicitly performs a save.  This, BTW, is at
the request of the users, who want to be able to do semi-heads down data
entry and perform validation at the end.  So, the validation is applied
to all data entered in all tabs, so we need some way of associating an
error at least with a specific tab.  

For example, a Client has an Address, the City in that address model is
mandatory.  We also have the concept of Associates to a Client, who also
have addresses, and the City is mandatory there as well.  The Client
information is on a separate tab from the Associate information.  If the
user doesn't enter a City in the Address on one of those tabs, how would
you approach taking a validation error from way down in the domain model
for the address and indicating to the user the specific tab on which the
City wasn't entered?

Let's complicate things a bit more... In both of those situations
(Client and Associate), the user can enter multiple addresses, e.g.
Home, Business, Mailing, etc.  How do you associate a validation error
in one of those address instances with the particular instance in the
presentation?

Thanks!

Dave Rooney
Secure Systems Development
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to