In this tutorial, we will learn how to use WebBuilder to create a simple employee query application.
On the system homepage, go to the left menu and click [Dev Kit] -> [Integrated Development Environment] to enter the WebBuilder IDE.
On the left side of the IDE is the [File Browser]. The File Browser tree has 3 default root nodes:
The top of the IDE contains the menu and toolbar. The bottom of the IDE shows the multi-function view. When you open a module file, the component tree appears on the right side of the IDE.
In the IDE File Browser, select the [Modules] root node, then click the [New Folder] button on the toolbar to create a folder named [myapp].
Select the [myapp] folder and click the [New File] button. In the dialog, enter [select] in the [Name] field, check [Hide in Menu List] at the bottom, then click OK to create [select.xwl]. This file will be your database query module.
In the module editor for [select.xwl], double-click the [serverScript] property of the [module] node, and write
the script in the [serverScript] tab:
Wb.sendRowx('select * from wb_staff');
Press [Ctrl+S] to save the [select] file.
In the IDE File Browser, select the [myapp] folder and click [New File]. Enter [staff] in the [Name] field, then click OK to create [staff.xwl]. This will be your main UI module.
In the module editor for [staff.xwl], follow these steps:
On the system homepage [home], click the menu button in the top-right corner, then click [Refresh Menu List]. You will now see the [staff] module you just created.
Congratulations! You have completed a simple employee query application using WebBuilder.