com.sas.servlet.tbeans.ipage
Class IText

com.sas.servlet.tbeans.ipage.IText
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, RenderableInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class IText

The IText is a TransformationBean™ used to produce a text page using a variety of markup languages (including WML,HDML, and HTML). This class will produce the appropriate markup language based on the requesting browser. For example, if a user accesses a JSP page containing an IText from their cell phone, the IText bean will produce either a WML or HDML page based on the type of browser the cell phone contained. If another user accesses the same JSP page using Internet Explorer, the IText bean would produce HTML instead.

Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:IText custom tag.

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:
BaseIPage, Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.ipage.BaseIPage
HTML_PROLOG, WML_PROLOG
 
Constructor Summary
IText()
          Construct a new IText
IText(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Construct a new IText
IText(java.lang.String text)
          Construct a new IText
IText(java.lang.String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Construct a new IText
 
Method Summary
 java.lang.String getAcceptLabel()
          Get the acceptLabel String
 java.lang.String getAcceptURL()
          Get the acceptURL String
 int getAlignment()
          Returns the alignment.
 java.lang.String getText()
          Get the text
 void setAcceptLabel(java.lang.String acceptLabel)
          Set the acceptLabel String.
 void setAcceptURL(java.lang.String acceptURL)
          Set the acceptURL String to an href.
 void setAlignment(int value)
          Sets the alignment.
 void setText(java.lang.String value)
          Set the text to be written out to the requesting device.
 void writeBase(java.io.PrintWriter out)
          Writes the text data in the appropriate markup language
 
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, write, writeBase, writeBase, writeFooter, writeFooter, writeFooter, writeHeader, 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

IText

public IText()
Construct a new IText


IText

public IText(java.lang.String text)
Construct a new IText

Parameters:
text - The text data

IText

public IText(javax.servlet.http.HttpServletRequest request,
             javax.servlet.http.HttpServletResponse response)
Construct a new IText

Parameters:
request - The request object
response - The response object

IText

public IText(java.lang.String name,
             javax.servlet.http.HttpServletRequest request,
             javax.servlet.http.HttpServletResponse response)
Construct a new IText

Parameters:
name - The name
request - The request object
response - The response object
Method Detail

setAlignment

public void setAlignment(int value)
Sets the alignment. Valid values are javax.swing.SwingConstants.LEFT (default), javax.swing.SwingConstants.CENTER, and javax.swing.SwingConstants.RIGHT.

Parameters:
value - the horizontal alignment of the Text.

getAlignment

public int getAlignment()
Returns the alignment. Returned values can be compared against javax.swing.SwingConstants.LEFT (default), javax.swing.SwingConstants.CENTER, and javax.swing.SwingConstants.RIGHT.

Returns:
int the alignment

setAcceptURL

public void setAcceptURL(java.lang.String acceptURL)
Set the acceptURL String to an href. On phones, this corresponds to a softkey whose destination is defined by the acceptURL parameter. In HTML, a link is used. To set the label associated with the URL, call setAcceptLabel. If no label is set, then the default label is used for most devices while the URL istself is used in HTML as the link description.

Parameters:
acceptURL - The acceptURL href String

setAcceptLabel

public void setAcceptLabel(java.lang.String acceptLabel)
Set the acceptLabel String. On phones, this corresponds to a softkey whose destination is defined by the acceptURL parameter and has a label specified by the acceptLabel String. setAcceptURL must be called with this method for a label to be shown.

Parameters:
acceptLabel - The label of the softkey button or link.

getAcceptURL

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

Returns:
String The acceptURL href String

getAcceptLabel

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

Returns:
String The acceptLabel for the accept String

writeBase

public void writeBase(java.io.PrintWriter out)
               throws java.io.IOException
Writes the text data in the appropriate markup language

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

setText

public void setText(java.lang.String value)
Set the text to be written out to the requesting device.

Parameters:
text - The text data

getText

public java.lang.String getText()
Get the text

Returns:
String The text data



Copyright © 2009 SAS Institute Inc. All Rights Reserved.