|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.control.AbstractControl net.sf.click.control.Field net.sf.click.control.FieldSet net.sf.click.extras.control.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 net.sf.click.control.FieldSet |
columns, fieldWidths, legend, legendAttributes, showBorder |
Fields inherited from class net.sf.click.control.Field |
disabled, error, focus, form, help, label, readonly, required, tabindex, title, validate, value |
Fields inherited from class net.sf.click.control.AbstractControl |
actionListener, attributes, listener, listenerMethod, messages, name, parent, styles |
Fields inherited from interface net.sf.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 net.sf.click.control.FieldSet |
add, add, contains, getColumns, getControl, getControlMap, getControls, getControlSizeEst, getField, getFieldList, getFields, getFieldWidths, getHtmlImports, getLegend, getLegendAttribute, getLegendAttributes, getShowBorder, getTag, hasControls, hasLegendAttributes, insert, isDisabled, isReadonly, onDestroy, onInit, onProcess, onRender, remove, remove, removeField, renderButtons, renderFields, setActionListener, setColumns, setDisabled, setForm, setLegend, setLegendAttribute, setListener, setReadonly, setShowBorder |
Methods inherited from class net.sf.click.control.Field |
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getRequestValue, getTabIndex, getTextAlign, getTitle, getValidate, getValidationJavaScript, getValue, getValueObject, getWidth, isHidden, isRequired, isValid, setError, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setFocus, setHelp, setLabel, setParent, setRequired, setTabIndex, setTextAlign, setTitle, setValidate, setValue, setValueObject, setWidth, validate |
Methods inherited from class net.sf.click.control.AbstractControl |
addStyleClass, appendAttributes, getActionListener, getAttribute, getAttributes, getContext, getMessage, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasStyles, onDeploy, registerActionEvent, removeStyleClass, 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 net.sf.click.Control |
getContext, getId, getMessages, getName, getParent, onDeploy, 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)
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)
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()
.
buffer
- the specified buffer to render the control's output topublic String toString()
render(net.sf.click.util.HtmlStringBuffer)
. The size of buffer
is determined by FieldSet.getControlSizeEst()
.
Object.toString()
protected void renderTagBegin(String tagName, HtmlStringBuffer buffer)
tagName
- the name of the tag to renderbuffer
- the buffer to append the output toAbstractControl.renderTagBegin(java.lang.String, net.sf.click.util.HtmlStringBuffer)
protected void renderTagEnd(String tagName, HtmlStringBuffer buffer)
tagName
- the name of the tag to closebuffer
- the buffer to append the output toAbstractControl.renderTagEnd(java.lang.String, net.sf.click.util.HtmlStringBuffer).
protected void renderContent(HtmlStringBuffer buffer)
buffer
- the buffer to append the output toAbstractContainer.renderContent(net.sf.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 |