|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEventListener
Specification for something that can listen to and act on client side generated browser events.
Method Summary | |
---|---|
void |
addElementEventListener(String elementId,
String[] events,
String methodName,
String formId,
boolean validateForm,
boolean async,
boolean focus)
Adds a deferred event listener binding for the specified html element. |
void |
addEventListener(String componentId,
String[] events,
String methodName,
String formId,
boolean validateForm,
boolean async,
boolean focus,
boolean autoSubmit)
Adds a deferred event listener binding for the specified component. |
void |
connectAutoSubmitEvents(IComponent component,
IForm form)
Invoked during rendering when a component has been detected as a IFormComponent and may
possibly need its events to be wired up as form events. |
Map |
getComponentEvents()
Gets all component event mappings. |
ComponentEventProperty |
getComponentEvents(String componentId)
Gets component bound event properties. |
Map |
getElementEvents()
Gets all mapped element events for this component. |
ComponentEventProperty |
getElementEvents(String elementId)
Gets element bound event properties. |
EventBoundListener[] |
getFormEvents(String formId,
BrowserEvent event)
Returns a list of element / component bound event listeners that were specified as invoking the form component with a matching id to formId of type
EventBoundListener . |
boolean |
hasElementEvents()
Checks if any element events are bound to this component. |
void |
rewireComponentId(String componentId,
String extendedId,
String idPath)
Invoked during page load to map event connections previously made via the IComponent.getId() identifier
to use the more unique IComponent.getIdPath() . |
Method Detail |
---|
void addEventListener(String componentId, String[] events, String methodName, String formId, boolean validateForm, boolean async, boolean focus, boolean autoSubmit)
componentId
- The component this is for.events
- The events that should cause the listener to be executed.methodName
- The page/component listener name that should be executed when
one of the supplied events occurs.formId
- The optional id of the form that should be submitted as part of this event invocation.validateForm
- If a formId was specified, whether or not that form should have client side valiation
invoked during the process.async
- If submitting a form, whether or not to do it asynchronously.focus
- If submitting a form, controls whether or not to focus it after an update.autoSubmit
- If true - auto form wiring is performed on any component targets implementing IFormComponent
so
that the enclosing form is submitted as part of the event in order to maintain consistent form state as in normal listener method
invocations.void addElementEventListener(String elementId, String[] events, String methodName, String formId, boolean validateForm, boolean async, boolean focus)
elementId
- The client side html element id to match against.events
- The client side events to bind to.methodName
- The listener that should be invoked when the event happens.formId
- The optional id of the form that should be submitted as part of this event invocation.validateForm
- If a formId was specified, whether or not that form should have client side valiation
invoked during the process.async
- If submitting a form, whether or not to do it asynchronously.focus
- If submitting a form, controls whether or not to focus it after an update.void connectAutoSubmitEvents(IComponent component, IForm form)
IFormComponent
and may
possibly need its events to be wired up as form events.
component
- The component to rewire form events for.form
- The form containing the component.boolean hasElementEvents()
ComponentEventProperty getComponentEvents(String componentId)
componentId
- The component to get event listeners for.
ComponentEventProperty getElementEvents(String elementId)
elementId
- The element to get listeners for.
EventBoundListener[] getFormEvents(String formId, BrowserEvent event)
formId
of type
EventBoundListener
.
formId
- The form that the event listeners were bound to submit when the event occurs.event
- The event that caused the current invocation.
Map getElementEvents()
Map getComponentEvents()
ComponentEventProperty
values this component is listening to.void rewireComponentId(String componentId, String extendedId, String idPath)
IComponent.getId()
identifier
to use the more unique IComponent.getIdPath()
.
componentId
- The base component id.extendedId
- The id of the component as returned by IComponent.getExtendedId()
idPath
- The id of the component as returned by IComponent.getIdPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |