Results 1 to 3 of 3

Thread: Wizard form controller quiestion

  1. #1

    Default Wizard form controller quiestion

    hello all ..

    in my wizard controller ..
    i have to save to db from all my pages ...

    each buttons has names saveX, saveY etc ..

    inside which method shall i write code to save based on req parameters...
    ( if on errors that should not be saved ...)

    after save i have to specify the target page also ..

    please help ..

    thanks

  2. #2
    Join Date
    Nov 2004
    Location
    Minneapolis, MN
    Posts
    19

    Default Try using...

    Mia,

    Try using the validatePage method which will validate the data being submitted. The page param can be used to define specifically how to validate and save the data.

    Code:
    protected void validatePage(Object command,Errors errors,int page)
    Define the _target<pageNumber> in your form submission. This will define what page will be displayed after the form has been submitted. You will more than likely want to ensure the allowDirtyForward and allowDirtyBack values are set to true.

    Let me know if this works. I'll watch the thread.

    Chris Rosenquest
    Object Partners, Inc.
    Minneapolis, MN

  3. #3

    Default

    thanks frozenquest ,

    but i have to save only if page validates correctly ...

    may i opt to use getTargetPage which will have errors object filled if any and so i check errors.hasErrors() before saving ....

    please let me know ur comment ...

    thanks
    Vijesh Vijay

Similar Threads

  1. Replies: 1
    Last Post: Sep 22nd, 2005, 04:08 PM
  2. Replies: 0
    Last Post: Jun 10th, 2005, 08:22 AM
  3. Wizard form controller quiestion
    By mia in forum Web
    Replies: 1
    Last Post: Apr 27th, 2005, 07:00 PM
  4. Replies: 2
    Last Post: Apr 27th, 2005, 12:30 AM
  5. Commons validation with wizard form controller
    By brianstclair in forum Web
    Replies: 0
    Last Post: Jan 14th, 2005, 02:14 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
  •