public class Field
extends org.apache.wicket.markup.html.panel.Panel
| Modifier and Type | Field and Description |
|---|---|
protected List<org.apache.wicket.behavior.Behavior> |
behaviors |
static String |
CSS_REQUIRED
CSS required style for the Label
|
protected String |
cssClass |
protected static org.apache.wicket.util.time.Duration |
DEFAULT_DELAY
Delay for searching fields is 400 [ms] by default
|
protected FeedbackLabel |
feedback |
protected KeyRing |
key
Serializable key
|
static String |
PROPERTY_PREFIX
Localization property prefix
|
protected org.apache.wicket.validation.IValidator<?> |
validator |
| Constructor and Description |
|---|
Field(Key property) |
Field(String componentId,
Key property,
String cssClass)
The default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBehaviour(org.apache.wicket.ajax.AjaxEventBehavior behavior)
add Behaviour
|
protected void |
addMaxLength(org.apache.wicket.markup.html.form.FormComponent result)
Add a
maxlength of a text-field for String attributes |
protected org.apache.wicket.ajax.AjaxEventBehavior |
createChangeBehaviour(String action,
String jsEvent)
Create new AjaxFormComponentUpdatingBehavior with delay 300 ms.
|
protected org.apache.wicket.markup.html.form.FormComponent |
createInput(String componentId,
org.apache.wicket.model.IModel model)
Create Form inputComponent
|
protected org.apache.wicket.Component |
createLabel(org.apache.wicket.Component inp)
Create Label and assign the CSS class
required for the mandatory Field |
protected org.apache.wicket.model.IModel |
createLabelModel()
Create label model
|
protected String |
getCssClass()
Returns a main CSS class
|
org.apache.wicket.markup.html.form.FormComponent |
getInput()
Return an Input component
|
Key<?,?> |
getKey()
Returns assigned key
|
Object |
getModelValue()
Returns an
input value from model |
protected String |
getResourceLabelKey(Key<?,?> key)
Resource Label Key
|
org.apache.wicket.validation.IValidator<?> |
getValidator()
Validator getter
|
protected boolean |
isRequired()
Is the field required ?
|
void |
onChange(String action)
Create an Updating Behavior with "keyup" event
|
protected void |
onInitialize()
On initialize
|
void |
setFeedbackMessage(org.apache.wicket.model.IModel<String> message)
Assign a feedback message
|
void |
setModelValue(Object value)
Set new value for the
input and reset feedback messages |
Field |
setValidator(org.apache.wicket.validation.IValidator<?> validator)
Validator setter
|
Field |
setValidator(Validator<?> validator)
Validator setter
|
getWebPage, getWebRequest, getWebResponse, getWebSessionadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrapprotected static final org.apache.wicket.util.time.Duration DEFAULT_DELAY
public static final String CSS_REQUIRED
public static final String PROPERTY_PREFIX
protected FeedbackLabel feedback
protected org.apache.wicket.validation.IValidator<?> validator
protected String cssClass
protected KeyRing key
protected List<org.apache.wicket.behavior.Behavior> behaviors
public Field(Key property)
protected void onInitialize()
onInitialize in class org.apache.wicket.Componentprotected org.apache.wicket.markup.html.form.FormComponent createInput(String componentId, org.apache.wicket.model.IModel model)
public org.apache.wicket.validation.IValidator<?> getValidator()
public Field setValidator(org.apache.wicket.validation.IValidator<?> validator)
public Object getModelValue()
input value from modelpublic void setModelValue(Object value)
input and reset feedback messagespublic void addBehaviour(org.apache.wicket.ajax.AjaxEventBehavior behavior)
public org.apache.wicket.markup.html.form.FormComponent getInput()
protected void addMaxLength(org.apache.wicket.markup.html.form.FormComponent result)
maxlength of a text-field for String attributesprotected org.apache.wicket.Component createLabel(org.apache.wicket.Component inp)
required for the mandatory Fieldprotected org.apache.wicket.model.IModel createLabelModel()
protected boolean isRequired()
public Key<?,?> getKey()
public void setFeedbackMessage(org.apache.wicket.model.IModel<String> message)
protected String getCssClass()
public void onChange(String action)
field - Field is not used by default, however it can be a switch for different results for example.Copyright © 2013. All Rights Reserved.