Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
The MongoDB Binders plugin facilitates the seamless integration of MongoDB and Joget. This integration currently utilises few plugin types:
...
Upon successful integration, Joget will be able to connect to MongoDB to store and retrieve data.
Figure 1: Example of successful integration with MongoDB
Install MongoDB Community Edition on Linux/MacOS/Windows or with docker.
(Referring to Source: Install MongoDB Community Edition - MongoDB Manual v7.0.
Start and access MongoDB from your shell
Code Block |
---|
mongosh |
(Referring to Source: Welcome to MongoDB Shell (mongosh) - MongoDB Shell)
...
After connecting to the shell, create a new database.
Code Block |
---|
use jwdbtest |
(Referring to Source: MongoDB mongosh Create Database (w3schools.com))
...
Create a new collection under the database.
Code Block |
---|
db.createCollection("posts") |
(Referring to Source: MongoDB mongosh Create Collection (w3schools.com))
Now we can use any database management tool (Eg: tableplus, dbeaver...) and check if the database and collection is created.
Figure 2: TablePlus Database Management Tool
1. You can obtain the jar file by the latest release at https://github.com/jogetoss/mongodb-binder/releases.
2. Upload the plugin jar file in Joget by going to Settings → Manage Plugins.
1. Create a new form and add some fields into the form.
Figure 3: Create new form
2. On the Settings tab, select MongoDB Form Load Binder for Form Load and MongoDB Form Store Binder forForm Store.
Figure 4: Setup Load and Store Form Binder
3. Click next, fill in the database name created in 3. Create MongoDB Database and collection name created in 4. Create MongoDB Collection, for more plugin configurations please refer to Configure MongoDB Form Load Binder and Configure MongoDB Form Store Binder.
Figure 5: MongoDB Form Store Binder config
4. Save the form. Now drag a select box into the form. We can load data from MongoDB Form Option Binder. Plugin configurations please refer to Configure MongoDB Options Binder.
Figure 6: MongoDB Form Option Binder config
5. Save the form again. On the upper right corner, click on Generate App > Generate CRUD.
Figure 7: Generate CRUD for form
5. Go to the list generated, change the Select Source of Data to MongoDB Datalist Binder. Plugin configurations please refer to Configure MongoDB Datalist Binder.
Figure 8: MongoDB Datalist Binder config
6. Go to the Design tab, drag some fields into the filter area, under Type you can see the MongoDB Data List Filters by different types. Plugin configurations please refer to Configure MongoDB Datalist Filter.
Figure 9: MongoDB Data List Filter config
7. Now run the UI. Add a new record and fill in the values. Click save.
Figure 10: Fill in new record
8. You can now see the value in the MongoDB database. You can also see the value in datalist where we configured the datalist binder.
Figure 11: Value saved into database and shown in datalist
9. Click on edit record. We can now see the record under the select box where we configured the form options binder.
Figure 12: Select Box showing value of record
Name | Description |
---|---|
Name | Column name |
URL Request Parameter | URL parameter that references this datalist filter. Commonly used to dynamically pre-filter a datalist. |
Label | Search filter label |
Type | See list of available MongoDB datalist filters which are similar to the default filters: |
Hide filter? | Option to hide this filter from the userview. Commonly used in cases of dynamically pre-filtering a datalist while disabling end-user modifications to filtered records for the specified column. |
Figure 13: MongoDB Datalist Binder Plugin Configurations
Name | Description | |||||
---|---|---|---|---|---|---|
Host | Target host to connect to a MongoDB instance. Choices:-
| |||||
Port | Connect to a MongoDB instance running on your localhost or remote host with Choices:-
| |||||
Username | Fill in the Username field, if authentication is needed else leave it blank. | |||||
Password | Fill in the Password field, if authentication is needed else leave it blank. | |||||
Database Name* | In MongoDB, databases hold collections of documents Please fill in the Database Name in order to let the plugin to access to the database in MongoDB. This is a mandatory field.
| |||||
Collection Name* | Please fill in the target Collection Name in order to load data from the collection. This is a mandatory field. |
Figure 14: MongoDB Form Load Binder Plugin Configurations
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Host | Target host to connect to a MongoDB instance. Choices:-
| ||||||||||
Port | Connect to a MongoDB instance running on your localhost or remote host with Choices:-
| ||||||||||
Username | Fill in the Username field, if authentication is needed else leave it blank. | ||||||||||
Password | Fill in the Password field, if authentication is needed else leave it blank. | ||||||||||
Database Name* | In MongoDB, databases hold collections of documents Please fill in the Database Name in order to let the plugin to access to the database and load data. This is a mandatory field.
| ||||||||||
Collection Name* | Please fill in the target Collection Name in order to load data from the collection. This is a mandatory field. | ||||||||||
Primary Key Field | Primary Key for row of data, the plugin will load data based of Primary Key value. | ||||||||||
Used for Grid? | When checked, this mean the binder is used for Grid .
|
Figure 15: MongoDB Form Store Binder Plugin Configurations
Name | Description | |||||
---|---|---|---|---|---|---|
Host | Target host to connect to a MongoDB instance. Choices:-
| |||||
Port | Connect to a MongoDB instance running on your localhost or remote host with Choices:-
| |||||
Username | Fill in the Username field, if authentication is needed else leave it blank. | |||||
Password | Fill in the Password field, if authentication is needed else leave it blank. | |||||
Database Name* | In MongoDB, databases hold collections of documents Please fill in the Database Name in order to let the plugin to access to the database and store data. This is a mandatory field.
| |||||
Collection Name* | Please fill in the target Collection Name in order to store data in the collection. This is a mandatory field. | |||||
Used for Grid? | When checked, this mean the binder is used for Grid .
|
Figure 16: MongoDB Options Binder Plugin Configurations
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Host | Target host to connect to a MongoDB instance. Choices:-
| ||||||||||
Port | Connect to a MongoDB instance running on your localhost or remote host with Choices:-
| ||||||||||
Username | Fill in the Username field, if authentication is needed else leave it blank. | ||||||||||
Password | Fill in the Password field, if authentication is needed else leave it blank. | ||||||||||
Database Name* | In MongoDB, databases hold collections of documents Please fill in the Database Name in order to let the plugin to access to the database in MongoDB. This is a mandatory field.
| ||||||||||
Collection Name* | Please fill in the target Collection Name in order to load data from the collection. This is a mandatory field. | ||||||||||
Use AJAX for cascade options? | When checked, this allows these fields to dynamically load available options based on the other field value (grouping column) when dealing with tremendous amount of selections. Read more at Ajax Cascading Drop-Down List.
| ||||||||||
Add Empty Option | Click this checkbox if you want an empty option in the selectbox. Clicking this option will display the following field:
| ||||||||||
Value, Label, and Grouping Field | To populate a selectbox, for example, you need to return at least 2 objects.
An optional third column(Grouping Field) can be returned for grouping value if for example, you are using the select box "Field ID to control available options based on Grouping" property field. When Use AJAX for cascade options is checked, make sure that the Grouping Field is filled. | ||||||||||
Filter Condition | The filter can use to filter load options data |