T - Field value typepublic class Field<T>
extends org.apache.wicket.markup.html.panel.GenericPanel<T>
| 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 org.ujorm.core.KeyRing<?> |
key
Serializable key
|
static String |
PROPERTY_PREFIX
Localization key prefix
|
protected List<org.apache.wicket.validation.IValidator<? super T>> |
validators |
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
Field(org.ujorm.Key<U,T> key) |
Field(String componentId,
org.ujorm.Key<U,T> key,
String cssClass)
The default constructor
|
| Modifier and Type | Method and Description |
|---|---|
Field<T> |
addBehaviour(org.apache.wicket.ajax.AjaxEventBehavior behavior)
add Behaviour
|
org.apache.wicket.ajax.AjaxEventBehavior |
addBehaviourOnBlur()
Add a new
AjaxFormComponentUpdatingBehavior|Behavior
to updating a component model on blur events. |
Field<T> |
addCssStyle()
Add a CSS style according the Key
|
Field<T> |
addCssStyle(CharSequence cssStyle)
Add a CSS style to the current field
|
protected void |
addMaxLength(org.apache.wicket.markup.html.form.FormComponent result)
Add a
maxlength of a text-field for String attributes |
Field<T> |
addValidator(org.apache.wicket.validation.IValidator<T> validator)
Validator setter
|
Field<T> |
addValidator(org.ujorm.Validator<T> ujoValidator)
The UJO Validator setter
|
void |
clearFeedbackMessages()
Clear feedback messages
|
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<T> 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<String> |
createLabelModel()
Create label model
|
protected String |
getCssClass()
Returns a main CSS class
|
org.apache.wicket.markup.html.form.FormComponent |
getInput()
Return an Input component
|
org.ujorm.Key<?,?> |
getKey()
Returns assigned key
|
protected String |
getKeyName()
Get a simple key name for a localization
|
protected String |
getKeyName(org.ujorm.Key<?,?> key)
Get a simple key name for a localization
|
T |
getModelValue()
Returns an
input value from model |
protected String |
getResourceLabelKey(org.ujorm.Key<?,?> key)
Resource Label Key
|
List<org.apache.wicket.validation.IValidator<? super T>> |
getValidators()
Validator getter
|
org.apache.wicket.model.IModel<Boolean> |
getVisibleModel()
Extended visible model, the
null value means a default manner. |
boolean |
isEnabled()
Component is enabled if its input is enabled too
|
protected boolean |
isRequired()
Is the field required ?
|
protected void |
onConfigure()
On configure
|
void |
onChange(String action)
Create an Updating Behavior with "keyup" event
|
protected void |
onInitialize()
On initialize
|
protected void |
onSuperInitialize()
Initialize a super class for special cases
|
void |
requestFocus(org.apache.wicket.ajax.AjaxRequestTarget target)
Set a focus to the component
|
void |
setEnabledInput(boolean enabled)
Set enabled the input component
|
void |
setFeedbackMessage(org.apache.wicket.model.IModel<String> message)
Assign a feedback message
|
void |
setModelValue(T value)
Set new value for the
input and reset feedback messages |
Field |
setVisibleModel(org.apache.wicket.model.IModel<Boolean> visibleModel)
Extended visible model, the
null value means a default manner. |
String |
toString()
A debug information
|
getModel, getModelObject, setModel, setModelObjectgetRegionMarkup, newMarkupSourcingStrategygetWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onDetach, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, 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, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected 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 String cssClass
protected org.ujorm.core.KeyRing<?> key
protected List<org.apache.wicket.behavior.Behavior> behaviors
public Field(org.ujorm.Key<U,T> key)
protected final void onSuperInitialize()
protected void onInitialize()
onInitialize in class org.apache.wicket.MarkupContainerprotected void onConfigure()
onConfigure in class org.apache.wicket.Componentprotected org.apache.wicket.markup.html.form.FormComponent createInput(@Nonnull String componentId, @Nonnull org.apache.wicket.model.IModel<T> model)
@Nonnull public List<org.apache.wicket.validation.IValidator<? super T>> getValidators()
public Field<T> addValidator(@Nonnull org.apache.wicket.validation.IValidator<T> validator)
public Field<T> addValidator(@Nonnull org.ujorm.Validator<T> ujoValidator)
public T getModelValue()
input value from modelpublic void setModelValue(T value)
input and reset feedback messagespublic Field<T> addBehaviour(@Nonnull org.apache.wicket.ajax.AjaxEventBehavior behavior)
public Field<T> addCssStyle(@Nonnull CharSequence cssStyle)
public org.apache.wicket.markup.html.form.FormComponent getInput()
protected void addMaxLength(@Nonnull org.apache.wicket.markup.html.form.FormComponent result)
maxlength of a text-field for String attributesprotected org.apache.wicket.Component createLabel(@Nonnull org.apache.wicket.Component inp)
required for the mandatory Fieldprotected org.apache.wicket.model.IModel<String> createLabelModel()
protected String getResourceLabelKey(@Nonnull org.ujorm.Key<?,?> key)
protected boolean isRequired()
@Nullable public final org.ujorm.Key<?,?> getKey()
public void setFeedbackMessage(@Nonnull org.apache.wicket.model.IModel<String> message)
public void clearFeedbackMessages()
protected String getCssClass()
public org.apache.wicket.model.IModel<Boolean> getVisibleModel()
null value means a default manner.public Field setVisibleModel(@Nonnull org.apache.wicket.model.IModel<Boolean> visibleModel)
null value means a default manner.public void setEnabledInput(boolean enabled)
public boolean isEnabled()
isEnabled in class org.apache.wicket.Componentpublic void onChange(String action)
protected org.apache.wicket.ajax.AjaxEventBehavior createChangeBehaviour(@Nonnull String action, @Nonnull String jsEvent)
public org.apache.wicket.ajax.AjaxEventBehavior addBehaviourOnBlur()
AjaxFormComponentUpdatingBehavior|Behavior
to updating a component model on blur events.public void requestFocus(@Nonnull org.apache.wicket.ajax.AjaxRequestTarget target)
protected String getKeyName()
protected String getKeyName(@Nonnull org.ujorm.Key<?,?> key)
public String toString()
toString in class org.apache.wicket.MarkupContainerCopyright © 2020. All rights reserved.