Package com.jbstrap.core.event
Class EventBuilder
java.lang.Object
com.jbstrap.core.event.EventBuilder
Event builder class
If we want to trigger the event through code, without user input then the event must be built in the code. In this case, the event will only contain data, that is specified during the creation of the event.
- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
Modifier and TypeMethodDescriptionstatic EventBuilder
createBrowserEvent
(EventType eventType) Creates a new event builder class, that will trigger a browser eventstatic EventBuilder
createErrorEvent
(String errorMessage) Creates a new error event builder classstatic EventBuilder
Creates a new fetch done event builder classstatic EventBuilder
createFilterBarFilteringEvent
(Criteria criteria) Creates a new event builder class, that will trigger a filter bar filtering eventstatic EventBuilder
Creates a new event builder class, that will trigger a form change eventstatic EventBuilder
Creates a new event builder class, that will trigger a form item change eventvoid
Fires the built event on the specified component.Sets the data of the event that is to be triggered.
-
Method Details
-
createFormChangeEvent
Creates a new event builder class, that will trigger a form change event- Returns:
- The event builder class
-
createFilterBarFilteringEvent
Creates a new event builder class, that will trigger a filter bar filtering event- Returns:
- The event builder class
-
createFormItemChangeEvent
Creates a new event builder class, that will trigger a form item change event- Returns:
- The event builder class
-
createBrowserEvent
Creates a new event builder class, that will trigger a browser event- Parameters:
eventType
- The event type that will be triggered. The types can be found in theEventType
enum- Returns:
- The event builder class
-
createErrorEvent
Creates a new error event builder class- Parameters:
errorMessage
- The error message that will be given to the error event- Returns:
- The event builder class
-
createFetchDoneEvent
Creates a new fetch done event builder class- Parameters:
e
- The error class, encountered during the query, ornull
, if the query was successful- Returns:
- The event builder class
-
set
Sets the data of the event that is to be triggered.- Parameters:
fieldName
- The event data field namevalue
- The event data value- Returns:
- The event builder class
-
fireEvent
Fires the built event on the specified component.- Parameters:
component
- The component where the event is to be fired- Throws:
NullPointerException
- If the specified component isnull
-