Results 1 to 3 of 3

Thread: Example of a Master Detail Form

  1. #1
    Join Date
    Oct 2004
    Posts
    9

    Default Example of a Master Detail Form

    Does anyone have an example of an editable Master - Detail form scenario? Most of the example code in the petstore and petclinic seems to be examples where one item is edited at a time.

    How would you set up your form controller and your binds in the jsp if you wanted to edit multiple line items of some object, ala grid control style.

    Thanks,

  2. #2
    Join Date
    Sep 2004
    Location
    Boston, US
    Posts
    130

  3. #3
    Join Date
    Aug 2004
    Location
    Amsterdam, The Netherlands
    Posts
    10

    Default

    I've recently implemented a master-detail situation in Spring MVC. The JIRA issue (the link provided by sjivan) was a good starting point. Indeed, allmost all intuitive property paths like "detail[3].address[0].streetName" just work on the BeanWrapper, and therefore also in your MVC forms.

    As is said already in the referenced JIRA issue, you will need indexed access. So you should have an Array, List or Map of details in your master. If you have a Set (like I did), just create a Helper wrapper class.
    Indeed, a Map also works, I tried it out on a BeanWrapper instance, before designing my forms.

    This all seems undocumented, or I can't find it. It's not in the reference and it's not in Rod Johnson's two books (j2ee d+d and j2ee w/o ejb)!
    -paul.

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 9
    Last Post: May 4th, 2006, 09:53 AM
  3. Master Detail form
    By mia in forum Web
    Replies: 3
    Last Post: May 2nd, 2005, 09:24 AM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •