|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.form.FormComponent
wicket.markup.html.form.CheckBox
HTML checkbox input component.
Java:
form.add(new CheckBox("bool"));
HTML:
<input type="checkbox" wicket:id="bool" />
You can can extend this class and override method wantOnSelectionChangedNotifications() to force server roundtrips on each selection change.
| Nested Class Summary |
| Nested classes inherited from class wicket.markup.html.form.FormComponent |
FormComponent.IVisitor |
| Nested classes inherited from class wicket.Component |
Component.ComponentModelChange, Component.VisibilityChange |
| Field Summary |
| Fields inherited from class wicket.markup.html.form.FormComponent |
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, NO_INVALID_INPUT |
| Fields inherited from class wicket.Component |
FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4 |
| Constructor Summary | |
CheckBox(java.lang.String id)
|
|
CheckBox(java.lang.String id,
IModel model)
|
|
| Method Summary | |
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag. |
void |
onSelectionChanged()
Called when a new option is selected. |
protected void |
onSelectionChanged(java.lang.Object newSelection)
Template method that can be overriden by clients that implement IOnChangeListener to be notified by onChange events of a select element. |
void |
setModelValue(java.lang.String value)
Sets the value for a form component. |
protected boolean |
supportsPersistence()
|
void |
updateModel()
Updates this components' model from the request. |
protected boolean |
wantOnSelectionChangedNotifications()
Whether this component's onSelectionChanged event handler should called using javascript if the selection changes. |
| Methods inherited from class wicket.markup.html.form.FormComponent |
add, getForm, getInput, getInputName, getLabel, getModelValue, getValidationType, getValidators, getValue, inputAsInt, inputAsInt, inputAsIntArray, inputAsStringArray, invalid, isMultiPart, isPersistent, isValid, isValidated, onInvalid, onModelChanged, onValid, setLabel, setPersistent, valid, validate |
| Methods inherited from class wicket.markup.html.WebMarkupContainer |
getMarkupType, onRender, renderHead |
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalBeginRequest, internalEndRequest, iterator, iterator, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CheckBox(java.lang.String id)
Component.Component(String)
public CheckBox(java.lang.String id,
IModel model)
Component.Component(String, IModel)| Method Detail |
public final void setModelValue(java.lang.String value)
FormComponent
setModelValue in class FormComponentvalue - The valueFormComponent.setModelValue(java.lang.String)public void onSelectionChanged()
IOnChangeListener
onSelectionChanged in interface IOnChangeListenerIOnChangeListener.onSelectionChanged()protected void onSelectionChanged(java.lang.Object newSelection)
Called when a option is selected of a dropdown list that wants to be notified of this event. This method is to be implemented by clients that want to be notified of selection events.
newSelection - The newly selected object of the backing model NOTE this is
the same as you would get by calling getModelObject() if the
new selection were currentprotected boolean wantOnSelectionChangedNotifications()
protected final void onComponentTag(ComponentTag tag)
onComponentTag in class FormComponenttag - Tag to modifyComponent.onComponentTag(ComponentTag)protected final boolean supportsPersistence()
supportsPersistence in class FormComponentFormComponent.supportsPersistence()public void updateModel()
updateModel in class FormComponentFormComponent.updateModel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||