net.sf.tacos.ajax.components
Class AjaxDirectLink

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

public abstract class AjaxDirectLink
extends org.apache.tapestry.link.DirectLink
implements AjaxInvocation

Generates links that invoke ajax requests to AjaxDirectService engine service.

Author:
jkuhnert

Constructor Summary
AjaxDirectLink()
           
 
Method Summary
 org.apache.tapestry.engine.ILink getAjaxLink()
          Generates ajax link for form submission via javascript
abstract  String getIdParameter()
          The html id
 org.apache.tapestry.engine.ILink getLink(org.apache.tapestry.IRequestCycle cycle)
          
 String getLinkArguments(org.apache.tapestry.IRequestCycle cycle)
          Deprecated. Use AjaxUtils.getLinkArguments(AjaxInvocation, boolean) - will be removed before tacos4-final.
 String getLinkString(org.apache.tapestry.IRequestCycle cycle)
          Deprecated. Use AjaxUtils.getLinkString(AjaxInvocation, boolean) - will be removed before tacos4-final.
abstract  org.apache.tapestry.IScript getScript()
          Injected script invoked when our link is clicked
abstract  boolean isDirect()
          Whether or not to invoke targeted components directly
 void renderAdditionalAttributes(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.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, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, 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 net.sf.tacos.ajax.AjaxInvocation
getAjaxEngine, getBackLink, getEffects, getEncodingType, getForwardLink, getPopup, getPreEffects, getStatusElement, getUpdateComponents, getUpdateObject
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, 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
getPort, getScheme, getTarget
 

Constructor Detail

AjaxDirectLink

public AjaxDirectLink()
Method Detail

getScript

public abstract org.apache.tapestry.IScript getScript()
Injected script invoked when our link is clicked


isDirect

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


getIdParameter

public abstract String getIdParameter()
The html id


getLink

public org.apache.tapestry.engine.ILink getLink(org.apache.tapestry.IRequestCycle cycle)

Specified by:
getLink in interface org.apache.tapestry.components.ILinkComponent
Overrides:
getLink in class org.apache.tapestry.link.DirectLink

getAjaxLink

public org.apache.tapestry.engine.ILink getAjaxLink()
Generates ajax link for form submission via javascript

Specified by:
getAjaxLink in interface AjaxInvocation
Returns:
ILink to be used in async io javascript calls

renderAdditionalAttributes

public void renderAdditionalAttributes(org.apache.tapestry.IMarkupWriter writer,
                                       org.apache.tapestry.IRequestCycle cycle)

Specified by:
renderAdditionalAttributes in interface org.apache.tapestry.components.ILinkComponent
Overrides:
renderAdditionalAttributes in class org.apache.tapestry.link.AbstractLinkComponent

getLinkString

public String getLinkString(org.apache.tapestry.IRequestCycle cycle)
Deprecated. Use AjaxUtils.getLinkString(AjaxInvocation, boolean) - will be removed before tacos4-final.

Creates the string portion of the link that would normally be embedded in an href onclick attribute, but is also used in form back/forward semantics.

Returns:

getLinkArguments

public String getLinkArguments(org.apache.tapestry.IRequestCycle cycle)
Deprecated. Use AjaxUtils.getLinkArguments(AjaxInvocation, boolean) - will be removed before tacos4-final.

Returns a javascript string representation of the kwArgs object passed into tacos.defaultLinkAction.

Parameters:
cycle -
Returns: