Announcement Announcement Module
No announcement yet.
populating BindingActionForm Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • populating BindingActionForm


    i've been playing around with adding Web Flow to an existing struts app. i have a form object thats coming out of the database.

    I need some way to bind the form object back to the BindingActionForm, so I can use the struts taglibs to prepopulate the html form.

    Looking through the code, I see that FlowAction only binds the errors back on to the BindingActionForm, but not the form object.

    Is there a recommended way to handle this?

    I was thinking something along the lines of a FlowExecutionListener that could on 'requestProcessed' get the StrutsEvent and pull out the BindingActionForm and do a BeanUtils.copyProperties of form object to the action form.

    The only thing is that this should probably only happen on a new form or a successul request, because on an error you would want the ActionForm to contain the original input from the user.

    Any thoughts?

  • #2

    i had a configuration issue and i didn't see what BindingAwarePropertyUtils was doing.

    very clever stuff :-)