Results 1 to 3 of 3

Thread: Boolean, Date, Integer Fields on Form

  1. #1

    Default Boolean, Date, Integer Fields on Form

    I tried experiment today. I added a boolean property to my form object and put object on a form. Good thing is, the field shown as checkbox automaticaly! Very nice to me! 8)

    Now I am wondering, how I can add a date property to form object and have field shown in MyDateControl (a custom JComponent for edit java.util.Date) instead of JTextField? Or maybe I can use JFormattedTextField with date format (but how)?

    How I can add also a Integer property and have it shown in JSpinner?
    Stefano Rossi

    "If I want your opinion, I'll give it to you."

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    The PropertyEditorRegistry is your friend here: you can register a custom editor that returns a custom date control for all date properties, for example. Thank Jim Moore for that one! :-)
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Sep 2004
    Location
    Ghent, Belgium
    Posts
    224

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 17
    Last Post: Jan 2nd, 2007, 01:43 PM
  3. Replies: 6
    Last Post: Sep 24th, 2006, 11:58 AM
  4. Replies: 1
    Last Post: Sep 22nd, 2005, 04:42 AM
  5. Replies: 3
    Last Post: Jul 7th, 2005, 06:51 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
  •