1. Setting Up the Booking Application
In this section, you create a minimal room booking application with an enumeration, an entity, and CRUD views. This application is used later in Template Definition.
| If you are new to Jmix, see the Tutorial, which explains common operations in greater detail. |
Creating Room Enumeration
Assume that the office has three rooms of different sizes. Create a Room enumeration with the following values:
-
Small -
Medium -
Large
Creating Booking Entity
Create the Booking entity.
The Booking entity has the following attributes:
-
title- booking title. Mandatory. -
roomwithRoomenum type - selected room. Mandatory. -
startDatewithLocalDateTimetype - booking start time. Mandatory. -
endDatewithLocalDateTimetype - booking end time. Mandatory. -
creator- association with theUserentity. Mandatory.
Creating CRUD Views
Create list and detail views for the Booking entity:
-
Open the view creation wizard for the
Bookingentity. -
Select the List and detail views template.
-
At the Entity list view fetch plan step, select the
creatorattribute. -
Accept the default settings for all other steps.
Running the Application
Run the application from Studio.
When the application starts, open http://localhost:8080 in a web browser, log in with admin / admin, and select Bookings from the main application menu.