com.sssw.shr.page
Class AgpButtonText
java.lang.Object
|
+--com.sssw.shr.page.AgpTag
|
+--com.sssw.shr.page.AgpControlBase
|
+--com.sssw.shr.page.AgpButton
|
+--com.sssw.shr.page.AgpButtonText
- All Implemented Interfaces:
- AgiJavaScriptEnhanced, AgiPageControl, AgiPageSubmitProcessor, Cloneable, Externalizable, Serializable
- public class AgpButtonText
- extends AgpButton
Basic HTML Submit button control.
- Properties:
- Caption Expression, Caption Text, Enable HTML Generation, Name, Type
- Events:
- pageActionPerformed
- See Also:
- Serialized Form
Method Summary |
String |
getLabel()
Returns the text that appears in the button. |
boolean |
getSubmitOnChange()
Returns whether a Submit request is sent to the server when the control's value changes. |
String |
getType()
Returns the Type property of the control. |
void |
setLabel(String label)
Sets the text that appears in the button. |
void |
setSubmitOnChange(boolean submit_on_change)
Specifies whether a Submit request is sent to the server when the button is pressed |
void |
setType(String type)
Sets the type of HTML button. |
Methods inherited from class com.sssw.shr.page.AgpTag |
getBoolProperty,
getEnableHTMLGeneration,
getIntArrayProperty,
getIntProperty,
getIntPropertyUnit,
getProperty,
getStringArrayProperty,
invalidateHTML,
removeProperty,
setEnableHTMLGeneration,
setIntProperty,
setProperty |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AgpButtonText
public AgpButtonText()
getLabel
public String getLabel()
- Returns the text that appears in the button.
- Example:
// Toggle the label on this button
if (Button1.getLabel().equals("On"))
Button1.setLabel("Off");
else
Button1.setLabel("On");
- See Also:
- Caption Expression property,
Caption Text property,
AgpButtonText.setLabel(String label)
setLabel
public void setLabel(String label)
- Sets the text that appears in the button.
- Parameters:
label
- the text to display inside the button.- Example:
// Toggle the label on this button
if (Button1.getLabel().equals("On"))
Button1.setLabel("Off");
else
Button1.setLabel("On");
- See Also:
- Caption Expression property,
Caption Text property,
AgpButtonText.getLabel()
getType
public String getType()
- Returns the Type property of the control.
The possible values are:
"SUBMIT"
- a Submit button.
"RESET"
- a Reset button.
"BUTTON"
- a simple button.
- Example:
-
- See Also:
- Type property,
AgpButtonText.setType(String type)
setType
public void setType(String type)
- Sets the type of HTML button.
The possible values are:
"SUBMIT"
- a Submit button.
"RESET"
- a Reset button.
"BUTTON"
- a simple button.
- Parameters:
type
- a string representing the button type.- Example:
// set the type of this button
Button1.setType("RESET");
- See Also:
- Type property,
AgpButtonText.getType()
getSubmitOnChange
public boolean getSubmitOnChange()
- Returns whether a Submit request is sent to the server when the control's value changes.
- Example:
-
- See Also:
- Submit On Change property,
AgpButtonText.setSubmitOnChange(boolean submit_on_change)
setSubmitOnChange
public void setSubmitOnChange(boolean submit_on_change)
- Specifies whether a Submit request is sent to the server when the button is pressed
- Parameters:
submit_on_change
- true
if a
Submit request should be sent,
otherwise false
.- Example:
Button1.setSubmitOnChange(true);
- See Also:
- Submit On Change property,
AgpButtonText.getSubmitOnChange()