Results 1 to 2 of 2

Thread: Pre binding fields on a command object

  1. #1
    Join Date
    Oct 2004
    Location
    Amsterdam, The Netherlands
    Posts
    28

    Default Pre binding fields on a command object

    I'm using a SimpleFormController. I use the same form to edit or create a new hibernate command object that's saved to the database afterwards.

    One field should be immediatly set when the form is loaded. I pass the parameter through the request. This works when I use setBindOnNewForm(true). But there are some required fields, and the form gives an error because it's binded.

    Is there a way to automaticly set some properties on a command object without really posting the form?

  2. #2
    Join Date
    Oct 2004
    Location
    Amsterdam, The Netherlands
    Posts
    28

    Default

    Well, it turns out this can be easily achieved with this code in formBackingObject():

    if (!isFormSubmission(request)) {
    bindAndValidate(request, command);
    }

Similar Threads

  1. Replies: 1
    Last Post: Sep 22nd, 2005, 04:42 AM
  2. Replies: 7
    Last Post: Sep 13th, 2005, 01:45 AM
  3. Replies: 2
    Last Post: Jun 3rd, 2005, 09:54 AM
  4. Date binding from 3 text fields
    By Sergei Rogovskiy in forum Web
    Replies: 1
    Last Post: Apr 19th, 2005, 06:10 AM
  5. Replies: 2
    Last Post: Aug 17th, 2004, 04:16 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
  •