HiRISE

HiRISE.HiWish
Class PreviewSuggestionAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.BaseAction
          extended by org.apache.struts.actions.DispatchAction
              extended by HiRISE.HiWish.HiWishAction
                  extended by HiRISE.HiWish.PreviewSuggestionAction

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.


Field Summary
 
Fields inherited from class HiRISE.HiWish.HiWishAction
ID, logger
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, methods, types
 
Fields inherited from class org.apache.struts.actions.BaseAction
messages
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
PreviewSuggestionAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping map, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 
Methods inherited from class HiRISE.HiWish.HiWishAction
closeConnection, generateSecureToken, getConnection, getContextURL, getContextVariable, getMailSession, getWishQuota, memorizeUser, rememberUser, sendEmail, sha1hex
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, dispatchMethod, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviewSuggestionAction

public PreviewSuggestionAction()
Method Detail

execute

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping map,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest req,
                                                      javax.servlet.http.HttpServletResponse res)
                                               throws Exception
Overrides:
execute in class org.apache.struts.actions.DispatchAction
Parameters:
map - Struts configured mapping
form - The form instance, if any
req - Request instance
res - Response instance
Throws:
Exception

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona