WEB development platform for PFW

xiaoxiao2021-03-06  103

Platform overview

Objective: To mainly include the instructions for the platform, the overall framework of the general application page, and the corresponding relationship between the content development of the platform and the content of the page. Make the developer know the meaning of the following work.

The general page is mainly: The above is the menu (MENU), the left is the tree control (Tree), and the right is a specific content display (including the page of the form of Form, List). See the figure below:

New version style

Objective: To mainly include the instructions for the platform, the overall framework of the general application page, and the corresponding relationship between the content development of the platform and the content of the page. Make the developer know the meaning of the following work.

The general page is mainly: The above is the menu (MENU), the left is the tree control (Tree), and the right is a specific content display (including the page of the form of Form, List). See the figure below:

New version style

Old version style, the following is written according to the old version of the BUG management module

Menu: If there is a submenu, you can pull it, and implement it through the cascade menu. The menu content is a link to each module, that is, multiple subsystems, the "BUG Management Module" in the "Development" drop-down menu. Tree control: For the component division of each module, if the function needs to be divided, or by dividing different level users. Right Page: The specific business information, including Form, List, Tree, Tabs, etc., as shown above, including an Form and a LIST component. The jump between the pages: You can go to the corresponding page through the link to the menu and tree control. For the page jump of business logic, it is mainly implemented by the buttons in the component. The buttons in the Form generally perform queries, modifications, and increase, etc., which are operated for database. The button in the list is generally related to the buttons in the related Form (to reach the component reuse), when you click here button, jump to the corresponding FORM, complete the database operation in the Form. Such as: When you click Add, you will go to only form's pages (point to Page, as shown below), the actual or current page, just hide List in an increasing button (Toadd) At the same time, the addition (Add) button is displayed in this form, fill in the corresponding content, click Add (Add) to insert a new record. Other buttons correspondence with this class. The concepts used in the platform are: Modules: Mainly for a specific application project, name is related to specific projects. Package: For code classification, the name of the package is usually similar to the system tools used inside the company, and the specific business is used as follows: com.rt.sys.Menu entity: (DataObject) The table in the corresponding database, the entity property has an entity name, field name, field type, whether it is the primary key. The entity name is the best name corresponding to the corresponding table in the database, which is reliabar, and the name begins. Field Name The specific field of the table, the type can be selected from the drop-down list: (Component) includes Form, List, Tree, and Tab. Component properties include: component name, component type, corresponding entity name, display type (used to control if it can be modified), some style settings, etc. Page: (Page) The representation of the main body portion of the business information is composed of components. The relevant information will be described in detail below.

The relevant information will be described in detail below.

The relevant information will be described in detail below.

2. Platform start

Narrative platform start-up related content, and later on the loading, modification save, GT operation, etc. Open the project to be developed in JBuilder, start using the debug mode during the development process, start-up mode: Menu Run-> debug Project Select the web or use shortcuts Shift F9 or use the shortcut in the toolbar so that the startup information will be seen in the output window. After the start is successful, open the IE, enter the local address http: // local address in the address bar, this is a specific setting, this is 80 ports), the interface that should appear, the interface should appear as follows.

The first login may be slightly slower based on the username provided by the username provided, because many information is to be loaded. After logging in, select the WIDE development module, as shown: (of course, the menu content in the figure does not necessarily with this)

Click Wide-Create to determine the module information and save it. After modifying the module name, fill in the module name, click the load button on the left to read the previous archive. Be sure to save during the development process, usually there is a corresponding save button, and then click the query button on the left. The original content appears in the tree list on the left, but also saves the saved button on the left side, when all components, pages, etc. are developed, and save it, by clicking on the left GT button to generate Related files, it will be seen in JBuilder.

3. Determine the modules and packages

Determine the relevant information of the module name, save path, etc., as well as the package name, including naming specifications, etc.

Module: Mainly for a specific application project, name is related to specific projects. Click the Wide-Create to the interface as follows:

Filling the name in Module_name, before and after adding "/", the following two single options are not selected, will now create a new module after saving. For some of the settings, it is not allowed to modify it. If you need to modify the conf.xml file that can be in the SRC folder (usually similar to D: /cvsl / bug/src/conf.xml) to find the appropriate settings. Pay attention to correspondence. Package: Click on the SRC in the tree list, the interface will appear: Fill in the package name, you must follow a certain specification, the name of the package is usually similar to the system tools used inside the company .. rt.xxx.xxx. After the increase will be listed in the list below, add the corresponding number of packages as needed.

4. Design entity

Entity: (DataObject) The entity name, field name, field type, whether it is the primary key. Field Name The specific field of the table, the type can be selected from the drop-down list. The specific operation is as follows: Click on the DataObjets below the left tree list, and the interface will appear, and the following list will list the entity, as shown below:

The entity name is best corresponding to the corresponding table name in the database, which is reliabar, and the name of the name must be capitalized. Add corresponding entities based on the number of tables required. Click on the query button on the left, you will see DataObjects listed under the added entity, click on the entity that you need to edit, the figure below is the entity module, has added three fields. Depending on the same field according to the table structure in the database, select the type, generally set the XXX_ID to the primary key, but there will be multiple field combination primary keys when special needs. Hibernate's corresponding file: such as bug.hbm.xml files, generally not modified, and special needs will be modified.

// The following is the corresponding relationship of the entity and database of Hibernate // primary key // General field < / proty>

5. Design components include Form, List, Tree ... style designs such as the designs such as fields such as: display type, size, whether to display, etc., will involve the determination of the drop-down list content, the use of the pop-up window, And some auxiliary JavaScript prepared, etc .; button design, naming specifications, such as add and toadd, and general hidden relationships between them For Chinese display constants.xml files Using components: (Component) includes Form, List, Tree, and Tab. Component properties include: component name, component type, corresponding entity name, display type (used to control if it can be modified), some style settings, etc. The relevant information is described below. Click on the Components in the tree list on the left, the interface is as follows: Fill in the component name, from the component type drop-down list, you can select the added component type to increase the corresponding component. The following is described below. (1) Form: Name, start lowercase suffix is ​​Form, the front general corresponds to the name of a entity, such as PMRForm in BugForm, ModuleForm, and the relevant entity created by the entity name item, which can be seen Various fields of the corresponding entity, select the display mode of each field as needed; Form's style setting, there is a side, there is a title, and there is no top, the bottom button, and each ranks are default 3, and it can be set as needed. The button is described in (2) List. (2) List: Named mode class with the form name method, but the suffix is ​​List, such as buglist; settings with the form is that List is generally not required, support paging, and the number of rows per page is default 10 lines. The settings of the field are the same as Form, and the button has been mentioned above, and information can be referred to in the drawing. There will be a button in Form and List, buttons naming methods are generally queries, modifications, add (ADD), reset, and back (toAdd). ), Modify (TomodIfy), TODETAIL, corresponding to each button in the Form, starting with TO, if supporting paging will automatically generate the previous page and the next page button. If you are named according to this method, you can display the corresponding Chinese. For the steering page of the button event, most is the default this, if special needs can be specified, for example: If TODETAIL is turned to the bugpage page, in the figure list, fill in the package name presentation.bugpage, That is, com.rt.tool.bug.presentation.bugpage; the corresponding program in the base class in the button, there will be this.todetail.setForward (xxx); the new instance assignment will be generated in the button's event PerformTodetail NextPage, if it is not generated by Wide, try to specify a steering page by changing the program, you need to generate a new instance in the button event. You can refer to the automatically generated code.

(3) TRE: TREE: The method of use is as follows: Create a page (method to see the page creation method below), corresponding to the page of the left tree list, similar to bugleftpage, find the corresponding program in JBuilder, such as this example The Java file of com.rt.tool.bug.presentation.bugleftpage, declare a tree component bugtree (Public Treecpt Bugtree; add similar to the following code: this.bugtree = New Treecpt ("BugTree); This.bugtree.sexistBorder (TRUE); // Increase root node Treenode root = new Treenode ("BUG Management"); // General Node Treenode Sys = New Treenode ("Manager"); Treenode Pro = New Treenode ("Development Personnel "); TREENODE User = New Treenode (" User "); Treenode Bugdata = New Treenode (" BUG "); Treenode Moduledata = New Treenode (" Module "); Treenode Pmrdata = New Treenode (" Module Related Personnel "); Treenode PSearchData = New Treenode ("View Bug"); // Sets the steering page of the node bugData.SetPage ("com.rt.bug.presentation.bugpage"); bugdata.settarget ("mainframe"); moduleData.setpage ("com.rt.tool.bug.presentation.modulepage"); moduleData.settarget ("mainframe"); pmrdata.setpage ("com.rt.tool.bug.presentation.pmrpage"); PMRData. SetTarget ("mainframe"); pSearchData.SetPage ("com.rt.tool.bug.presentation.psearchpage); pSearchData.SetTarget (" mainframe "); // Structuring the parent-child node relationship of the tree Root.Addchild (SYS); Root.addchild (Pro); root.addchild (user); sys.addchild (pmrdata); Pro.Addchild (pSearchData); user.addchild (bugData); // Place the front constructed In the tree assembly, this.bugtree.settreenode (root); // open the tree three-story, which is easy to use this.bugtree.setunwraplevel (3); this will build the page of the tree list,

Also add it to the entire page, find the JSP page to add a tree list, usually create a homepage in the web, such as bugmainPage.jsp, this name has no special requirements, which is easy to understand, here Add: (4) Menu: Menu refers to the menu on the overall page. You should usually use this to add your module to your entire system: Use SQL Server's Enterprise Manager to open the sys_menu table, the structure of the menu is based on the data in this table: SYS_MENU_ID: Sequential increment, level_referrence : The hierarchical relationship is embodied, menu_name: For the displayed content, menu_page: The point to the link is generally the main page of each module (useless in the above figure). Use SQL Server's Enterprise Manager to open the Sys_Menu table, the structure of the menu is based on the data in this table: SYS_MENU_ID: Sequential increment, Level_referrence: reflects the hierarchical relationship, MENU_NAME: for the displayed content, menu_page: for link Point pointing, typically the main page of each module (useless in the above figure). The following is described below. (1) Form: Name, start lowercase suffix is ​​Form, the front general corresponds to the name of a entity, such as PMRForm in BugForm, ModuleForm, and the relevant entity created by the entity name item, which can be seen Various fields of the corresponding entity, select the display mode of each field as needed; Form's style setting, there is a side, there is a title, and there is no top, the bottom button, and each ranks are default 3, and it can be set as needed. The button is described in (2) List. (2) List: Named mode class with the form name method, but the suffix is ​​List, such as buglist; settings with the form is that List is generally not required, support paging, and the number of rows per page is default 10 lines. The settings of the field are the same as Form, and the button has been mentioned above, and information can be referred to in the drawing. There will be a button in Form and List, buttons naming methods are generally queries, modifications, add (ADD), reset, and back (toAdd). ), Modify (TomodIfy), TODETAIL, corresponding to each button in the Form, starting with TO, if supporting paging will automatically generate the previous page and the next page button. If you are named according to this method, you can display the corresponding Chinese.

For the steering page of the button event, most is the default this, if special needs can be specified, for example: If TODETAIL is turned to the bugpage page, in the figure list, fill in the package name presentation.bugpage, That is, com.rt.tool.bug.presentation.bugpage; the corresponding program in the base class in the button, there will be this.todetail.setForward (xxx); the new instance assignment will be generated in the button's event PerformTodetail NextPage, if it is not generated by Wide, try to specify a steering page by changing the program, you need to generate a new instance in the button event. You can refer to the automatically generated code.

(3) TRE: TREE: The method of use is as follows: Create a page (method to see the page creation method below), corresponding to the page of the left tree list, similar to bugleftpage, find the corresponding program in JBuilder, such as this example The Java file of com.rt.tool.bug.presentation.bugleftpage, declare a tree component bugtree (Public Treecpt Bugtree; add similar to the following code: this.bugtree = New Treecpt ("BugTree); This.bugtree.sexistBorder (TRUE); // Increase root node Treenode root = new Treenode ("BUG Management"); // General Node Treenode Sys = New Treenode ("Manager"); Treenode Pro = New Treenode ("Development Personnel "); TREENODE User = New Treenode (" User "); Treenode Bugdata = New Treenode (" BUG "); Treenode Moduledata = New Treenode (" Module "); Treenode Pmrdata = New Treenode (" Module Related Personnel "); Treenode PSearchData = New Treenode ("View Bug"); // Sets the steering page of the node bugData.SetPage ("com.rt.bug.presentation.bugpage"); bugdata.settarget ("mainframe"); moduleData.setpage ("com.rt.tool.bug.presentation.modulepage"); moduleData.settarget ("mainframe"); pmrdata.setpage ("com.rt.tool.bug.presentation.pmrpage"); PMRData. SetTarget ("mainframe"); pSearchData.SetPage ("com.rt.tool.bug.presentation.psearchpage); pSearchData.SetTarget (" mainframe "); // Structuring the parent-child node relationship of the tree Root.Addchild (SYS); Root.addchild (Pro); root.addchild (user); sys.addchild (pmrdata); Pro.Addchild (pSearchData); user.addchild (bugData); // Place the front constructed In the tree assembly, this.bugtree.settreenode (root); // open the tree three-story, which is easy to use this.bugtree.setunwraplevel (3); this will build the page of the tree list,

Also add it to the entire page, find the JSP page to add a tree list, usually create a homepage in the web, such as bugmainPage.jsp, this name has no special requirements, which is easy to understand, here Add: (4) Menu: Menu refers to the menu on the overall page. You should usually use this to add your module to your entire system: Use SQL Server's Enterprise Manager to open the sys_menu table, the structure of the menu is based on the data in this table: SYS_MENU_ID: Sequential increment, level_referrence : The hierarchical relationship is embodied, menu_name: For the displayed content, menu_page: The point to the link is generally the main page of each module (useless in the above figure). Use SQL Server's Enterprise Manager to open the Sys_Menu table, the structure of the menu is based on the data in this table: SYS_MENU_ID: Sequential increment, Level_referrence: reflects the hierarchical relationship, MENU_NAME: for the displayed content, menu_page: for link Point pointing, typically the main page of each module (useless in the above figure). 6. Design page page: (page) The representation of the main body portion of the business information is composed of components. Click on the Pages in the left tree list, if you fill in the name in the page name, the name is generally the corresponding meaningful name, the start letter is uppercase, so it is a suffix, so that it is easy to identify, click Add button to increase. Select the corresponding page, this time the interface is as follows: Fill in the component name, from the component type drop-down list, you can select the added component type and increase the corresponding component. Select the included component, click the small icon on the right side of the text box, there will be a pop-up window, select the components you need to include, generally do not include the button, except for the file upload to "No", except for the file. It should be noted here that a Page cannot contain two LIST components that support paging. 7.Resource This module is increasing user permissions for modules you write later.

It should be noted here that a Page cannot contain two LIST components that support paging.

7.Resource

This module adds user permissions for modules written for you.

It should be noted here that a Page cannot contain two LIST components that support paging.

转载请注明原文地址:https://www.9cbs.com/read-103690.html

New Post(0)