Issue Details (XML | Word | Printable)

Key: SWF-325
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Erwin Vervaet
Reporter: Marten Deinum
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Web Flow

Clearify the javadocs of the setupForm method.

Created: 07/Jun/07 10:04 AM   Updated: 08/Jun/07 02:36 AM   Resolved: 08/Jun/07 02:36 AM
Component/s: None
Affects Version/s: 1.0.3
Fix Version/s: 1.0.4

Time Tracking:
Not Specified


 Description  « Hide
As a result of http://forum.springframework.org/showthread.php?t=39757 we started to doubt about the clearity of the setupForm methods javadoc.

There is a reference to the createFormObject method however this can lead to confusions. It is assumed by some that the createFormObject method is called each time setupForm is called. However the createFormObject is only called when no form object is currently present in the configured scope. This can be made clearer in the javadocs.

Erwin Vervaet added a comment - 08/Jun/07 02:30 AM
Note that the JavaDoc already says:
"Prepares a form object for display in a new form, creating it and caching it in the {@link #getFormObjectScope()} if necessary."

Erwin Vervaet added a comment - 08/Jun/07 02:36 AM
Added the following paragraph of JavaDoc:

* A new form object instance will only be created (or more generally
* acquired) with a call to {@link #createFormObject(RequestContext)},
* if the form object does not yet exist in the configured
* {@link #getFormObjectScope() scope}. If you want to reset the form
* handling machinery, including creation or loading of a fresh form object
* instance, call {@link #resetForm(RequestContext)} instead.