WEB development framework series (3) page function development (2), Framework page Function
As described in the previous section, the development of basic data currency information is complete only by using auxiliary development tools, creating data tables, and entering the table name.
At last, we also mentioned that we may also be faced with maintenance of some other basic information, but it is not as simple as only code and name, and there may be other data items.
For example, assume that an exchange rate field is also required in the currency table BASE_CURRENCY.
First, we adjust the table, add the RATE field, and modify the description of all columns in the table. For example, the description of UPDATE_USER is "modifier"
You can adjust the description of the field column here, which means that you have adjusted the Label description on the page.
Next: open our program design function
Procedure: click "Development Platform" and click "program design ".
Go to the program design list page, where you can query all the configuration-based images.
OK. Click Add to create the required Currency information screen.
Click Add to display the program maintenance interface, as shown in figure
The upper part is the main description of the program.
The lower half is the description of program data items.
First, maintain the program code, data table name, and page title]
Click [select all functions ].
Click Save]
In this way, the currency information page is developed, and there is no field information on this page.
View: Click the dictionary button below.
Click the dictionary button to display the data item selection screen.
The data on this screen is read from the database directly.
(As mentioned above, you are maintaining the table's column description, that is, developing the page field Label)
Select All and click Import.
Close the dictionary page and return to the program design homepage.
Click Refresh to display all the imported fields.
Next, click the quick maintenance button to configure fields quickly.
After you click quick maintenance, the following page appears:
Check which are used as the query conditions, which are displayed in the list, which are the editing screen, which can be left blank, and which is the primary key.
Click Save]
Close the [batch setting screen] above and return to the program design homepage.
Click Preview.
I just developed it through configuration. Now, the tax rate column is displayed.
Click query to display a piece of data, which is the data maintained in the previous section.
You can try new features
Next, we will release the program. The specific operation steps are described in the previous section. We will not repeat it here. If you have any questions, refer to the content in the previous section.
Click the basic data node, right-click the Add function menu,
Name maintenance: currency Information 2
Enter the address as shown in. Here, the p parameter is the developed program code.
Log On again or refresh the left-side menu
The function menu just created is displayed in the left menu.
After clicking, the result is as follows:
After you click search, you can correctly retrieve the data in the database.
Okay.
In this way, simple functions with a little personality are also completed.
Through such development, there is no need to worry about the development of the basic information in the project.
Focus our energy on the core business modules.
It seems that you still haven't written a line of code. How can you write the code?
The following section describes how to complete a self-written code.