Package com.jbstrap.core.event
Class FormChangedEvent
java.lang.Object
com.jbstrap.core.event.BaseEvent
com.jbstrap.core.event.FormChangedEvent
This class contains the data of the Form changed event.
These are the following:
- The client on which the event occurred
- The ID of the component on which the event occurred
- The event type
- The instance of the component, on which the event occurred
- The event's unique ID
- The changed form component's ID
- The changed Form instance
- The changed form item instance
- The form's full data content as a Map
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
<T> T
Gets a displayed form data, that is specified by the field name.FormItem<?,
?> Gets the changed form itemGets the changed form item's IDGets a map of changed form dataMethods inherited from class com.jbstrap.core.event.BaseEvent
getClient, getComponent, getEventId, getEventType, getSenderId
-
Constructor Details
-
FormChangedEvent
public FormChangedEvent()
-
-
Method Details
-
getChangedFormItemId
Gets the changed form item's ID- Returns:
- The changed form item's ID
-
getChangedFormItem
Gets the changed form item- Returns:
- The changed form item instance or
null
if the form change isn't triggered by a form item. One such case could be, if a form got a record to display, or if the form is opening a new record. In this case, the form item changes, thus the changed form item cannot be defined, and the method will return withnull
-
getFields
Gets a map of changed form data- Returns:
- The form's data contents in a Map. The Map key is the form field name, and the value will be the form field value. This map will only contain data that are displayed on the form. It will not contain the added, but not displayed data.
-
get
Gets a displayed form data, that is specified by the field name.- Type Parameters:
T
- The data type- Parameters:
fieldName
- The name of the form field- Returns:
- The form field contents or
null
if the specified field is not displayed on the form
-
fireEvent
public void fireEvent()
-