|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.ipage.BaseIPage
public abstract class BaseIPage
The base object for all IPage Transformation Beans. "IPage Bean" is the name given to a Java component which consumes data from either a model or via property sets and transforms the data into a different representation that will be streamed to a client (or other consumer).
Unlike other TransformationBeans, the IPage Beans generate an entire JSP page for the appropriate markup language, such as WML, HDML, or HTML, rather than a code snippet. These beans will check the response object and will determine what type of content needs to be sent back to the requesting device or browser. For example, if a user accesses the JSP page from their cell phone, the IPage bean will produce either WML or HDML based on the type of browser the cell phone contained. If another user accesses the same JSP page using Internet Explorer, the IPage bean would produce HTML instead.
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 these custom tags.
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 .
Field Summary | |
---|---|
static java.lang.String |
HTML_PROLOG
HTML document type declaration. |
static java.lang.String |
WML_PROLOG
Wireless Markup Language document type declaration. |
Constructor Summary | |
---|---|
BaseIPage()
The default constructor. |
Method Summary | |
---|---|
void |
addOption(java.lang.String optionLabel,
java.lang.String optionURL)
Adds an option with the specified label. |
int |
getBrowserType()
Gets the Browser type. |
int |
getCacheTimeToLive()
Gets the cache time to live for this IPage |
java.lang.String |
getOptionLabel()
Returns the label of the option. |
java.lang.String |
getOptionURL()
Returns the URL of the option. |
java.lang.String |
getTitle()
Gets the title for the bean |
java.lang.String |
resolveNewLine(java.lang.String s,
java.lang.String newLine)
Replaces occurences of newLine with the appropriate newline string (<br>, or <br/>), depending on the markup language. |
void |
setBrowserType(int browserType)
Sets the Browser type. |
void |
setCacheTimeToLive(int seconds)
Sets the cache time to live for this IPage. |
void |
setId(java.lang.String value)
Sets the id. |
void |
setName(java.lang.String value)
Deprecated. Use setId method instead |
void |
setName(java.lang.String value,
boolean replace)
Deprecated. |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request object. |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the response object. |
void |
setStyle(java.lang.String style)
Overrides BaseTransformation's setStyle. |
void |
setStyleClass(java.lang.String styleClass)
Overrides BaseTransformation's setStyleClass. |
void |
setTitle(java.lang.String value)
Sets the title for the bean |
java.lang.String |
toString()
Returns a string representation of this transformation bean. |
void |
write(java.io.PrintWriter out)
Writes the transformed representation of the object, including writing the header, base, and footer. |
void |
writeBase(java.io.OutputStream out)
Writes the IPage objects base. |
void |
writeBase(java.io.PrintWriter out)
Writes the main base section of the IPage bean. |
void |
writeBase(java.io.Writer out)
Writes the IPage objects base. |
void |
writeFooter(java.io.OutputStream out)
Writes the footer. |
void |
writeFooter(java.io.PrintWriter out)
Writes the footer. |
void |
writeFooter(java.io.Writer out)
Writes the footer. |
void |
writeHeader(java.io.OutputStream out)
Writes the header. |
void |
writeHeader(java.io.PrintWriter out)
Writes the header. |
void |
writeHeader(java.io.Writer out)
Writes the header. |
Field Detail |
---|
public static final java.lang.String WML_PROLOG
public static final java.lang.String HTML_PROLOG
Constructor Detail |
---|
public BaseIPage()
Method Detail |
---|
public void setId(java.lang.String value)
setId
in interface TransformationInterface
setId
in class BaseTransformation
value
- The idpublic void setName(java.lang.String value)
setName
in interface TransformationInterface
setName
in class BaseTransformation
value
- The namesetId(java.lang.String)
public void setName(java.lang.String value, boolean replace)
value
- The namereplace
- True indicates that tabs and spaces will be replaces with underscores.public void setBrowserType(int browserType)
browserType
- The browser Typepublic int getBrowserType()
public void setStyle(java.lang.String style)
setStyle
in class BaseTransformation
style
- the style to be usedpublic void setStyleClass(java.lang.String styleClass)
setStyleClass
in class BaseTransformation
styleClass
- the style class to be usedpublic void setRequest(javax.servlet.http.HttpServletRequest request)
setRequest
in interface TransformationInterface
setRequest
in class BaseTransformation
request
- The request objectpublic void setResponse(javax.servlet.http.HttpServletResponse response)
setResponse
in interface TransformationInterface
setResponse
in class BaseTransformation
request
- The request objectpublic java.lang.String resolveNewLine(java.lang.String s, java.lang.String newLine)
s
- The string we searchnewLine
- The string we want to replace (i.e. "\n");
public void writeBase(java.io.Writer out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeBase(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeBase(java.io.OutputStream out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.Writer out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.OutputStream out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.Writer out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.OutputStream out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void write(java.io.PrintWriter out) throws java.io.IOException
Writes the transformed representation of the object, including writing the header, base, and footer.
This method calls the cleanUpResources method at the end to reset
the request
and response
back to null.
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseTransformation
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic java.lang.String toString()
toString
in class BaseTransformation
public void setTitle(java.lang.String value)
value
- The titlepublic java.lang.String getTitle()
public void setCacheTimeToLive(int seconds)
value
- The time to live in secondspublic int getCacheTimeToLive()
public void addOption(java.lang.String optionLabel, java.lang.String optionURL)
label
- The label of the option, such as a phone soft key label.optionURL
- The String for the option's URL.public java.lang.String getOptionLabel()
public java.lang.String getOptionURL()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |