com.sas.servlet.beans.html
Class TextArea

java.lang.Object
  |
  +--com.sas.Component
        |
        +--com.sas.servlet.beans.BaseTransformation
              |
              +--com.sas.servlet.beans.BaseTextArea
                    |
                    +--com.sas.servlet.beans.html.TextArea

public class TextArea
extends BaseTextArea

Transformation bean for creating an HTML TextArea input field.

Problem: Create a document using JSP that contains a text area input field.

Solution: Write a Java scriptlet in a JSP page that uses the TextArea Transformation Bean to create the HTML element.

JSP Page:

 <html>
 <body>
 
 <p> This example shows a simple text area field generated by the TextArea Transformation Bean. </p>
 <FORM>
 <%
    // Create a new TextArea object 
    com.sas.servlet.beans.TextAreaInterface ta =
        new com.sas.servlet.beans.html.TextArea(); 

// Set some initial values ta.setName("comments"); ta.setRows(5); ta.setColumns(30); ta.setText("These are my comments...");
// Output the TextArea ta.write(out); %> </FORM> </body> </html>

HTML output:

 <html>
 <body>
 
 <p> This example shows a simple text field generated by the Text Transformation Bean. </p>
 <TEXTAREA NAME="comments" COLS=30 ROWS=5>
 These are my comments...
 </TEXTAREA>
 </body>
 </html>
 

Live element:

See Also:
Serialized Form

Constructor Summary
TextArea()
          Construct a new TextArea Transformation Bean
TextArea(String name)
          Construct a new TextArea Transformation Bean
TextArea(String name, String text)
          Construct a new TextArea Transformation Bean
TextArea(String name, String text, int rows)
          Construct a new TextArea Transformation Bean
TextArea(String name, String text, int rows, int columns)
          Construct a new TextArea Transformation Bean
 
Method Summary
 void write(PrintWriter out)
          Writes the transformed representation of the object
 
Methods inherited from class com.sas.servlet.beans.BaseTextArea
appendText, getColumns, getRows, getText, getWrap, setColumns, setRows, setText, setWrap
 
Methods inherited from class com.sas.servlet.beans.BaseTransformation
getCustomAttributes, getDescription, getName, getParent, getRequest, getResponse, setCustomAttributes, setDescription, setName, setParent, setRequest, setResponse, toString, write, write, write
 
Methods inherited from class com.sas.Component
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, beansIsDesignTime, beansSetDesignTime, clone, clone, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getExtendedBeanInfo, getLinkInfo, getModelInterface, getRequiredInterfaces, getResources, getStringResource, getViewInterfaceSupportInfo, initialize, initializeComponent, isDesignTime, isLinked, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setComponentDescription, setComponentSupportInfo, setDefaultValues, setLinkInfo, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextArea

public TextArea()
Construct a new TextArea Transformation Bean

TextArea

public TextArea(String name)
Construct a new TextArea Transformation Bean
Parameters:
name - The name of the TextArea

TextArea

public TextArea(String name,
                String text)
Construct a new TextArea Transformation Bean
Parameters:
name - The name of the TextArea
text - The initial text

TextArea

public TextArea(String name,
                String text,
                int rows)
Construct a new TextArea Transformation Bean
Parameters:
name - The name of the TextArea
text - The initial text
rows - The number of visible rows

TextArea

public TextArea(String name,
                String text,
                int rows,
                int columns)
Construct a new TextArea Transformation Bean
Parameters:
name - The name of the TextArea
text - The initial text
rows - The number of visible rows
columns - The number of columns
Method Detail

write

public void write(PrintWriter out)
           throws IOException
Writes the transformed representation of the object
Parameters:
out - The output stream
Overrides:
write in class BaseTransformation


Version: 1.2.20000317.001 Formatted: 2000/07/06 15:57:33PM