atg.droplet
Class FormTag

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by atg.droplet.Tag
          extended by atg.droplet.ComplexTag
              extended by atg.droplet.EventSender
                  extended by atg.droplet.FormTag
All Implemented Interfaces:
DropletConstants, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class FormTag
extends EventSender

This class implements functionality of an HTML form tag. A FormTag has Java Bean properties for each HTML attribute. It stores its content as Strings, Servlets and other Tags.

See Also:
Serialized Form

Field Summary
static java.lang.String BOGUS_DEFAULT_IS_STATIC_ON_IE
          Is the default the same as the static value...
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_IS_NULL
          Is the default null?
static java.lang.String DEFAULT_IS_STATIC
          Is the default the same as the static value
static java.lang.String METHOD_GET
          Values for the setMethod property
static java.lang.String METHOD_POST
           
 java.lang.String mFormId
          A unique string name to use for identifying this form
 java.lang.String mSyncPath
          If not null, the path name of a component to synchronize on before delivering form arguments
static java.lang.String OUTPUT_IS_XML
          Flat used by dsp jsp to set whether our output is XML.
static java.lang.String SUBMIT_VALUE_IS_NULL
          Is the submit value null?
static java.lang.String TAG_NAME
           
 
Fields inherited from interface atg.droplet.DropletConstants
DROPLET_ANCHOR_QUALIFIER, DROPLET_ANCHOR_VALUE, DROPLET_ARGUMENTS, DROPLET_BEAN_PREFIX, DROPLET_BEFORE_GET_ATTRIBUTE, DROPLET_EVENT_ATTRIBUTE, DROPLET_EVENT_PREFIX, DROPLET_EXCEPTIONS_ATTRIBUTE, DROPLET_PARAM_PREFIX, DROPLET_PROPERTY_PREFIX, DROPLET_SESSION_CONF, DROPLET_SUBMIT_VALUE_PREFIX, OBJECT_BEFORE_GET_ATTRIBUTE, PRIORITY_DEFAULT, SUBMIT_PRIORITY_DEFAULT, UNCHECKED_DROPLET_EXCEPTIONS_ATTRIBUTE
 
Constructor Summary
FormTag()
           
FormTag(java.lang.String pFormId, DropletEventServlet pServlet)
           
FormTag(java.lang.String pFormId, DropletEventServlet pServlet, java.lang.String pSyncPath)
           
 
Method Summary
 void addActionURL(java.lang.String pActionURL)
          Adds a new action/anchor to the list
 void addFormEventReceiver(FormEventReceiver pReceiver)
          This method is called by the event receiver.
 FormEventReceiver addTag(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pName, java.lang.String pPropertyPath, java.lang.String pType, java.lang.String pDefault, int pPriority)
          Adds a new tag to this form.
 FormEventReceiver addTag(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pName, java.lang.String pPropertyPath, java.lang.String pType, java.lang.String pDefault, int pPriority, java.lang.String pSubmitValue, boolean pUseWriter)
          This version is to remain compatible with old compiled pages that needed to explictily tell us whether to use the Writer or OutputStream.
 FormEventReceiver addTag(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pName, java.lang.String pPropertyPath, java.lang.String pType, java.lang.String pDefault, int pPriority, java.lang.String pSubmitValue, TagConverter pConverter, java.util.Properties pConverterArgs)
          Adds a new tag to this form.
 FormEventReceiver addTag(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pName, java.lang.String pPropertyPath, java.lang.String pType, java.lang.String pDefault, int pPriority, java.lang.String pSubmitValue, TagConverter pConverter, java.util.Properties pConverterArgs, boolean pUsePostField)
          Adds a new tag to this form.
 FormEventReceiver addTag(java.lang.String pName, java.lang.String pPropertyPath, java.lang.String pType, java.lang.String pDefault, int pPriority, java.lang.String pSubmitValue, TagConverter pConverter, java.util.Properties pConverterArgs)
          Adds a new tag to this form.
 java.lang.String getAction()
           
 java.util.Set getActionURL()
          Returns the actionsURL
 java.lang.String getEncType()
           
 java.lang.String[] getFormEventProperties()
          Return the names of the form event servers.
 FormEventReceiver getFormEventReceiver(java.lang.String pName)
          Return the FormEventReceiver with the specified name.
 java.lang.String[] getFormEventSenderNames()
          Return the names of the form event servers.
 java.lang.String getMethod()
           
 boolean getRequiresSessionConfirmation()
          Whether this form requires session confirmation.
 java.lang.String getSynchronized()
           
 FormTag getTag(java.lang.String pName)
           
 java.lang.String getTagName()
          Returns the name of this tag or null if no name has been specified.
 boolean hasActionURL(java.lang.String pActionURL)
          Returns true if the attribute with the specified name exists, false if not.
 boolean isXMLMimeType(DynamoHttpServletRequest pReq)
           
 boolean needsEvents()
          Returns true if the form has no stuff in it.
 int numActions()
          Returns the number of actions
 void removeEventReceiver(EventReceiver pEventReceiver)
           
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          Renders the tag and its content.
 void setAction(java.lang.String pAction)
           
 void setEncType(java.lang.String pEncType)
           
 void setMethod(java.lang.String pMethod)
           
 void setNeedsEvents(boolean pNeedsEvents)
          Makes this form handle events
 void setRequiresSessionConfirmation(boolean pRequiresSessionConfirmation)
          Whether this form requires session confirmation.
 void setSynchronized(java.lang.String pSync)
          Sets the path name of the component used to synchronize this form.
protected  void updateTagOrder(java.lang.String pNewName)
          Called when we change the Droplet handler list.
 
Methods inherited from class atg.droplet.EventSender
getImageRequestValue, getRequestValue
 
Methods inherited from class atg.droplet.ComplexTag
addContent, addContent, addContent, getContent, serviceContent, setContent
 
Methods inherited from class atg.droplet.Tag
getAttribute, getAttributes, service, serviceAttributes, setAttribute, setAttributes, setTagName
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
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
Class version string


TAG_NAME

public static final java.lang.String TAG_NAME
See Also:
Constant Field Values

METHOD_GET

public static final java.lang.String METHOD_GET
Values for the setMethod property

See Also:
Constant Field Values

METHOD_POST

public static final java.lang.String METHOD_POST
See Also:
Constant Field Values

DEFAULT_IS_STATIC

public static final java.lang.String DEFAULT_IS_STATIC
Is the default the same as the static value

See Also:
Constant Field Values

BOGUS_DEFAULT_IS_STATIC_ON_IE

public static final java.lang.String BOGUS_DEFAULT_IS_STATIC_ON_IE
Is the default the same as the static value... sometimes MS IE puts in space followed by a null... no idea why. See bug 62211.

See Also:
Constant Field Values

DEFAULT_IS_NULL

public static final java.lang.String DEFAULT_IS_NULL
Is the default null?

See Also:
Constant Field Values

SUBMIT_VALUE_IS_NULL

public static final java.lang.String SUBMIT_VALUE_IS_NULL
Is the submit value null?

See Also:
Constant Field Values

OUTPUT_IS_XML

public static final java.lang.String OUTPUT_IS_XML
Flat used by dsp jsp to set whether our output is XML.

See Also:
Constant Field Values

mFormId

public java.lang.String mFormId
A unique string name to use for identifying this form


mSyncPath

public java.lang.String mSyncPath
If not null, the path name of a component to synchronize on before delivering form arguments

Constructor Detail

FormTag

public FormTag(java.lang.String pFormId,
               DropletEventServlet pServlet)

FormTag

public FormTag(java.lang.String pFormId,
               DropletEventServlet pServlet,
               java.lang.String pSyncPath)

FormTag

public FormTag()
Method Detail

addActionURL

public void addActionURL(java.lang.String pActionURL)
Adds a new action/anchor to the list

Parameters:
pActionURL - the action to be added

hasActionURL

public boolean hasActionURL(java.lang.String pActionURL)
Returns true if the attribute with the specified name exists, false if not.


numActions

public int numActions()
Returns the number of actions


getActionURL

public java.util.Set getActionURL()
Returns the actionsURL


setAction

public void setAction(java.lang.String pAction)

getAction

public java.lang.String getAction()

setMethod

public void setMethod(java.lang.String pMethod)

getMethod

public java.lang.String getMethod()

setEncType

public void setEncType(java.lang.String pEncType)

getEncType

public java.lang.String getEncType()

getTagName

public java.lang.String getTagName()
Description copied from class: Tag
Returns the name of this tag or null if no name has been specified.

Overrides:
getTagName in class Tag

getTag

public FormTag getTag(java.lang.String pName)

getFormEventReceiver

public FormEventReceiver getFormEventReceiver(java.lang.String pName)
Return the FormEventReceiver with the specified name.

Parameters:
pName - the name of the FormEventReceiver to return
Returns:
the receiver with the specified name, if found, null otherwise.

needsEvents

public boolean needsEvents()
Returns true if the form has no stuff in it.


setNeedsEvents

public void setNeedsEvents(boolean pNeedsEvents)
Makes this form handle events


setSynchronized

public void setSynchronized(java.lang.String pSync)
Sets the path name of the component used to synchronize this form.


getSynchronized

public java.lang.String getSynchronized()

setRequiresSessionConfirmation

public void setRequiresSessionConfirmation(boolean pRequiresSessionConfirmation)
Whether this form requires session confirmation. Defaults to true.


getRequiresSessionConfirmation

public boolean getRequiresSessionConfirmation()
Whether this form requires session confirmation. Defaults to true.


addFormEventReceiver

public void addFormEventReceiver(FormEventReceiver pReceiver)
This method is called by the event receiver. When it is added to some content, it searches up the hierarchy until it finds a Form and it adds itself to us.


removeEventReceiver

public void removeEventReceiver(EventReceiver pEventReceiver)

addTag

public FormEventReceiver addTag(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse,
                                java.lang.String pName,
                                java.lang.String pPropertyPath,
                                java.lang.String pType,
                                java.lang.String pDefault,
                                int pPriority)
                         throws java.io.IOException,
                                javax.servlet.ServletException
Adds a new tag to this form. This method is used by the page compiler to add/update an entry in the event receiver table.

Throws:
java.io.IOException
javax.servlet.ServletException

addTag

public FormEventReceiver addTag(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse,
                                java.lang.String pName,
                                java.lang.String pPropertyPath,
                                java.lang.String pType,
                                java.lang.String pDefault,
                                int pPriority,
                                java.lang.String pSubmitValue,
                                boolean pUseWriter)
                         throws java.io.IOException,
                                javax.servlet.ServletException
This version is to remain compatible with old compiled pages that needed to explictily tell us whether to use the Writer or OutputStream. Now, we can just always use the OutputStream and it will work even if the request output is going through a Writer.

Throws:
java.io.IOException
javax.servlet.ServletException

addTag

public FormEventReceiver addTag(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse,
                                java.lang.String pName,
                                java.lang.String pPropertyPath,
                                java.lang.String pType,
                                java.lang.String pDefault,
                                int pPriority,
                                java.lang.String pSubmitValue,
                                TagConverter pConverter,
                                java.util.Properties pConverterArgs)
                         throws java.io.IOException,
                                javax.servlet.ServletException
Adds a new tag to this form. This method is used by the page compiler to add/update an entry in the event receiver table. This version of the method takes a "submitvalue" (null for no submit).

Throws:
java.io.IOException
javax.servlet.ServletException

addTag

public FormEventReceiver addTag(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse,
                                java.lang.String pName,
                                java.lang.String pPropertyPath,
                                java.lang.String pType,
                                java.lang.String pDefault,
                                int pPriority,
                                java.lang.String pSubmitValue,
                                TagConverter pConverter,
                                java.util.Properties pConverterArgs,
                                boolean pUsePostField)
                         throws java.io.IOException,
                                javax.servlet.ServletException
Adds a new tag to this form. This method is used by the page compiler to add/update an entry in the event receiver table. This version of the method takes a "submitvalue" (null for no submit).

Throws:
java.io.IOException
javax.servlet.ServletException

addTag

public FormEventReceiver addTag(java.lang.String pName,
                                java.lang.String pPropertyPath,
                                java.lang.String pType,
                                java.lang.String pDefault,
                                int pPriority,
                                java.lang.String pSubmitValue,
                                TagConverter pConverter,
                                java.util.Properties pConverterArgs)
                         throws javax.servlet.ServletException
Adds a new tag to this form. This method is used by the page compiler to add/update an entry in the event receiver table. This version of the method takes a "submitvalue" (null for no submit).

Throws:
javax.servlet.ServletException

updateTagOrder

protected void updateTagOrder(java.lang.String pNewName)
Called when we change the Droplet handler list. It updates the mapping that we have to determine the proper handler order based on the priority.


service

public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
Renders the tag and its content.

Overrides:
service in class ComplexTag
Throws:
javax.servlet.ServletException
java.io.IOException

isXMLMimeType

public boolean isXMLMimeType(DynamoHttpServletRequest pReq)

getFormEventSenderNames

public java.lang.String[] getFormEventSenderNames()
Return the names of the form event servers.


getFormEventProperties

public java.lang.String[] getFormEventProperties()
Return the names of the form event servers.