org.apache.tapestry5.internal.services
Class ComponentEventImpl
java.lang.Object
   org.apache.tapestry5.internal.services.EventImpl
org.apache.tapestry5.internal.services.EventImpl
       org.apache.tapestry5.internal.services.ComponentEventImpl
org.apache.tapestry5.internal.services.ComponentEventImpl
- All Implemented Interfaces: 
- ComponentEvent, Event
- public class ComponentEventImpl 
- extends EventImpl- implements ComponentEvent
 
| Fields inherited from class org.apache.tapestry5.internal.services.EventImpl | 
| tracker | 
 
 
 
 
 
 
ComponentEventImpl
public ComponentEventImpl(String eventType,
                          String originatingComponentId,
                          EventContext context,
                          ComponentEventCallback handler,
                          ComponentPageElementResources elementResources,
                          org.slf4j.Logger logger)
- Parameters:
- eventType- non blank string used to identify the type of event that was triggered
- originatingComponentId- the id of the component that triggered the event
- context- provides access to parameter values
- handler- invoked when a non-null return value is obtained from an event handler method
- elementResources- provides access to common resources and services
- logger- used to log method invocations
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
matches
public boolean matches(String eventType,
                       String componentId,
                       int parameterCount)
- Description copied from interface: ComponentEvent
- Returns true if the event matches the provided criteria and the event has not yet been aborted.
 
- 
- Specified by:
- matchesin interface- ComponentEvent
 
- 
- Parameters:
- eventType- the type of event (case insensitive match)
- componentId- component is to match against (case insensitive), or the empty string
- parameterCount- minimum number of context values
- Returns:
- true if the event matches (and has not yet been aborted)
 
coerceContext
public Object coerceContext(int index,
                            String desiredTypeName)
- Description copied from interface: ComponentEvent
- Coerces a context value to a particular type. The context is an array of objects; typically it is an array of
 strings of extra path information encoded into the action URL.
 
- 
- Specified by:
- coerceContextin interface- ComponentEvent
 
- 
- Parameters:
- index- the index of the context value
- desiredTypeName- the desired type
- Returns:
- the coerced value (a wrapper type if the desired type is a primitive)
 
getContext
public Object[] getContext()
- Description copied from interface: ComponentEvent
- Returns the underlying EventContextas a (possibly empty) array.
 
- 
- Specified by:
- getContextin interface- ComponentEvent
 
- 
 
getEventContext
public EventContext getEventContext()
- Description copied from interface: ComponentEvent
- Returns the underlying event context.
 
- 
- Specified by:
- getEventContextin interface- ComponentEvent
 
- 
 
Copyright © 2003-2012 The Apache Software Foundation.