net.sf.tacos.ajax.impl
Class InjectAjaxComponentRenderWorker

java.lang.Object
  extended bynet.sf.tacos.ajax.impl.InjectAjaxComponentRenderWorker
All Implemented Interfaces:
EnhancementWorker

public class InjectAjaxComponentRenderWorker
extends Object
implements EnhancementWorker

Adds method call before AbstractComponent.renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle) which calls the AjaxWebRequest, if available, to get the correct IMarkupWriter to use to render itself, based on the unique component id of the IComponent being rendered.

Author:
jkuhnert

Constructor Summary
InjectAjaxComponentRenderWorker()
           
 
Method Summary
protected  String buildMethodCallBack(IComponentSpecification spec, org.apache.hivemind.service.MethodSignature method, org.apache.hivemind.service.MethodSignature accessor)
          Builds the new enhanced render method which calls ResponseBuilder to get the correct writer to use for method.
protected  org.apache.hivemind.service.MethodSignature createAjaxRequestAccessor(EnhancementOperation op, IComponentSpecification spec)
          Creates an accessor method on the IComponent being enhanced so it can access the AjaxWebRequest at runtime.
 void performEnhancement(EnhancementOperation op, IComponentSpecification spec)
          
 void setAjaxRequest(AjaxWebRequest ajaxRequest)
          Injected ajaexRequest reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectAjaxComponentRenderWorker

public InjectAjaxComponentRenderWorker()
Method Detail

setAjaxRequest

public void setAjaxRequest(AjaxWebRequest ajaxRequest)
Injected ajaexRequest reference.

Parameters:
ajaxRequest -

performEnhancement

public void performEnhancement(EnhancementOperation op,
                               IComponentSpecification spec)

Specified by:
performEnhancement in interface EnhancementWorker

createAjaxRequestAccessor

protected org.apache.hivemind.service.MethodSignature createAjaxRequestAccessor(EnhancementOperation op,
                                                                                IComponentSpecification spec)
Creates an accessor method on the IComponent being enhanced so it can access the AjaxWebRequest at runtime.

Parameters:
op -
spec -
Returns:
The MethodSignature of the created accessor.

buildMethodCallBack

protected String buildMethodCallBack(IComponentSpecification spec,
                                     org.apache.hivemind.service.MethodSignature method,
                                     org.apache.hivemind.service.MethodSignature accessor)
Builds the new enhanced render method which calls ResponseBuilder to get the correct writer to use for method.

Parameters:
spec -
method -
accessor -
Returns: