Class DataTable.Caption
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.markup.html.WebComponent
-
- org.apache.wicket.markup.html.basic.Label
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable.Caption
-
- All Implemented Interfaces:
Serializable
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,Component>
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public static class DataTable.Caption extends Label
A caption for the table. It renders itself only ifDataTable.getCaptionModel()
has non-empty value.- See Also:
- Serialized Form
-
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IModel<String>
initModel()
Called when a null model is about to be retrieved in order to allow a subclass to provide an initial model.protected void
onConfigure()
Called on all components before any component is rendered.-
Methods inherited from class org.apache.wicket.markup.html.basic.Label
onComponentTag, onComponentTagBody
-
Methods inherited from class org.apache.wicket.markup.html.WebComponent
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession, onRender
-
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, get, 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, internalInitialize, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModel, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, toString, toString, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
-
-
-
Method Detail
-
onConfigure
protected void onConfigure()
Description copied from class:Component
Called on all components before any component is rendered. This method should be used to configure such things as visibility and enabled flags.Overrides must call
super.onConfigure()
, usually before any other codeNOTE: Component hierarchy should not be modified inside this method, instead it should be done in
Component.onBeforeRender()
NOTE: Why this method is preferrable to directly overriding
Component.isVisible()
andComponent.isEnabled()
? Because those methods are called multiple times even for processing of a single request. If they contain expensive logic they can slow down the response time of the entire page. Further, overriding those methods directly on form components may lead to inconsistent or unexpected state depending on when those methods are called in the form processing workflow. It is a better practice to push changes to state rather than pull.NOTE: If component's visibility or another property depends on another component you may call
other.configure()
followed byother.isVisible()
as mentioned inComponent.configure()
javadoc.NOTE: Why should
Component.onBeforeRender()
not be used for this? Because if a component's visibility is controlled insideComponent.onBeforeRender()
, once invisible the component will never become visible again.- Overrides:
onConfigure
in classComponent
-
initModel
protected IModel<String> initModel()
Description copied from class:Component
Called when a null model is about to be retrieved in order to allow a subclass to provide an initial model.By default this implementation looks components in the parent chain owning a
IComponentInheritedModel
to provide a model for this component viaIComponentInheritedModel.wrapOnInheritance(Component)
.For example a
FormComponent
has the opportunity to instantiate a model on the fly using itsid
and the containingForm
's model, if the form holds aCompoundPropertyModel
.
-
-