Results 1 to 2 of 2

Thread: Compound binding of multiple HTML elements to one property

  1. #1
    Join Date
    Dec 2004
    Posts
    2

    Default Compound binding of multiple HTML elements to one property

    Though somewhat familiar with custom PropertyEditors and the initBinder method of Controller, I am struggling to figure out how to bind the combination of two submission fields to a single property of the command object.

    Example:
    An HTML form that allows the user to input a date with dropdowns for month, day, and year that maps/binds to a java.util.Date property of the form-backing command object.

    While it would be fun to write the "Hibernate" of Object-HTML-Mapping in the long-term, in the short-term I'm hoping that at least a case-specific mapping can be plugged in easily to Spring somwhere. Any suggestions?

    - Michael Alford

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    bind the combination of two submission fields to a single property of the command object
    You need a nested object that represents a date made of the individual properties. That nested object can then be made part of you command object.

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 4
    Last Post: Aug 17th, 2005, 04:42 AM
  5. Replies: 2
    Last Post: May 13th, 2005, 05:42 AM

Posting Permissions

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