org.apache.tapestry.services.impl
Class ComponentEventConnectionWorker

java.lang.Object
  extended by org.apache.tapestry.services.impl.ComponentEventConnectionWorker
All Implemented Interfaces:
org.apache.hivemind.PoolManageable, ComponentRenderWorker

public class ComponentEventConnectionWorker
extends Object
implements ComponentRenderWorker, org.apache.hivemind.PoolManageable

Implementation that handles connecting events to listener method invocations.

Author:
jkuhnert

Field Summary
static String FORM_NAME_LIST
          Stored in IRequestCycle with associated forms.
 
Constructor Summary
ComponentEventConnectionWorker()
           
 
Method Summary
 void activateService()
           
 void passivateService()
           
 void renderBody(IRequestCycle cycle, Body component)
          Special render for handling html element targets.
 void renderComponent(IRequestCycle cycle, IComponent component)
          Invoked just after the components render call, giving services implementing the ComponentRenderWorker interface a guaranteed state to work off of.
 void setClassResolver(org.apache.hivemind.ClassResolver resolver)
           
 void setComponentScript(String script)
          The javascript that will be used to connect the component to its configured events.
 void setElementScript(String script)
          The javascript that connects html elements to direct listener methods.
 void setEventEngine(IEngineService eventEngine)
          Sets the engine service that will be used to construct callback URL references to invoke the specified components event listener.
 void setEventInvoker(IComponentEventInvoker invoker)
          Sets the invoker to use/manage event connections.
 void setScriptSource(IScriptSource scriptSource)
          The service that parses script files.
 void setWidgetScript(String script)
          The javascript that will be used to connect the widget component to its configured events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORM_NAME_LIST

public static final String FORM_NAME_LIST
Stored in IRequestCycle with associated forms.

See Also:
Constant Field Values
Constructor Detail

ComponentEventConnectionWorker

public ComponentEventConnectionWorker()
Method Detail

activateService

public void activateService()
Specified by:
activateService in interface org.apache.hivemind.PoolManageable

passivateService

public void passivateService()
Specified by:
passivateService in interface org.apache.hivemind.PoolManageable

renderComponent

public void renderComponent(IRequestCycle cycle,
                            IComponent component)
Invoked just after the components render call, giving services implementing the ComponentRenderWorker interface a guaranteed state to work off of.

Specified by:
renderComponent in interface ComponentRenderWorker
Parameters:
cycle - The associated request for this render.
component - The component that has just been rendered.

renderBody

public void renderBody(IRequestCycle cycle,
                       Body component)
Special render for handling html element targets. This is invoked just after the body component renders its body, but before the script data is written out.

Specified by:
renderBody in interface ComponentRenderWorker
Parameters:
cycle - The associated request cycle.
component - The Body component, which holds the needed PageRenderSupport object.

setEventInvoker

public void setEventInvoker(IComponentEventInvoker invoker)
Sets the invoker to use/manage event connections.

Parameters:
invoker - Manages component event invocations.

setEventEngine

public void setEventEngine(IEngineService eventEngine)
Sets the engine service that will be used to construct callback URL references to invoke the specified components event listener.

Parameters:
eventEngine - Engine used to create client side urls for updating things async.

setComponentScript

public void setComponentScript(String script)
The javascript that will be used to connect the component to its configured events. (if any)

Parameters:
script - The component script functions.

setWidgetScript

public void setWidgetScript(String script)
The javascript that will be used to connect the widget component to its configured events. (if any)

Parameters:
script - The dojo widget based script.

setElementScript

public void setElementScript(String script)
The javascript that connects html elements to direct listener methods.

Parameters:
script - Event element target scripts.

setScriptSource

public void setScriptSource(IScriptSource scriptSource)
The service that parses script files.

Parameters:
scriptSource - Service.

setClassResolver

public void setClassResolver(org.apache.hivemind.ClassResolver resolver)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.