Jul 19th, 2012, 05:42 PM
Multiple ModelAttributes, multiple validations
Think of a page with master and detail records on it, with separate classes for the master record and the detail record. How do you do that with Spring? I've read the reference guide for Spring, and it never really says how to do it. Unless I missed it, of course!
Can you help?
Jul 20th, 2012, 01:48 PM
Never mind. I figured it out.
Aug 29th, 2012, 09:11 AM
how did you do that? I am in similar situation?
Aug 29th, 2012, 10:29 AM
If you're in a master-detail kind of relationship, the foreign key is already on the master. For example (in my case):
UIDMaster key for the master
UIDDetail key for the details
In the class which you generated, you'll see a place where you refer to a class in the master class:
Detail detail- or -
You only need one validator - the master validator. Where you need to refer to fields actually on the detail class, you do it like this:
Aug 29th, 2012, 10:31 AM
it does..thanks for the reply..it really helps!
Aug 29th, 2012, 10:59 AM