public interface ComponentPageElement extends ComponentResourcesCommon, InternalComponentResourcesCommon, RenderCommand, BodyPageElement
Page
that is a full Component
,
including the possibility of its own template and mixins. This is distinct from other renderable
elements of the page, which represent fixed or dynamic text, or markup element that may have dynamic attribute values.Modifier and Type | Method and Description |
---|---|
void |
addBlock(String blockId,
Block block)
Used during the contruction of a page to add a non-anonymous Block to the component.
|
void |
addMixin(String mixinId,
Instantiator instantiator,
String... order)
Adds a mixin.
|
void |
addToTemplate(RenderCommand element)
Used during the construction of a page.
|
void |
bindMixinParameter(String mixinId,
String parameterName,
Binding binding) |
boolean |
dispatchEvent(ComponentEvent event)
Asks each mixin and component to
Component.dispatchComponentEvent(ComponentEvent) , returning true if any
handler was found. |
void |
enqueueBeforeRenderBody(RenderQueue queue)
Invoked when the component should render its body.
|
Component |
getComponent()
Returns the core component associated with this page element (as opposed to any mixins attached to the
component).
|
InternalComponentResources |
getComponentResources()
Returns the resources associated with the core component.
|
ComponentPageElement |
getContainerElement()
Containing component (or null for the root component of a page).
|
Page |
getContainingPage()
Returns the page which contains this component.
|
ComponentPageElement |
getEmbeddedElement(String id)
Retrieves a component page element by its id.
|
org.slf4j.Logger |
getEventLogger()
Returns a logger used to for logging event dispatch and event method invocation.
|
ComponentResources |
getMixinResources(String mixinId)
Returns the
ComponentResources for a mixin attached to this component element. |
ComponentPageElement |
newChild(String id,
String nestedId,
String completeId,
String elementName,
Instantiator instantiator,
Location location)
Creates a new child component of the invoked component.
|
createEventLink, createFormEventLink, findBlock, getBlock, getBody, getCompleteId, getElementName, getId, getLocale, getLogger, getNestedId, getPageName, getResourceSelector, hasBody, isRendering, triggerContextEvent, triggerEvent
getLocation
bindParameter, getBinding, getInformalParameterBindings, getMixinByClassName, isLoaded
render
addToBody
Component getComponent()
InternalComponentResources getComponentResources()
Page getContainingPage()
ComponentPageElement getContainerElement()
void addToTemplate(RenderCommand element)
void addBlock(String blockId, Block block)
void addMixin(String mixinId, Instantiator instantiator, String... order)
mixinId
- a unique id for the mixin, the last term of the mixin's class nameinstantiator
- used to instantiate an instance of the mixinorder
- Ordering strings used to determine the order of mixin execution.void bindMixinParameter(String mixinId, String parameterName, Binding binding)
mixinId
- id of previously added mixinparameterName
- simple (unqualified) name of parameterbinding
- binding for parameterComponentPageElement getEmbeddedElement(String id)
id
- used to locate the elementIllegalArgumentException
- if no component exists with the given idComponentResources getMixinResources(String mixinId)
ComponentResources
for a mixin attached to this component element. Mixin
ids are the simple names of the mixin class.mixinId
- the mixin id (case insensitive)IllegalArgumentException
- if no mixin with the given id existsvoid enqueueBeforeRenderBody(RenderQueue queue)
boolean dispatchEvent(ComponentEvent event)
Component.dispatchComponentEvent(ComponentEvent)
, returning true if any
handler was found.event
- to be handledComponentPageElement newChild(String id, String nestedId, String completeId, String elementName, Instantiator instantiator, Location location)
id
- simple id of the new componentnestedId
- completeId
- elementName
- name of the component's element in its container's templateinstantiator
- used to create a component instance, and access the component's modellocation
- location of the element within its container's template @return the new componentorg.slf4j.Logger getEventLogger()
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.