|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentPageElement
Defines an element of a page that is a component elements that are, in fact, components (rather than just static markup).
Method Summary | |
---|---|
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. |
Methods inherited from interface org.apache.tapestry5.ComponentResourcesCommon |
---|
createActionLink, createEventLink, createFormEventLink, createPageLink, createPageLink, findBlock, getBlock, getBody, getCompleteId, getElementName, getId, getLocale, getLogger, getNestedId, getPageName, getResourceSelector, hasBody, isRendering, triggerContextEvent, triggerEvent |
Methods inherited from interface org.apache.tapestry5.ioc.Locatable |
---|
getLocation |
Methods inherited from interface org.apache.tapestry5.internal.InternalComponentResourcesCommon |
---|
bindParameter, getBinding, getInformalParameterBindings, getMixinByClassName, isLoaded |
Methods inherited from interface org.apache.tapestry5.runtime.RenderCommand |
---|
render |
Methods inherited from interface org.apache.tapestry5.internal.structure.BodyPageElement |
---|
addToBody |
Method Detail |
---|
Component getComponent()
InternalComponentResources getComponentResources()
Page getContainingPage()
ComponentPageElement getContainerElement()
void addToTemplate(RenderCommand element)
void addBlock(String blockId, Block block)
ComponentResourcesCommon.getBlock(String)
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 element
IllegalArgumentException
- 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 handled
ComponentPageElement 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |