Implementation of the model

Source: Internet
Author: User

First model (view Class): List model

The list of data areas is, of course, the model as the default initial model of the system, the model name is: INIT, the section value is named: Init_default, as a default instance of the list model. If there is a second model that can be named INIT_DEFAULT2, it rarely uses the second model instance, but because of the default integration of a new, import, export and other functional interface, but also missing a data read-only model, so added a model instance: Init_ CUSTOMER to make a read-only list of data.

The properties defined within the required model properties are:

1. TableName = Hrms_file

Defines the name of the model object , which in the data map refers to the name of the database table . In general, there is an MDA driver definition, where the redefinition of the object name allows an MDA driver to contain different objects and to map and process different models of different objects.

2. Tabletitle = Listhrms_file

Defines the caption content displayed by the model, the text shown in this section filters global information through a common_html variable, html_etc variable filter area information, supports both Chinese and English interface languages, and later encounters interface language
The filtering practice is no longer described in detail.

3. Tablewidth = 100%

Defines the width of the model display and supports direct width and percent width representation. The default value is percent: 80%.
Grammar: Tablewidth = 80% or tablewidth = 600.

4. Ondblclick_config = Init_edit

Define the model in the data list, the action that occurs when the user double-clicks a row record , the system supports two operations, one for the record of the row, and the other for the record's editing operations. The default is read operations on the record .

Grammar parsing: Init_view read operations for the record; Init_edit writes for the record.

5. nullshow = 1

Defines the type representation of a model that is displayed in a state without data . True value indicates structure information that can be displayed without data, and false values will prompt for no data. Mainly used when the user has permission to add data.

This can be set to False if the user has the user interface interface permission, if it is defined as read-only permission, if it is defined as Write permission, then it can be set to True value;

Attached: This property is the property used at the beginning of the design, which is seldom used after the design is formed, but is reserved .

6. Action_model = add_default:new:n,export_default:export:x,import_default:import:i

An optional action that defines the model's behavior area. Mainly divided into new operations , Export operations , Import operations and so on. System initialization By default, three operations are included. If it is defined as a read-only operation, you can add a new action mask, as well as define two other operations.

Grammar parsing:
Add_default:new:n: Add_default The name of the new module for the action behavior, the interface language for the action, N for the shortcut key, the use of grammar: alt+n;
Export _default:export:x: Export _default The name of the new module for action behavior, export is the interface language of the action, X is the shortcut key, use grammar: alt+x;
Import _default:import:i: Import _default The name of the new module for the action behavior, import is the interface language of the action, I is the shortcut key, use grammar: Alt+i.

7. row_element = View:view_default,edit:edit_default,delete:delete_array

Defines the Action property definition for each row of the Model data area Operation section. Mainly divided into row record view , row record edit , row record Delete three kinds of row unit operation. Three kinds of operation can be freely selected to suit different permission requirements.

Grammar parsing:
View:view_default: Row record view operation, view for the line record interface language representation, View_default for Row Records to raise the model name representation of the new model.
Edit:edit _default: Row record view operation, edit for line record interface language representation, edit _default for Row Records to raise the model name representation of the new model.
Delete:delete _default: Row record view operation, delete for the line record interface language representation, Delete_array for Row Records to raise the model name representation of the new model.

8. bottom_element = Chooseall:chooseall,delete:delete_array,edit:edit_default
9. PrimaryKey = 0

Defines the index value of a key attribute in a model object property. The default is 0, which is the index value of the first property of an object.

Grammar parsing: Mainly used for the uniqueness of the tag record , view, edit, delete operations are mainly.

10.uniquekey = 0

Defines the index value of a unique property in a Model object property. The default is 0, which is the index value of the first property of an object.
Grammar parsing: Primarily used to prevent non-repetitive data entry.

Systemorder = 0:desc
Pagenums_model = 25
Action_search = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2

Defines a list of table field property indexes to search in the model search area. Starting with 0, the index is represented by a "," separating.

Group_filter = 3:department:1:1,4:hrms_zhiwei_status:1:1,8:gb_national:1:1

Defines the object property information for the outer grouping of the model grouping area. Each grouping message contains the parent object name, the KEY value, the name value, and the associated parameter value index. Different object grouping information is also separated by ",".

Grammar parsing:
3:department:1:1:3 The associated property index value of this object, department the parent object database table name , 1 Parent object key value, and 1 parent object name value.
3:user_priv:0:1:3 The associated property index value of this object, user_priv the parent object database table name, 0 Parent object KEY value, and 1 parent object name value.


Showlistfieldlist = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26

Defines the List of table field property indexes to display in the model data area, separated by ",".

Showlistnull = Null,null,null,null,null,null,null,null,null,null,null,null,null,null,null

Defines the legitimacy of the input data in the model data area, mainly used in the Add and edit models, in order to maintain a similarity in the model structure, this property is retained in the init attribute, but is not used in init.

Showlistfieldfilter = Input,input,tablefiltercolor:department:1:1,userdefine:renshiguanli

Defines the filter information definition for the data area of the model, which corresponds to Showlistfieldlist, and the different object properties are arranged in the filter in the appropriate order, defining the filtering additional information for their corresponding properties.
Grammar: Showlistfieldfilter = input, link:chart_default,password,tablefilter:user_priv:0:1
Grammar parsing:
Input: System default data, no filtering
Link:chart_default: Join information, URL form representation, separated by ":", the first part is the definition type, the latter part is the name information that raises the new model.
Password: Password information filtering, filtering password ciphertext information, unified with "* * * * * * *".
Tableiflter:user_priv:0:1: Table filter type, tablefilter for the definition type for table filtering, USER_PRIV defines the parent object name, 0 defines the key value, and 1 defines the name value.

Two, second model (view Class): View model

View view of a single record. At the beginning of the design, the view is also integrated with functional buttons, such as new, edit, delete, etc., so the view model is divided into two, and the first model to correspond to a operation area, a no operation area, but later canceled the design, the view is all read-only area, do not allow its new in the View area, Edit and delete operations.

Model Attribute Definitions:

1. TableName = Hrms_file
2. Tabletitle = Viewhrms_file
3. Tablewidth = 65%
4. Action_submit = Print:print:p,cancel:cancel:c
5. PrimaryKey = 0
6. Subtablecount = 0
7. UniqueKey = 0
8. showlistfieldlist = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
9. Showlistnull = Null,null,null,null,null,null,null,null,null,null,null
Ten. Showlistfieldfilter = Input,input,input,input,input,date,input,input,
Showlistfieldstopedit =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Showlistfieldstopdelete =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Three, third model (view Class): Create a new model

This is primarily a new operation on the table. Model Property Definitions: table names, model widths, table headings, field tables, table filter types, model returns. Once the data is new, the system-defined model instance is returned, typically the Init_default model instance.

Model Attribute Definitions:

1. TableName = Hrms_file
2. Tabletitle = Newhrms_file
3. Action_submit = Submit:save:s,cancel:cancel:c
4. PrimaryKey = 0
5. Subtablecount = 0
6. UniqueKey = 0
7. Returnmodel = Init_default

Defines the model name returned by the interface when the model object data has been processed. Typically, you return to the Init_default model, and you can return to models such as Add_default,view_default, as needed.

8. showlistfieldlist = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
9. Showlistnull = Notnull,notnull,null,null,null,null,null,null,null,null,null,null

Defines the legitimacy of the input data in the model data area, mainly in the ADD and edit models.
Grammar parsing: notnull input validation is not NULL, NULL input can be null value.

Ten. Showlistfieldfilter = Input,input,depttoname:1,tablefilter:hrms_zhiwei_status:1:1
Showlistfieldstopedit =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Showlistfieldstopdelete =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Showlistfieldprivate =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

The fourth model (view Class): Editing a model

This is primarily a new operation on the table. Model Property Definitions: table names, model widths, table headings, field tables, table filter types, model returns. Once the data has been created, a system-defined model instance is returned, typically a Init_default model instance, and part of the return
Look at the view View_default model instances, but this is rarely used.

1. TableName = Hrms_file
2. Tabletitle = Edithrms_file
3. Action_submit = Submit:save:s,cancel:cancel:c
4. PrimaryKey = 0
5. Subtablecount = 0
6. UniqueKey = 0
7. Returnmodel = Init_default
8. showlistfieldlist = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,2
9. Showlistnull = Notnull,notnull,null,null,null,null,null,null,null,null,null,null

Ten. Showlistfieldfilter = Input,input,depttoname:1,tablefilter:hrms_zhiwei_status:1:1
Showlistfieldstopedit =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Showlistfieldstopdelete =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Showlistfieldprivate =,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

V. Fifth model (Import Class): Import model

This is primarily a bulk import operation on a table. Model Property Definitions: table names, model widths, table headings, field tables, table filter types, model returns. Returns the system-defined model instance after the data is newly created. The generic model instance is Import_default.

Implementation of the model

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.