In Wagby, the unit of data handled is called "model". In this tutorial, we will learn how to use Wagby through creating a customer model.

In this tutorial, we will learn concrete development method by Wagby through "customer management application" development.

First, we will change the project name.

Select "Environment" of WagbyDesigner.Change the project name from "Wagby application" to "customer management".

Figure 1 Change project name
Project identifier and Java source code package name are left unchanged.

In Wagby, the unit of data handled is called "model".Let's prepare the "customer" model first.

Go to WagbyDesigner's "Model" definition screen.If you select "New model" prepared in the gear icon here, the model definition screen shown in Fig. 3 opens.

Figure 2 Defining a new model
Figure 3 New model definition window opens

We will make the model name "customer".Also, we will set the model ID to "customer".In Wagby, the model name is Japanese and the model ID is English.

Figure 4 Model name and model ID setting

Set the item name and type of the customer model as follows.

Item name (Japanese) Item name (English) Item type Primary key Search condition List display
Customer ID customerid integer - -
Customer name customername String -
Customer Kana customerkana String -
Company name companyname String -
phone number tel String -
Figure 5 Item definition
You can move the "Item name" and "Item ID" fields with the cursor keys.Press the Enter key to move to the next line.SHIFT + Enter key to move to the previous line.Please try.

Here one line, extra cut so.Check the row to be deleted and select "Delete" from the gear icon.

Figure 6 Deleting items

This deletes the row as shown in Figure 7.

Figure 7 Item deleted

Set the item "customer ID" as the primary key.Click the "Details" button provided on the right side of the line that defines the customer ID.

Figure 8 Detailed definition of customer ID item

When "Use as primary key" is checked, this item becomes the primary key. Furthermore, if "Use Sequence" is checked in the "Details of Primary Key" column, a unique number will be automatically assigned from the start number.

Figure 9 Setting the primary key

Click the "OK" button provided at the bottom of this window (window) and close it.

Since the definition is over, I will check the operation of the application. Select "Build" from the WagbyDesigner menu.Click "Build Execute" button here.

Figure 10 Running a build

When the build completes normally, a dialog like the one shown in Figure 11 is displayed.

Figure 11 Build complete

Start up the generated application.Also press the "Start Application" button from the build screen.

Figure 12 Starting the application

After starting up, press the "Open logon screen" button.A separate tab opens and the following URL is automatically set in the address bar.

Figure 13 Opening the logon screen

Figure 14 shows the logon screen.You can see that the title of the application has changed to "customer management".

Figure 14 Logon screen of customer management application

Log on with the standard administrator account admin.The password is the same as the account.

Figure 15 Logging on to the customer management application

In the menu "Service", basic operations (data registration, update, deletion, search, list display, detailed display) on the "customer" model created this time are included.First open the search screen.There is no data here.

Figure 16 Customer Search Screen

From Fig. 16, press the "Register screen" button to open the customer's new registration screen.Here we will try to register one case.

Figure 17 Register one customer data

When you click the "Save" button, one data is stored in the database.

Figure 18 One data was stored

You can check the data list display screen by pressing "To list display" button in Fig. 187.

Figure 19 List of customer data list screen

You will return to the search screen.You can also see that you can narrow down by entering search criteria.

Fig. 20 Filtering by search

Finally log off from the application.Proceed to the next tutorial.

Figure 21 Logoff
I have not set up the database, but why is it working?
In this tutorial, I use the built-in database.In the official purchase version, you can connect to an external database such as Oracle or MySQL.
Are all the defined models incorporated in the menu "service"?
No, you can set details such as menu composition and color.For details, see the manual "Repository>menuPlease read.
The screen layout is simple
Since it is the first tutorial, screen layout is set automatically.This can also be set in detail.For details, see the manual "Repository>LayoutPlease read.
I have not done any settings to make screen transition from the screen, but the basic operation is done
A standard screen operation system is built in.This can also be set in detail.For details, see the manual "Repository>Screen functionPlease read.

At this stage I do not even use 1% of Wagby's full capacity.Little by little I will explain how to set up the repository (design information).

"Frequently asked questions and answers> tutorialPlease read.