|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.ipage.IMenu
public class IMenu
The IMenu is a TransformationBean used to produce a menu 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 IMenu from their cell phone, the IMenu 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 IMenu 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:IMenu 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 .
Field Summary | |
---|---|
static int |
DEFAULT_MAX_ITEMS
Default maximum number of menu items. |
static java.lang.String |
DEFAULT_MENU_MARKER
Default menu marker. |
static java.lang.String |
MORE_MENU_NAME
Name of the "more" sub menu. |
Fields inherited from class com.sas.servlet.tbeans.ipage.BaseIPage |
---|
HTML_PROLOG, WML_PROLOG |
Constructor Summary | |
---|---|
IMenu()
Construct a new Menu |
|
IMenu(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Construct a new Menu |
|
IMenu(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Construct a new Menu |
Method Summary | |
---|---|
int |
getEndIndex()
Gets the end index of the menu to be written. |
int |
getMaxItemsDisplayed()
Gets the maximum number of items displayed in the menu |
javax.swing.ListModel |
getModel()
Gets the model on the IMenu object. |
java.lang.String |
getMoreLabel()
Gets the moreLabel for the "More ..." last item in the menu |
java.lang.String |
getMoreURL()
Gets the moreURL for the "More ..." last item in the menu |
java.lang.String |
getPostMenuText()
Gets the text be displayed after the menu |
java.lang.String |
getPreMenuText()
Gets the text be displayed before the menu |
int |
getStartIndex()
Gets the start index of the menu to be written. |
java.lang.String |
getURLFormat()
Gets the URL format for a menu |
javax.swing.ListModel |
getURLModel()
Gets the model to be used for the URL's of the menu items (destinations). |
void |
setEndIndex(int value)
Sets the end index of the menu to be written. |
void |
setMaxItemsDisplayed(int value)
Sets the maximum number of menu items that the menu will display at a time (for WML and HDML output only). |
void |
setModel(javax.swing.ListModel model)
Sets the model on the IMenu object. |
void |
setMoreLabel(java.lang.String moreLabel)
Sets the moreLabel for the last item in the menu. |
void |
setMoreURL(java.lang.String value)
Sets the moreURL for the "More ..." last item in the menu. |
void |
setPostMenuText(java.lang.String value)
Sets the text be displayed after the menu |
void |
setPreMenuText(java.lang.String value)
Sets the text to be displayed before the menu |
void |
setStartIndex(int value)
Sets the start index of the menu to be written. |
void |
setURLFormat(java.lang.String format)
Sets the URL format for a menu. |
void |
setURLModel(javax.swing.ListModel URLModel)
Sets the URL model for the menu. |
void |
writeBase(java.io.PrintWriter out)
Writes the IMenu base 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 |
Field Detail |
---|
public static final java.lang.String MORE_MENU_NAME
public static final java.lang.String DEFAULT_MENU_MARKER
public static final int DEFAULT_MAX_ITEMS
Constructor Detail |
---|
public IMenu()
public IMenu(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- The request objectresponse
- The response objectpublic IMenu(java.lang.String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
name
- The namerequest
- The request objectresponse
- The response objectMethod Detail |
---|
public void setModel(javax.swing.ListModel model)
model
- The model to be passed in to the IMenupublic javax.swing.ListModel getModel()
public void setURLModel(javax.swing.ListModel URLModel)
model
- The collection to use for the URL modelpublic javax.swing.ListModel getURLModel()
public void setPreMenuText(java.lang.String value)
value
- The string to setpublic void setPostMenuText(java.lang.String value)
value
- The string to setpublic java.lang.String getPreMenuText()
public java.lang.String getPostMenuText()
public void setStartIndex(int value)
value
- The int start indexpublic int getStartIndex()
public void setEndIndex(int value)
value
- The int end indexpublic int getEndIndex()
public void setMoreURL(java.lang.String value)
value
- The URL String to be setpublic java.lang.String getMoreURL()
public void setMoreLabel(java.lang.String moreLabel)
moreLabel
- The Label String to be setpublic java.lang.String getMoreLabel()
public void setMaxItemsDisplayed(int value)
value
- The number of itemspublic int getMaxItemsDisplayed()
public void setURLFormat(java.lang.String format)
format
- The URLFormat Stringpublic java.lang.String getURLFormat()
public void writeBase(java.io.PrintWriter out) throws java.io.IOException
writeBase
in class BaseIPage
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurs
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |