Events
The plug-in exposes 4 events that can be bound using Oracle APEX dynamic actions.
Event name | Description | Target |
---|---|---|
Validation Started | triggered when validation has started | document |
Validation Ended | triggered when validation has ended | document |
Validation Passed | Item events are triggered on Validation Passed | APEX item/column |
Validation Failed | Item events are triggered on Validation Failed | APEX item/column |
Event Data
Each validation event has access to data describing the validation state.
Validation Started
The variable this.data describes the item/column that triggered the event.
Variable | Description |
---|---|
this.data.pageItem | html id attribute of an input field |
this.data.ItemValue | Value of the input field |
this.data.recordId | record identifier, primary key values, or rowid |
Validation Result Object
The variable this.data describes validated items/columns with validation results. The variables type, location, pageItem, message, and unsafe are used to display messages with the Javascript-API apex.message.showErrors.
Variable | Description |
---|---|
this.data.pageItem | HTML id attribute of an input field – Item reference where an inline error should display. Required when location = inline . |
this.data.itemValue | Value of the input field |
this.data.recordId | Record identifier, primary key values, or ROWID |
this.data.type | ‘valid' or 'error’ |
this.data.location | 'inline', 'page' or ['inline','page'] |
this.data.message | validation message in case of error |
this.data.unsafe | false – Pass false if the message is already escaped and does not need to be escaped by showErrors . |
this.data.columnName | database column name of the input field |
this.data.label | (translated) heading or label of the input field or IG-Report column |
this.data.errorClass | kind of validation: required, format, length, range, uniqueness, foreign_key, rule, sqlerrm |
this.data.consColNames | comma delimited list of affected column names for composite constraints |
this.data.consItemNames | comma-delimited list of affected pageItem names for composite constraints |
Validation Ended
An array of Validation Result Objects is returned for each involved item/column.
Validation Passed
A Validation Result Object with this.data.type = ‘valid’ is returned.
Validation Failed
A Validation Result Object with this.data.type = ‘error’ is returned.