Announcement Announcement Module
No announcement yet.
Multiple ModelAttributes, multiple validations Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    Never mind. I figured it out.


    • #3
      how did you do that? I am in similar situation?


      • #4
        If you're in a master-detail kind of relationship, the foreign key is already on the master. For example (in my case):

        Master Table:
        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 -
        Detail uIDDetail

        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:

        Make sense?


        • #5
          it does..thanks for the really helps!


          • #6
            You're welcome!