Class Label
- java.lang.Object
-
- org.openidentityplatform.openam.click.control.AbstractControl
-
- org.openidentityplatform.openam.click.control.Field
-
- org.openidentityplatform.openam.click.control.Label
-
- All Implemented Interfaces:
Serializable,org.apache.click.Stateful,org.openidentityplatform.openam.click.Control
public class Label extends Field
Provides a Label display control. The Label control performs no server side processing, and is used primarily to add descriptive labels or horizontal rules to auto rendered forms.Label Example
A Label example:Form form = new Form("form"); .. form.add(new Label("hr", "<hr/>"));
HTML output:<tr><td colspan='2' align='left'><hr/></td></tr>
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.openidentityplatform.openam.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.openidentityplatform.openam.click.control.AbstractControl
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanonProcess()Returns true.voidrender(HtmlStringBuffer buffer)Render a label.StringtoString()Returns the label.-
Methods inherited from class org.openidentityplatform.openam.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.openidentityplatform.openam.click.control.AbstractControl
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getControlSizeEst, getHeadElements, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, getTag, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, onRender, removeBehavior, removeStyleClass, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle
-
-
-
-
Constructor Detail
-
Label
public Label(String name)
Create a Label display control.Note the Label control will attempt to find a localized label message in the parent messages, and if not found then in the field messages using the key name of
getName() + ".label".If a value cannot be found in the parent or control messages then the Field name will be converted into a label using the
ClickUtils.toLabel(String)method.- Parameters:
name- the name of the Field
-
Label
public Label(String name, String label)
Create a Label display control with the given name and label.- Parameters:
name- the name of the Fieldlabel- the display label caption
-
Label
public Label()
Create a Label with no label/name defined.Please note the control's name must be defined before it is valid.
-
-
Method Detail
-
onProcess
public boolean onProcess()
Returns true.- Specified by:
onProcessin interfaceorg.openidentityplatform.openam.click.Control- Overrides:
onProcessin classField- Returns:
- true to continue Page event processing or false otherwise
- See Also:
Field.onProcess()
-
render
public void render(HtmlStringBuffer buffer)
Render a label.- Specified by:
renderin interfaceorg.openidentityplatform.openam.click.Control- Overrides:
renderin classAbstractControl- Parameters:
buffer- the specified buffer to render the control's output to- See Also:
toString()
-
toString
public String toString()
Returns the label.- Overrides:
toStringin classAbstractControl- Returns:
- the label string value
- See Also:
Object.toString()
-
-