public class PreviewSuggestionAction
extends HiWishAction
If the SuggestionForm is valid, forwards to a preview page where the user
can see all fields that are to be submitted. If invalid, Struts will kick
back to the editor.
When the preview page is created, a new token is placed in the session, in
addition to the Suggestion object. The Suggestion object replaces any existing
prior instance.
The user can choose to go back from the preview page to the editor, or
continue to the create suggestion action. If they continue, the token will be
checked then removed from the session. This prevents form double-submits and
reloading to create multiple copies of a suggestion. Also in the create suggestion
action, the Suggestion object will be taken from the session and used to fill
out the database fields.