|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.link.AbstractLinkComponent
public abstract class AbstractLinkComponent
Base class for implementations of ILinkComponent
. Includes a disabled attribute (that
should be bound to a disabled parameter), an anchor attribute, and a renderer attribute (that
should be bound to a renderer parameter). A default, shared instance of
DefaultLinkRenderer
is used when no specific renderer is
provided.
Field Summary |
---|
Fields inherited from class org.apache.tapestry.AbstractComponent |
---|
_body, _bodyCount |
Constructor Summary | |
---|---|
AbstractLinkComponent()
|
Method Summary | |
---|---|
void |
addEventHandler(LinkEventType eventType,
String functionName)
Adds an event handler (typically, from a wrapped component such as a Rollover ). |
protected void |
cleanupAfterRender(IRequestCycle cycle)
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders. |
protected void |
finishLoad()
Sets the renderer parameter property to its default value DefaultLinkRenderer.SHARED_INSTANCE . |
abstract String |
getAnchor()
Returns the anchor defined for this link, or null for no anchor. |
ILink |
getLink(IRequestCycle cycle)
Invoked by the ILinkRenderer (if the
link is not disabled) to provide a
EngineServiceLink that the renderer
can convert into a URL. |
abstract ILinkRenderer |
getRenderer()
|
abstract boolean |
isDisabled()
Returns whether this service link component is enabled or disabled. |
void |
renderAdditionalAttributes(IMarkupWriter writer,
IRequestCycle cycle)
Invoked (by the ILinkRenderer ) to make
the link render any additional attributes. |
protected void |
renderComponent(IMarkupWriter writer,
IRequestCycle cycle)
Renders the link by delegating to an instance of ILinkRenderer . |
abstract void |
setRenderer(ILinkRenderer renderer)
|
protected String |
writeEventHandler(IMarkupWriter writer,
PageRenderSupport pageRenderSupport,
String name,
String attributeName,
Object value)
|
protected void |
writeEventHandlers(IMarkupWriter writer,
IRequestCycle cycle)
|
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
---|
getLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.components.ILinkComponent |
---|
getPort, getScheme, getTarget |
Methods inherited from interface org.apache.tapestry.IComponent |
---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
Methods inherited from interface org.apache.tapestry.IRender |
---|
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
---|
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
---|
getLocation |
Constructor Detail |
---|
public AbstractLinkComponent()
Method Detail |
---|
public abstract boolean isDisabled()
ILinkComponent
isDisabled
in interface ILinkComponent
public void addEventHandler(LinkEventType eventType, String functionName)
Rollover
).
addEventHandler
in interface ILinkComponent
eventType
- The type of event to add.functionName
- The name of the client side javascript function to generate.protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
ILinkRenderer
.
renderComponent
in class AbstractComponent
protected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
after the component renders.
cleanupAfterRender
in class AbstractComponent
protected void writeEventHandlers(IMarkupWriter writer, IRequestCycle cycle)
protected String writeEventHandler(IMarkupWriter writer, PageRenderSupport pageRenderSupport, String name, String attributeName, Object value)
public abstract ILinkRenderer getRenderer()
public abstract void setRenderer(ILinkRenderer renderer)
public void renderAdditionalAttributes(IMarkupWriter writer, IRequestCycle cycle)
ILinkComponent
ILinkRenderer
) to make
the link render any additional attributes. These are informal parameters,
plus any attributes related to events. This is only invoked for
non-disabled links.
renderAdditionalAttributes
in interface ILinkComponent
writer
- Markup writer to write content to.cycle
- The current request.public abstract String getAnchor()
ILinkComponent
getAnchor
in interface ILinkComponent
#anchorid
portion of the url to be generated - if any.public ILink getLink(IRequestCycle cycle)
ILinkComponent
ILinkRenderer
(if the
link is not disabled) to provide a
EngineServiceLink
that the renderer
can convert into a URL.
getLink
in interface ILinkComponent
cycle
- The current request.
ILink
instance representing the link information for this component.protected void finishLoad()
DefaultLinkRenderer.SHARED_INSTANCE
.
finishLoad
in class AbstractComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |