|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.click.control.AbstractControl org.apache.click.control.Field org.apache.click.control.FieldSet org.apache.click.extras.control.HtmlFieldSet
public class HtmlFieldSet
Provides an HTML FieldSet container to create composite based fieldsets: <fieldset>.
FieldSet
uses an HTML Table to layout its fields
and controls. HtmlFieldSet on the other hand does not provide a layout and
instead relies on the developer to compose a layout programmatically.
This allows developers to provide a more flexible and CSS friendly layout.
You can read more about programmatic layout
here.
Also see this example
of how HtmlFieldSet is used to provide a custom layout.
Field Summary |
---|
Fields inherited from class org.apache.click.control.FieldSet |
---|
columns, controlMap, controls, fieldList, fieldWidths, legend, legendAttributes, showBorder |
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 | |
---|---|
HtmlFieldSet()
Create a HtmlFieldSet with no name defined. |
|
HtmlFieldSet(String name)
Create a HtmlFieldSet with the given name. |
|
HtmlFieldSet(String name,
String legend)
Create a HtmlFieldSet with the given name and legend. |
Method Summary | |
---|---|
Control |
add(Control control,
int width)
This method is not supported and throws an UnsupportedOperationException if invoked. |
Field |
add(Field field,
int width)
This method is not supported and throws an UnsupportedOperationException if invoked. |
void |
render(HtmlStringBuffer buffer)
Render the HTML representation of the FieldSet. |
protected void |
renderChildren(HtmlStringBuffer buffer)
Render this fieldset children to the specified buffer. |
protected void |
renderContent(HtmlStringBuffer buffer)
|
protected void |
renderTagBegin(String tagName,
HtmlStringBuffer buffer)
|
protected void |
renderTagEnd(String tagName,
HtmlStringBuffer buffer)
|
String |
toString()
Returns the HTML representation of the FieldSet. |
Methods inherited from class org.apache.click.control.FieldSet |
---|
add, add, contains, getColumns, getControl, getControlMap, getControls, getControlSizeEst, getField, getFieldList, getFields, getFieldWidths, getLegend, getLegendAttribute, getLegendAttributes, getShowBorder, getState, getTag, hasControls, hasLegendAttributes, insert, isDisabled, isReadonly, onDestroy, onInit, onProcess, onRender, remove, remove, removeField, removeState, renderButtons, renderFields, replace, restoreState, saveState, setColumns, setDisabled, setForm, setLegend, setLegendAttribute, setReadonly, setShowBorder, setState |
Methods inherited from class org.apache.click.control.Field |
---|
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getTabIndex, getTextAlign, getTitle, getValidate, getValidationJavaScript, getValue, getValueObject, getWidth, isHidden, isRequired, isTrim, isValid, setError, setErrorMessage, setErrorMessage, setFocus, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setRequired, 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, removeBehavior, removeStyleClass, setActionListener, setAttribute, setId, setName, setStyle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.click.Control |
---|
getBehaviors, getContext, getHeadElements, getId, getMessages, getName, getParent, hasBehaviors, isAjaxTarget, onDeploy, setListener, setName, setParent |
Constructor Detail |
---|
public HtmlFieldSet(String name)
name
- the fieldset name element valuepublic HtmlFieldSet(String name, String legend)
name
- the fieldset namelegend
- the fieldset legend element valuepublic HtmlFieldSet()
Method Detail |
---|
public Field add(Field field, int width)
add
in class FieldSet
field
- the field to add to the fieldSetwidth
- the width of the field in table columns
UnsupportedOperationException
- if invokedpublic Control add(Control control, int width)
add
in class FieldSet
control
- the control to add to the fieldSetwidth
- the width of the control in table columns
UnsupportedOperationException
- if invokedpublic void render(HtmlStringBuffer buffer)
FieldSet.getControlSizeEst()
.
render
in interface Control
render
in class FieldSet
buffer
- the specified buffer to render the control's output topublic String toString()
render(org.apache.click.util.HtmlStringBuffer)
. The size of buffer
is determined by FieldSet.getControlSizeEst()
.
toString
in class FieldSet
Object.toString()
protected void renderTagBegin(String tagName, HtmlStringBuffer buffer)
renderTagBegin
in class Field
tagName
- the name of the tag to renderbuffer
- the buffer to append the output toAbstractControl.renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)
protected void renderTagEnd(String tagName, HtmlStringBuffer buffer)
renderTagEnd
in class AbstractControl
tagName
- the name of the tag to closebuffer
- the buffer to append the output toAbstractControl.renderTagEnd(java.lang.String, org.apache.click.util.HtmlStringBuffer).
protected void renderContent(HtmlStringBuffer buffer)
buffer
- the buffer to append the output toAbstractContainer.renderContent(org.apache.click.util.HtmlStringBuffer)
protected void renderChildren(HtmlStringBuffer buffer)
buffer
- the buffer to append the output toFieldSet.getControls()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |