Class AjaxEditableMultiLineLabel<T>
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.panel.Panel
-
- org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel<T>
-
- org.apache.wicket.extensions.ajax.markup.html.AjaxEditableMultiLineLabel<T>
-
- Type Parameters:
T
- Model object type
- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IGenericComponent<T,AjaxEditableLabel<T>>
,IMetadataContext<Serializable,Component>
,IQueueRegion
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public class AjaxEditableMultiLineLabel<T> extends AjaxEditableLabel<T>
An inplace editor much likeAjaxEditableLabel
, but now with support for multi line content and atext area
as its editor.Note: attach this component to a block HTML element (like <div>) because its label uses block elements to show the content.
- Author:
- eelcohillenius
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel
AjaxEditableLabel.EditorAjaxBehavior, AjaxEditableLabel.LabelAjaxBehavior
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Constructor Summary
Constructors Constructor Description AjaxEditableMultiLineLabel(String id)
Construct.AjaxEditableMultiLineLabel(String id, IModel<T> model)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
defaultNullLabel()
Override this to display a different value when the model object is null.int
getCols()
Gets text area's number of columns.protected String
getLabelAjaxEvent()
By default this returns "click", users can overwrite this on which event the label behavior should be triggeredint
getRows()
Gets text area's number of rows.protected FormComponent<T>
newEditor(MarkupContainer parent, String componentId, IModel<T> model)
Create a new form component instance to serve as editor.protected MultiLineLabel
newLabel(MarkupContainer parent, String componentId, IModel<T> model)
Create a new form component instance to serve as label.protected void
onModelChanged()
Dummy override to fix WICKET-1239protected void
onModelChanging()
Dummy override to fix WICKET-1239void
setCols(int cols)
Sets text area's number of columns.void
setRows(int rows)
Sets text area's number of rows.-
Methods inherited from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel
add, getEditor, getLabel, onBeforeRender, onCancel, onEdit, onError, onSubmit, setDefaultModel, setLabel, setRequired, setType, shouldTrimInput, updateEditorAjaxAttributes, updateLabelAjaxAttributes
-
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategy
-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, 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, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onComponentTag, onConfigure, onEvent, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IGenericComponent
getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModelObject, setModel, setModelObject
-
Methods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContext
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
AjaxEditableMultiLineLabel
public AjaxEditableMultiLineLabel(String id)
Construct.- Parameters:
id
- The component id
-
AjaxEditableMultiLineLabel
public AjaxEditableMultiLineLabel(String id, IModel<T> model)
Construct.- Parameters:
id
- The component idmodel
- The model
-
-
Method Detail
-
newLabel
protected MultiLineLabel newLabel(MarkupContainer parent, String componentId, IModel<T> model)
Create a new form component instance to serve as label.- Overrides:
newLabel
in classAjaxEditableLabel<T>
- Parameters:
parent
- The parent componentcomponentId
- Id that should be used by the componentmodel
- The model- Returns:
- The editor
-
getLabelAjaxEvent
protected String getLabelAjaxEvent()
By default this returns "click", users can overwrite this on which event the label behavior should be triggered- Overrides:
getLabelAjaxEvent
in classAjaxEditableLabel<T>
- Returns:
- The event name
-
newEditor
protected FormComponent<T> newEditor(MarkupContainer parent, String componentId, IModel<T> model)
Description copied from class:AjaxEditableLabel
Create a new form component instance to serve as editor.- Overrides:
newEditor
in classAjaxEditableLabel<T>
- Parameters:
parent
- The parent componentcomponentId
- Id that should be used by the componentmodel
- The model- Returns:
- The editor
-
getCols
public final int getCols()
Gets text area's number of columns.- Returns:
- text area's number of columns
-
setCols
public final void setCols(int cols)
Sets text area's number of columns.- Parameters:
cols
- text area's number of columns
-
getRows
public final int getRows()
Gets text area's number of rows.- Returns:
- text area's number of rows
-
setRows
public final void setRows(int rows)
Sets text area's number of rows.- Parameters:
rows
- text area's number of rows
-
defaultNullLabel
protected String defaultNullLabel()
Override this to display a different value when the model object is null. Default is...
- Overrides:
defaultNullLabel
in classAjaxEditableLabel<T>
- Returns:
- The string which should be displayed when the model object is null.
-
onModelChanged
protected void onModelChanged()
Dummy override to fix WICKET-1239- Overrides:
onModelChanged
in classAjaxEditableLabel<T>
-
onModelChanging
protected void onModelChanging()
Dummy override to fix WICKET-1239- Overrides:
onModelChanging
in classAjaxEditableLabel<T>
-
-