***  This class contains elements that are subject to change.  ***

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

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

public class IFormListBox

The IFormListBox is a TransformationBean™ used to produce a form 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 IForm from their cell phone, the IForm 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 IForm 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 the sas:IFormListBox 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:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.ipage.BaseIPage
HTML_PROLOG, WML_PROLOG
 
Constructor Summary
IFormListBox()
          The default constructor.
IFormListBox(java.lang.String name, javax.swing.ListModel model)
          Construct a new IFormListBox.
IFormListBox(java.lang.String name, java.lang.String prompt)
          Construct a new IFormListBox.
IFormListBox(java.lang.String name, java.lang.String prompt, javax.swing.ListModel model)
          Construct a new IFormListBox.
 
Method Summary
 javax.swing.ListModel getDescriptionModel()
          Gets the descriptionModel of the element.
 javax.swing.ListModel getModel()
          Gets the model of the element.
 boolean isMultipleSelections()
          Returns true if multiple selcetions are allowed, false if only a single selection is allowed.
 void setDescriptionModel(javax.swing.ListModel descriptionModel)
          Sets the description of this element.
 void setModel(javax.swing.ListModel model)
          Sets the model of this element.
 void setMultipleSelections(boolean multipleSelections)
          If set to true, this element can have multiple items selected at a time.
 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.iform.BaseIFormElement
getAcceptLabel, getAcceptURL, getParentIForm, getPrompt, getShortPrompt, setAcceptLabel, setAcceptURL, setParentIForm, setPrompt, setShortPrompt, write, write
 
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

IFormListBox

public IFormListBox()
The default constructor.


IFormListBox

public IFormListBox(java.lang.String name,
                    java.lang.String prompt)
Construct a new IFormListBox.

Parameters:
name - The name of the element
prompt - The prompt to be prepeneded.

IFormListBox

public IFormListBox(java.lang.String name,
                    javax.swing.ListModel model)
Construct a new IFormListBox.

Parameters:
name - The name of the element
model - The model to be used for the listbox choices.

IFormListBox

public IFormListBox(java.lang.String name,
                    java.lang.String prompt,
                    javax.swing.ListModel model)
Construct a new IFormListBox.

Parameters:
name - The name of the element
prompt - The prompt to be prepeneded.
model - The model to be used for the listbox choices.
Method Detail

setModel

public void setModel(javax.swing.ListModel model)
Sets the model of this element. This model is used to populate the listbox.

Parameters:
model - The ListModel model.

getModel

public javax.swing.ListModel getModel()
Gets the model of the element.

Returns:
The model

***  This method is subject to change.  ***

setDescriptionModel

public void setDescriptionModel(javax.swing.ListModel descriptionModel)
Sets the description of this element. These are the options from which the user may choose. If this is not set, the main model is used for descriptions and vlaues of the possible choices.

Parameters:
descriptionModel - The ListModel model of descriptions.

***  This method is subject to change.  ***

getDescriptionModel

public javax.swing.ListModel getDescriptionModel()
Gets the descriptionModel of the element.

Returns:
The description model

setMultipleSelections

public void setMultipleSelections(boolean multipleSelections)
If set to true, this element can have multiple items selected at a time. Note that HDML phones do not support multiple selections. The default is true.

Parameters:
multipleSelections - True if multiple selections allowed.

isMultipleSelections

public boolean isMultipleSelections()
Returns true if multiple selcetions are allowed, false if only a single selection is allowed. Note that HDML phones do not support multiple selections. The default is true.

Returns:
True if multiple selections allowed.

writeHeader

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

Overrides:
writeHeader in class BaseIFormElement
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. The writeHeader method should be called before this method and writeFooter should be called after this method.

Overrides:
writeBase in class BaseIFormElement
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 BaseIFormElement
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

***  This class contains elements that are subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.