atg.droplet
Class EmptyFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
All Implemented Interfaces:
DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
GenericFormHandler

public class EmptyFormHandler
extends GenericService
implements DropletFormHandler


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
EmptyFormHandler()
           
 
Method Summary
 void afterGet(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Called after the page containing this form has been rendered, but before the output stream is closed (unless it was closed explicitly by the page)

This method is suitable for releasing any resources obtained during the processing of the request, logging of the operation performed, etc.

 boolean afterSet(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Called after all form arguments have been submitted, before the page is serviced (or rendered).
 void beforeGet(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Called when a form is rendered that references this bean.
 boolean beforeSet(DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          Called when a form is submitted that references this bean before any set methods have been called, i.e.
 void handleFormException(DropletFormException exception, DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          This is called if an exception occurred when getting or setting the values of the form.
 void handleUncheckedFormException(java.lang.Throwable exception, DynamoHttpServletRequest request, DynamoHttpServletResponse response)
          This is called if an unchecked exception occurred when getting or setting the values of the form.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

EmptyFormHandler

public EmptyFormHandler()
Method Detail

beforeSet

public boolean beforeSet(DynamoHttpServletRequest request,
                         DynamoHttpServletResponse response)
                  throws DropletFormException
Called when a form is submitted that references this bean before any set methods have been called, i.e. first thing in processing the form data.

If multiple form handlers exist for the same form, they are called in an order based on the priority of the input tag that references the form.

Specified by:
beforeSet in interface DropletFormHandler
Returns:
true if form processing should continue, false if it should be aborted
Throws:
DropletFormException

afterSet

public boolean afterSet(DynamoHttpServletRequest request,
                        DynamoHttpServletResponse response)
                 throws DropletFormException
Called after all form arguments have been submitted, before the page is serviced (or rendered). If the a form is submitted to the same page it is rendered, this method is called before the beforeGet method of the DropletFormHandler.

This method is suitable for doing form submit processing on forms that do not have a submit button (i.e. have only a single text field) or for cleaning up after the form has been submitted.

Specified by:
afterSet in interface DropletFormHandler
Returns:
true if request processing should continue and the requested URL should be served, false if it should be aborted. If false is returned, you typically have already completed the request with a redirect or by sending output to the output stream.
Throws:
DropletFormException

beforeGet

public void beforeGet(DynamoHttpServletRequest request,
                      DynamoHttpServletResponse response)
Called when a form is rendered that references this bean. This call is made before the service method of the page is invoked. If form data is processed during the same request, it will be called after all form data has been processed.

If multiple form handlers exist for the same form, they are called in an order based on the priority of the input tag that references the form.

Specified by:
beforeGet in interface DropletFormHandler

afterGet

public void afterGet(DynamoHttpServletRequest request,
                     DynamoHttpServletResponse response)
Called after the page containing this form has been rendered, but before the output stream is closed (unless it was closed explicitly by the page)

This method is suitable for releasing any resources obtained during the processing of the request, logging of the operation performed, etc.

Specified by:
afterGet in interface DropletFormHandler

handleFormException

public void handleFormException(DropletFormException exception,
                                DynamoHttpServletRequest request,
                                DynamoHttpServletResponse response)
This is called if an exception occurred when getting or setting the values of the form. This method is called once for each exception that occurs when processing the setX method.

Specified by:
handleFormException in interface DropletFormHandler

handleUncheckedFormException

public void handleUncheckedFormException(java.lang.Throwable exception,
                                         DynamoHttpServletRequest request,
                                         DynamoHttpServletResponse response)
This is called if an unchecked exception occurred when getting or setting the values of the form. This method is called once for each exception that occurs when processing the setX, getX or handle method.

Specified by:
handleUncheckedFormException in interface DropletFormHandler