|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.util.html.HTMLTagAttributes com.ibm.as400.util.html.FormInput com.ibm.as400.util.html.ButtonFormInput
public class ButtonFormInput extends FormInput
The ButtonFormInput class represents a button input type in an HTML form. The trailing slash "/" on the ButtonFormInput tag allows it to conform to the XHTML specification.
Here is an example of a ButtonFormInput tag calling a javascript defined within a HTML page:
<input type="button" name="button1" value="Press Me" onclick="test()" />
Here is a sample javascript which displays an alert box with the specified message:
<head> <script language="javascript"> function test() { alert("This is a sample script executed with a ButtonFormInput.") } </script> </head>
ButtonFormInput objects generate the following events:
Constructor and Description |
---|
ButtonFormInput()
Constructs a default ButtonFormInput object. |
ButtonFormInput(String name)
Constructs a ButtonFormInput object with the specified control name. |
ButtonFormInput(String name,
String value)
Constructs a ButtonFormInput object with the specified control name and viewable text value of the button. |
ButtonFormInput(String name,
String value,
String action)
Constructs a ButtonFormInput object with the specified control name, viewable text value of the button, and the action to perform when the button is pressed. |
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns the action being performed by the button. |
String |
getFOTag()
Returns a comment tag. |
String |
getTag()
Returns the tag for the button form input type. |
void |
setAction(String action)
Sets the action to perform when the button is clicked. |
Methods inherited from class com.ibm.as400.util.html.FormInput |
---|
addVetoableChangeListener, getDirection, getLanguage, getName, getSize, getValue, removeVetoableChangeListener, setDirection, setLanguage, setName, setSize, setValue, toString |
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes |
---|
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ButtonFormInput()
public ButtonFormInput(String name)
name
- The control name of the input field.public ButtonFormInput(String name, String value)
name
- The control name of the input field.value
- The viewable text value of the button.public ButtonFormInput(String name, String value, String action)
name
- The control name of the input field.value
- The viewable text value of the button.action
- The script to execute.Method Detail |
---|
public String getAction()
public String getFOTag()
public String getTag()
public void setAction(String action) throws PropertyVetoException
action
- The script to execute.PropertyVetoException
- If a change is vetoed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |