Announcement Announcement Module
Collapse
No announcement yet.
Wizard form controller quiestion Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment

      Working...
      X