com.sas.servlet.tbeans.ipage.iform
Class BaseIFormElement

com.sas.servlet.tbeans.ipage.iform.BaseIFormElement
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, RenderableInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
IFormHidden, IFormListBox, IFormPassword, IFormRadio, IFormTextEntry

public abstract class BaseIFormElement

The base object for all IForm sub-elements. These objects are added to an IForm via the IForm's add(BaseIFormElement element).

For More Information:

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.ipage.BaseIPage
HTML_PROLOG, WML_PROLOG
 
Constructor Summary
BaseIFormElement()
          The default constructor.
 
Method Summary
 java.lang.String getAcceptLabel()
          Get the acceptLabel String
 java.lang.String getAcceptURL()
          Get the acceptURL String
 IForm getParentIForm()
          Gets the IForm parent of this IFormElement;
 java.lang.String getPrompt()
          Gets the prompt of the element.
 java.lang.String getShortPrompt()
          Gets the shortPrompt of the element.
 void setAcceptLabel(java.lang.String acceptLabel)
          Set the acceptLabel String to an href.
 void setAcceptURL(java.lang.String acceptURL)
          This method is called internally and does not need to be called directly.
 void setParentIForm(IForm parentIForm)
          Sets the parent IForm of this element.
 void setPrompt(java.lang.String prompt)
          Sets the prompt of this element.
 void setShortPrompt(java.lang.String shortPrompt)
          Sets the shortPrompt of this element.
 void write(java.io.PrintWriter out)
          Writes the out the IFormElement, including writing the header, base, and footer.
 void write(java.io.PrintWriter out, boolean writeHiddenElements)
          Writes the out the IFormElement, including writing the header, base, and footer.
 void writeBase(java.io.PrintWriter out)
          Writes the main base section of the IFormElement bean.
 void writeFooter(java.io.PrintWriter out)
          Writes the footer.
 void writeHeader(java.io.PrintWriter out)
          Writes the header.
 
Methods inherited from class com.sas.servlet.tbeans.ipage.BaseIPage
addOption, getBrowserType, getCacheTimeToLive, getOptionLabel, getOptionURL, getTitle, resolveNewLine, setBrowserType, setCacheTimeToLive, setId, setName, setName, setRequest, setResponse, setStyle, setStyleClass, setTitle, toString, writeBase, writeBase, writeFooter, writeFooter, writeHeader, writeHeader
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setInputTransform, setLocale, setLocaleDependentProperties, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, write, write, write
 

Constructor Detail

BaseIFormElement

public BaseIFormElement()
The default constructor.

Method Detail

setParentIForm

public void setParentIForm(IForm parentIForm)
Sets the parent IForm of this element.

Parameters:
parentIForm - The parent IForm

getParentIForm

public IForm getParentIForm()
Gets the IForm parent of this IFormElement;

Returns:
The parent IForm element

setPrompt

public void setPrompt(java.lang.String prompt)
Sets the prompt of this element. This String is written out before the element. If a different prompt is desired for WML or HDML devices, use setShortPrompt. If shortPrompt is not set, then prompt is used for all markup languages. HTML always uses prompt.

Parameters:
prompt - The prompt String

getPrompt

public java.lang.String getPrompt()
Gets the prompt of the element.

Returns:
The prompt String

setShortPrompt

public void setShortPrompt(java.lang.String shortPrompt)
Sets the shortPrompt of this element. This String is written out before the element. The shortPrompt is used for WML or HDML output as an alternative to prompt. If not set, then prompt is used for all markup languages. HTML always uses prompt.

Parameters:
shortPrompt - The shortPrompt String

getShortPrompt

public java.lang.String getShortPrompt()
Gets the shortPrompt of the element.

Returns:
The shortPrompt String

setAcceptURL

public void setAcceptURL(java.lang.String acceptURL)
This method is called internally and does not need to be called directly. Set the accept String to an href. On phones, this corresponds to a softkey whose destination is defined by the acceptURL parameter. Uses the phones default label if not set in setAcceptLabel. Calls to the add method on the IForm bean will setup the accept destination to be the next element that gets added. On phones, the last element uses the IForm's action and actionLabel rather than the elements acceptURL and acceptLabel. In HTML, nothing is written for acceptURL or acceptLabel since it is not a card/deck based markup language.

Parameters:
accept - The accept href String

setAcceptLabel

public void setAcceptLabel(java.lang.String acceptLabel)
Set the acceptLabel String to an href. On phones, this corresponds to a softkey whose destination is defined by the acceptURL parameter. Uses the acceptLabel parameter as a label for the softkey. Calls to the add method on the IForm bean will setup the accept destination to be the next element that has been added. On phones, the last element uses the IForm's action and actionLabel rather than the elements acceptURL and acceptLabel. In HTML, nothing is written for acceptURL or acceptLabel since it is not a card/deck based markup language. To support a wide range of devices, this String should be a maximum of 5 characters.

Parameters:
acceptLabel - The accept label String

getAcceptURL

public java.lang.String getAcceptURL()
Get the acceptURL String

Returns:
String The accept href String

getAcceptLabel

public java.lang.String getAcceptLabel()
Get the acceptLabel String

Returns:
String The acceptLabel for the accept String

write

public void write(java.io.PrintWriter out,
                  boolean writeHiddenElements)
           throws java.io.IOException
Writes the out the IFormElement, including writing the header, base, and footer. This method is used internally and usually will not need to be called directly. Only the write method on the IForm needs to be called.

Parameters:
out - The output stream
boolean - True if this element should include the form's hidden elements
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException

Writes the out the IFormElement, including writing the header, base, and footer. This method is used internally and usually will not need to be called directly. Only the write method on the IForm needs to be called.

This method calls the cleanUpResources method at the end to reset the request and response back to null.

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class BaseIPage
Parameters:
out - The output stream
boolean - True if this element should include the form's hidden elements
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeHeader

public void writeHeader(java.io.PrintWriter out)
                 throws java.io.IOException
Writes the header. Writes IFormElement's header markup.

Overrides:
writeHeader in class BaseIPage
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeBase

public void writeBase(java.io.PrintWriter out)
               throws java.io.IOException
Writes the main base section of the IFormElement bean. Should be overridden in subclass. The writeHeader method should be called before this method and writeFooter should be called after this method.

Overrides:
writeBase in class BaseIPage
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeFooter

public void writeFooter(java.io.PrintWriter out)
                 throws java.io.IOException
Writes the footer. Writes the IFormElement footer information. This is normally the last information written.

Overrides:
writeFooter in class BaseIPage
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.