|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.click.control.AbstractControl
org.apache.click.control.Field
org.apache.click.control.Button
public class Button
Provides a Button control: <input type='button'/>.
Submit instead.
Button backButton = new Button("back", " < Back "); backButton.setOnClick("history.back();"); backButton.setTitle("Return to previous page"); form.add(backButton);HTML output:
<input type='button' name='back' value=' < Back ' onclick='history.back();'
title='Return to previous page'/>
See also W3C HTML reference
INPUT
Reset,
Submit,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.apache.click.control.Field |
|---|
disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, value |
| Fields inherited from class org.apache.click.control.AbstractControl |
|---|
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles |
| Fields inherited from interface org.apache.click.Control |
|---|
CONTROL_MESSAGES |
| Constructor Summary | |
|---|---|
Button()
Create a button with no name defined. |
|
Button(String name)
Create a button with the given name. |
|
Button(String name,
String label)
Create a button with the given name and label. |
|
| Method Summary | |
|---|---|
int |
getControlSizeEst()
Return the estimated rendered control size in characters. |
String |
getOnClick()
Returns the button onclick attribute value, or null if not defined. |
String |
getTag()
Return the button's html tag: input. |
String |
getType()
Return the input type: 'button'. |
boolean |
onProcess()
For non Ajax requests this method returns true, as buttons by default perform no server side logic. |
void |
render(HtmlStringBuffer buffer)
Render the HTML representation of the Button. |
void |
setOnClick(String value)
Sets the button onclick attribute value. |
| Methods inherited from class org.apache.click.control.Field |
|---|
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getState, getTabIndex, getTextAlign, getTitle, getValidate, getValidationJavaScript, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, removeState, renderTagBegin, restoreState, saveState, setDisabled, setError, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setReadonly, setRequired, setState, setTabIndex, setTextAlign, setTitle, setTrim, setValidate, setValue, setValueObject, setWidth, validate |
| Methods inherited from class org.apache.click.control.AbstractControl |
|---|
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getHeadElements, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, onRender, removeBehavior, removeStyleClass, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Button(String name)
name - the button name
public Button(String name,
String label)
name - the button namelabel - the button labelpublic Button()
| Method Detail |
|---|
public String getTag()
getTag in class AbstractControlAbstractControl.getTag()public String getOnClick()
public void setOnClick(String value)
value - the onclick attribute value.public String getType()
public boolean onProcess()
onProcess in interface ControlonProcess in class FieldField.onProcess()public int getControlSizeEst()
AbstractControl
getControlSizeEst in class AbstractControlAbstractControl.getControlSizeEst()public void render(HtmlStringBuffer buffer)
render in interface Controlrender in class AbstractControlbuffer - the specified buffer to render the control's output toAbstractControl.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||