Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a successor to FormAction for data binding and validation [SWF-297] #159

spring-operator opened this issue Apr 19, 2007 · 2 comments


Copy link

spring-operator commented Apr 19, 2007

Keith Donald opened SWF-297 and commented

FormAction handles form object data binding and validation command logic in the context of flow definition controller logic. It works fine, but its approach is not very object oriented. Specifically:

  • a FormAction instance is shared by the entire flow (and perhaps all flows), yet the binding and validation logic it executes is typically view-state specific.
  • Updating different "form objects" in the same flow is a bit unwiedly, requiring multiple independent form actions to be deployed.

This issue should devise a better solution by building support for data binding and validation into the view state construct.

Affects: 1.0

Issue Links:

2 votes, 3 watchers

Copy link
Contributor Author

Erwin Vervaet commented

Probably it would even be usefull to build a 'FormState' that automatically handles data binding and validation using FormAction behind the screen.

Copy link
Contributor Author

Erwin Vervaet commented

A possible example

<form-state id="myFormState" view="myForm">
<form-object name="foo" class="my.FormObject" validator="myValidator"/>
<transition on="submit" to="someOtherState"/>

is equivalent to:

<view-state id="myFormState" view="myForm">
<action bean="formAction" method="setupForm"/>
<transition on="submit" to="someOtherState">
<action bean="formAction" method="bindAndValidate"/>
<bean id="formAction" class="org.springframework.webflow.action.FormAction">
<property name="formObjectClass" value="my.FormObject"/>
<property name="formObjectName" value="foo"/>
<property name="validator" ref="myValidator"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant