net.sf.tacos.components
Class ClientLink

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by net.sf.tacos.components.ClientLink
All Implemented Interfaces:
Locatable, LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IDirect, org.apache.tapestry.IDirectEvent, org.apache.tapestry.IDynamicInvoker, org.apache.tapestry.internal.Component, org.apache.tapestry.IRender

public abstract class ClientLink
extends org.apache.tapestry.AbstractComponent
implements org.apache.tapestry.IDirect

A component for creating a javascript function whose body is a call of an url definied by the direct service. This component is similar to DirectLink component but allows you to call listener methods from javascript code without to click on any link or button.

The required parameters are: a listener method and the name of the function to generate.

<span jwcid="@tacos:ClientLink" listener="listener:onClick" function="myFunction"/>

The generated function can be used like this:

function test(){
        ...
        myFunction();
}

Author:
Igor Drobiazko

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
ClientLink()
           
 
Method Summary
abstract  org.apache.tapestry.engine.IEngineService getEngine()
          Injected engine service .
abstract  String getFunction()
          Name of the javascript function to generate.
abstract  org.apache.tapestry.IActionListener getListener()
          The required listener parameter.
abstract  org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
          Injected listener invoker.
abstract  org.apache.tapestry.IScript getScript()
          Injected script.
protected  void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
          
 void trigger(org.apache.tapestry.IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
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.IDirect
isStateful
 
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
 
Methods inherited from interface org.apache.tapestry.IDynamicInvoker
getUpdateComponents, isAsync, isJson
 

Constructor Detail

ClientLink

public ClientLink()
Method Detail

renderComponent

protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle)

Specified by:
renderComponent in class org.apache.tapestry.AbstractComponent

trigger

public void trigger(org.apache.tapestry.IRequestCycle cycle)

Specified by:
trigger in interface org.apache.tapestry.IDirect

getListener

public abstract org.apache.tapestry.IActionListener getListener()
The required listener parameter.


getFunction

public abstract String getFunction()
Name of the javascript function to generate.


getScript

public abstract org.apache.tapestry.IScript getScript()
Injected script.


getListenerInvoker

public abstract org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
Injected listener invoker.


getEngine

public abstract org.apache.tapestry.engine.IEngineService getEngine()
Injected engine service .



Copyright © 2005-2008 SourceForge.net. All Rights Reserved.