net.sf.tacos.ajax.components
Class AjaxDirectLink

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended byorg.apache.tapestry.link.AbstractLinkComponent
              extended byorg.apache.tapestry.link.DirectLink
                  extended bynet.sf.tacos.ajax.components.AjaxDirectLink
All Implemented Interfaces:
IComponent, IDirect, ILinkComponent, IRender, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public abstract class AjaxDirectLink
extends DirectLink

Generates links that invoke ajax requests to AjaxDirectService engine service.

Author:
jkuhnert

Constructor Summary
AjaxDirectLink()
           
 
Method Summary
protected  String buildUpdateIdList()
          Builds a string list of all the component/block ids that were specified on this link, suitable for inclusion in a javascript call.
abstract  IEngineService getAjaxEngineService()
          Injected ajax service
 ILink getLink(IRequestCycle cycle)
          
abstract  IScript getScript()
          Injected script invoked when our link is clicked
abstract  Collection getUpdateBlocks()
          Html blocks to update in request
abstract  Collection getUpdateComponents()
          Components to update in request
abstract  String getUpdateObject()
          Javascript object to call ajaxUpdate on
abstract  boolean isDirect()
          Whether or not to invoke targeted components directly
abstract  boolean isProcessScripts()
          Whether or not javascript should process scripts embedded in the response
 void renderAdditionalAttributes(IMarkupWriter writer, IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.link.DirectLink
constructServiceParameters, getListener, getListenerInvoker, getParameters, isStateful, trigger
 
Methods inherited from class org.apache.tapestry.link.AbstractLinkComponent
addEventHandler, cleanupAfterRender, finishLoad, getAnchor, getLink, getRenderer, isDisabled, renderComponent, setRenderer, writeEventHandler, writeEventHandlers
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty
 
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
 
Methods inherited from interface org.apache.tapestry.components.ILinkComponent
getTarget
 

Constructor Detail

AjaxDirectLink

public AjaxDirectLink()
Method Detail

getScript

public abstract IScript getScript()
Injected script invoked when our link is clicked


getAjaxEngineService

public abstract IEngineService getAjaxEngineService()
Injected ajax service


getUpdateComponents

public abstract Collection getUpdateComponents()
Components to update in request


getUpdateBlocks

public abstract Collection getUpdateBlocks()
Html blocks to update in request


isProcessScripts

public abstract boolean isProcessScripts()
Whether or not javascript should process scripts embedded in the response


getUpdateObject

public abstract String getUpdateObject()
Javascript object to call ajaxUpdate on


isDirect

public abstract boolean isDirect()
Whether or not to invoke targeted components directly


getLink

public ILink getLink(IRequestCycle cycle)


renderAdditionalAttributes

public void renderAdditionalAttributes(IMarkupWriter writer,
                                       IRequestCycle cycle)


buildUpdateIdList

protected String buildUpdateIdList()
Builds a string list of all the component/block ids that were specified on this link, suitable for inclusion in a javascript call.

Example:['id1','id2','componentFirstname']

Returns:
String representation of id list