|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.Component | +--com.sas.servlet.beans.BaseTransformation | +--com.sas.servlet.beans.BasePushButton | +--com.sas.servlet.beans.html.PushButton
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:
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 java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PushButton()
public PushButton(String name)
name
- The pushbutton namepublic PushButton(String name, String label)
name
- The pushbutton field namelabel
- The pushbutton labelpublic PushButton(String name, String label, String type)
name
- The pushbutton field namelabel
- The pushbutton label or image sourcetype
- The pushbutton type (submit or reset)Method Detail |
public void write(PrintWriter out) throws IOException
out
- The output stream
Examples of button output are:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |