public abstract class AbstractRenderService<T> extends org.apache.wicket.markup.html.panel.Panel implements IObserver, IRenderService
IRenderService
, with itself as the Component
.
The configuration parameters are as follows, with the class of the expected service between brackets:
IModel
that is available with the getModel() method, is the model
that is provided by a IModelReference
service. The name for this service
can be found in the configuration with the wicket.model
key. When
the model is changed with setModel(), this change is propagated to the IModelReference
service. When another plugin changes the model or the model object changes, the
Component#onModelChanged() method is invoked. It is recommended to override this method to
respond to changes.
IRenderService
implementation.
IBehaviorService
s. The behaviors that are exposed
by these services are added to the Component.
Component
that is provided
by this render service.
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractRenderService.ExtensionPoint
Base class for extension points.
|
Modifier and Type | Field and Description |
---|---|
static String |
BEHAVIOR |
protected LinkedHashMap<String,AbstractRenderService.ExtensionPoint> |
children |
static String |
CSS_ID |
static String |
DEFAULT_LOCALE |
static String |
EXTENSIONS_ID |
static String |
FEEDBACK |
static String |
MODEL_ID |
static String |
SKIN_ID |
static String |
VARIANT_ID |
static String |
VISIBLE |
static String |
WICKET_ID |
Constructor and Description |
---|
AbstractRenderService(IPluginContext context,
IPluginConfig properties) |
Modifier and Type | Method and Description |
---|---|
protected void |
addExtensionPoint(String extension) |
void |
bind(IRenderService parent,
String wicketId)
Bind the component to the specified id.
|
protected abstract AbstractRenderService.ExtensionPoint |
createExtensionPoint(String extension)
Create an extension point with the specified name.
|
void |
focus(IRenderService child)
Set focus on the specified child.
|
protected String |
getBundleName() |
org.apache.wicket.Component |
getComponent()
The Wicket
Component that is added to the parent. |
protected IDialogService |
getDialogService()
Utility method to retrieve the
IDialogService } from the plugin
framework. |
String |
getId()
The id that the component is bound to.
|
String |
getMarkupId(boolean createIfDoesNotExist) |
org.apache.wicket.model.IModel<T> |
getModel() |
T |
getModelObject() |
IObservable |
getObservable()
The observable that the observer is interested in.
|
IRenderService |
getParentService()
The parent service for this render service.
|
protected IPluginConfig |
getPluginConfig()
The
IPluginConfig that was used to create the service. |
protected IPluginContext |
getPluginContext()
The
IPluginContext that was used to create the service. |
protected ResourceBundleModel |
getResourceBundleModel(String key,
Locale locale) |
UserSession |
getSession() |
String |
getVariation() |
boolean |
isActive() |
protected void |
onAfterRender() |
protected void |
onBeforeRender() |
void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag) |
void |
onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream,
org.apache.wicket.markup.ComponentTag openTag) |
void |
onEvent(Iterator event)
Callback that is invoked when the observable sends events.
|
protected void |
redraw()
Utility method for subclasses to redraw the complete
Panel . |
protected void |
removeExtensionPoint(String name) |
void |
render(PluginRequestTarget target)
Called after user events and JCR events have been handled, but before
the rendering has started.
|
org.apache.wicket.MarkupContainer |
setDefaultModel(org.apache.wicket.model.IModel<?> model) |
void |
setModel(org.apache.wicket.model.IModel<T> model) |
void |
setModelObject(T object) |
void |
unbind()
Releases the component.
|
void |
updateModel(org.apache.wicket.model.IModel model) |
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, 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, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, 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, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String WICKET_ID
public static final String MODEL_ID
public static final String VARIANT_ID
public static final String SKIN_ID
public static final String CSS_ID
public static final String EXTENSIONS_ID
public static final String FEEDBACK
public static final String BEHAVIOR
public static final String VISIBLE
public static final String DEFAULT_LOCALE
protected final LinkedHashMap<String,AbstractRenderService.ExtensionPoint> children
public AbstractRenderService(IPluginContext context, IPluginConfig properties)
public org.apache.wicket.model.IModel<T> getModel()
public T getModelObject()
public final void setModel(org.apache.wicket.model.IModel<T> model)
public final void setModelObject(T object)
public boolean isActive()
public org.apache.wicket.MarkupContainer setDefaultModel(org.apache.wicket.model.IModel<?> model)
setDefaultModel
in class org.apache.wicket.MarkupContainer
public final void updateModel(org.apache.wicket.model.IModel model)
public IObservable getObservable()
IObserver
IObservable.equals(java.lang.Object)
method, while the observer is
registered.getObservable
in interface IObserver
public void onEvent(Iterator event)
IObserver
public String getVariation()
getVariation
in class org.apache.wicket.Component
protected IPluginContext getPluginContext()
IPluginContext
that was used to create the service.protected IPluginConfig getPluginConfig()
IPluginConfig
that was used to create the service.protected void redraw()
Panel
.
When invoked during request processing or event handling, the service will
be rendered during the rendering phase.
For more fine-grained redrawing, subclasses should override the
render(PluginRequestTarget)
method.
protected void addExtensionPoint(String extension)
protected abstract AbstractRenderService.ExtensionPoint createExtensionPoint(String extension)
protected void removeExtensionPoint(String name)
protected IDialogService getDialogService()
IDialogService
} from the plugin
framework. The dialog service is guaranteed to be available.public void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag
in class org.apache.wicket.Component
public org.apache.wicket.Component getComponent()
Component
that is added to the parent. The component
must have the id that was set with the IRenderService.bind(IRenderService, String)
method.getComponent
in interface IRenderService
public void render(PluginRequestTarget target)
Component
s with
the request target to enlist in the rendering phase.
Implementations that use extensions must call the same method on those.
render
in interface IRenderService
public void focus(IRenderService child)
focus
in interface IRenderService
child
- The extension that requests focus. This parameter can be
null, in which case the Component should set focus to itself.public String getId()
getId
in interface org.apache.wicket.request.component.IRequestableComponent
getId
in interface IRenderService
getId
in class org.apache.wicket.Component
public String getMarkupId(boolean createIfDoesNotExist)
getMarkupId
in class org.apache.wicket.Component
public UserSession getSession()
getSession
in class org.apache.wicket.Component
public void bind(IRenderService parent, String wicketId)
IRenderService
bind
in interface IRenderService
public void unbind()
IRenderService
unbind
in interface IRenderService
public IRenderService getParentService()
getParentService
in interface IRenderService
protected final ResourceBundleModel getResourceBundleModel(String key, Locale locale)
protected String getBundleName()
protected void onBeforeRender()
onBeforeRender
in class org.apache.wicket.Component
protected void onAfterRender()
onAfterRender
in class org.apache.wicket.Component
public void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
onComponentTagBody
in class org.apache.wicket.MarkupContainer
Copyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.