Results 1 to 4 of 4

Thread: about referenceData

  1. #1

    Default about referenceData

    hi,

    New to Spring. Trying to use the SimpleFormController for my forms.
    for testing, I have two forms, A and B, and two corresponding controllers, Ac, and Bc. User fill out some info on A, hit submit, and goes to B.

    In Ac's onSubmit, I have this:

    return new ModelAndView(getSuccessView(), "model", myModel);

    When I do that, the referenceData() method in Bc was never called. So I changed it to:

    return new ModelAndView(new RedirectView(getSuccessView() + ".htm"), "model", myModel);

    Now referenceData() gets called, but the model object was not passed.

    How do I ensure both?

    Thanks,

    yan

  2. #2
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default Re: about referenceData

    Try either:
    Code:
    return new ModelAndView(new RedirectView(getSuccessView() + ".htm"), myModel);
    or:
    Code:
    return new ModelAndView("forward:" + getSuccessView() + ".htm"), myModel);
    --Jing Xue

  3. #3

    Default

    Yup, tried it, but the model now is only a map of strings. it can't be a map of objects, otherwise the objects are serialized.

  4. #4
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default

    Did you try the second one, which should be a server side forward with the original model?
    --Jing Xue

Similar Threads

  1. Replies: 5
    Last Post: Jan 27th, 2009, 07:07 AM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 04:02 AM
  3. ReferenceData Binding problem
    By kermie5000 in forum Web
    Replies: 7
    Last Post: Sep 19th, 2005, 11:12 AM
  4. command object in referenceData??
    By smithabr in forum Web
    Replies: 5
    Last Post: Jul 12th, 2005, 06:11 PM
  5. Replies: 2
    Last Post: Sep 2nd, 2004, 08:18 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
  •