Announcement Announcement Module
No announcement yet.
AbtractWizardFormController and changing command values Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbtractWizardFormController and changing command values


    I'm new here so I hope this isn't a daft question.

    I've got an app using the AbstractWizardFormController which appears to be working fine in most respects except that when form validation fails I'd like to be able to blank one of the fields when the page is reloaded. If I change the command object that is passed into validatePage() this does not update the value displayed on the reloaded page.

    I've also tried changing the command object in postProcessPage() (which the documentation says is possible to update this) and this also has no effect on the redisplayed page.

    Any suggestions on what might be wrong here ?

    I'm using spring 2.5.6.SEC01.



  • #2
    I think I've worked out what is going wrong.

    if I change the command/form object before I call errors.rejectValue() then when the page is reloaded the updated value is shown. If I update the command/form object after I make the call to errors.rejectValue() then the old value is shown.

    Quite why this is the case I'm not sure, but it certainly doesn't seem an obvious way of working for me. Now I'm aware of it I can make sure my code updates the command object at the right point.