com.sas.servlet.beans.html
Class PushButton

java.lang.Object
  |
  +--com.sas.Component
        |
        +--com.sas.servlet.beans.BaseTransformation
              |
              +--com.sas.servlet.beans.BasePushButton
                    |
                    +--com.sas.servlet.beans.html.PushButton

public class PushButton
extends BasePushButton

Transformation bean definition for creating an HTML form image.

Problem: Create a document using JSP that contains a pushbutton.

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

JSP Page:

 <html>
 <body>
 
 <p> This example shows a simple pushbutton generated by the 
 PushButton Transformation Bean. </p>
 <FORM>
 <%
    // Create a new pushbutton object
    com.sas.servlet.beans.PushButtonInterface button = 
       new com.sas.servlet.beans.html.PushButton(); 

button.setName("stuff"); button.setType("reset"); button.write(out); %> </FORM> </body> </html>

HTML output:

 <html>
 <body>
 
 <p> This example shows a simple pushbutton generated by the 
 PushButton Transformation Bean. </p>
 <FORM>
 <INPUT TYPE=reset NAME="stuff">
 </FORM>
 </body>
 </html>
 

Live element:

See Also:
Serialized Form

Constructor Summary
PushButton()
          Constructs a new PushButton Transformation Bean
PushButton(String name)
          Constructs a new PushButton Transformation Bean
PushButton(String name, String label)
          Constructs a new PushButton Transformation Bean
PushButton(String name, String label, String type)
          Constructs a new PushButton Transformation Bean
 
Method Summary
 void write(PrintWriter out)
          Writes the transformed representation of the object
 
Methods inherited from class com.sas.servlet.beans.BasePushButton
getLabel, getName, getType, setLabel, setName, setType
 
Methods inherited from class com.sas.servlet.beans.BaseTransformation
getCustomAttributes, getDescription, getParent, getRequest, getResponse, setCustomAttributes, setDescription, 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

PushButton

public PushButton()
Constructs a new PushButton Transformation Bean

PushButton

public PushButton(String name)
Constructs a new PushButton Transformation Bean
Parameters:
name - The pushbutton name

PushButton

public PushButton(String name,
                  String label)
Constructs a new PushButton Transformation Bean
Parameters:
name - The pushbutton field name
label - The pushbutton label

PushButton

public PushButton(String name,
                  String label,
                  String type)
Constructs a new PushButton Transformation Bean
Parameters:
name - The pushbutton field name
label - The pushbutton label or image source
type - The pushbutton type (submit or reset)
Method Detail

write

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


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