This is a new feature in Joget DX 8.
Introduction
Component Events enables interactions between page components with event triggering and event listening.
Example - Meeting Date Management
Expected Outcome
When a user clicks on the "Edit" button, a "Edit Meeting Details" form appears below the table without reloading the entire webpage.
You may learn more about Component Events by visiting the Joget DX Showcase application in the App Center, then clicking on New In DX 8 > Component Events.
Note
The Joget DX Showcase app is a default app that can be found in every fresh installation of Joget DX 8.
Required Components
No. | Component | Name | Image (For Reference) |
---|---|---|---|
1 | Form | Calendar - Meeting | |
2 | List | List - Calendar - Meeting | |
3 | UI | Joget DX 8 Showcase |
Steps
- Make sure all the required components exist within an application.
- (From component 3) Click "Edit Page Components".
- Add a CRUD component to the Design.
- Configure the CRUD component's properties as such:
Under Configure CRUD:
Form Label Value Label * Manage Meeting List * List - Calendar - Meeting Form (Edit) Calendar - Meeting Under AJAX & Events:
Form Label Value Handle Component with AJAX? (Checked) - Checking this label will enable the following sub-properties. Event Listening Row 1 Component Object Form Event Name * reload_table Matched Action Show and Reload Component Event Triggering Row 1 Event Name * load_form Trigger Method * Link Clicked Parameters Changed Rules
Row Parameter Name * Operator Value 1 _mode Equals To edit Note
These parameters are required to trigger the "Link Clicked" Trigger Method.
For instance, in this context, when the parameter name "_mode" is equals to "edit", then the "Link Clicked" Trigger Method is triggered.
When Not Match Trigger Event Name hide_form
- Result (with added data) after completing step 4:
- Save the new configuration.
- Add a Form component to the Design.
- Configure the Form component's properties as such:
Under Configure Form:
Form Label Value Label * Form Form * Calendar - Meeting Display Field as Label When Readonly? (unchecked) Under Redirection:
Form Label Value URL Redirect on Cancellation ?close=true Under AJAX & Events:
Form Label Value Handle Component with AJAX? (Checked) - Checking this label will enable the following sub-properties. Event Listening Row 1 Component Object Manage Meeting Event Name * hide_form Matched Action Hide Component Row 2 Component Object Manage Meeting Event Name * load_form Matched Action Show and Change Component URL Parameters Parameters *
Row Parameter Name * Parameter Value 1 id (id) 2 close false 3 _action edit 4 _mode edit Row 3 Component Object Main Menu Component Event Name * page_loaded Matched Action Hide Component Row 4 Component Object Form Event Name * hide_form Matched Action Hide Component Event Triggering Row 1 Event Name * hide_form Trigger Method * GET Request Parameters Changed Rules
Row Parameter Name * Operator Value 1 close Equals To true Note
These parameters are required to trigger the "GET Request" Trigger Method.
For instance, in this context, when the parameter name "close" is equals to "true", then the "GET Request" Trigger Method is triggered.
Row 2 Event Name * reload_table Trigger Method * POST Request
- Result from completing step 8:
- Save the new configuration.
- You have completed all the required steps to achieve the expected outcome.