EDAINFO-Model Download
Tomcat download
This section will introduce the most basic use of EDAINFO-Model in this section. This example is based on Struts, using Tomcat 5.
First introduce the eDAINFO-Model you downloaded on this site, unzip the package, contain such files:
First, DataSource.xml: This is the core file of this component. It is a simplicity that the XML does not use DTD, such as the file content in the package:
: root label;
: You can include multiple models, each model is a table, the Name property is an arbitrary name, reference to the name mapping table in the program;
EXAMPLE TABLENAME>: Table name, the name of the database table of the model map;
: Field Collection
: Columns contains multiple column, each Column is a field, when the attribute type is 0, indicating that the field is the field in the table, 1 Representation is the field in the association table, indicating that the virtual field is denoted by the name of the program, can be arbitrarily named in the program; TabColumn is the real field name in the table. Here, the column actually has an attribute: iSclob, can be true or false, default is false, when a field is a CLOB type, ISCOLB can be set to TRUE, so that there is no need to change in the program, which is automatically identified by the component.
The table to be associated, is not used in this example, will be described later.
primary key, the selection represents the primary key of this table is the field ID.
Page, below, including multiple
: Name Indicates the reference name in the program, indicates the number of records displayed per page, and the viewpage represents the number of pages per page, ie | < <<1 2 3 4 5 >> |, if viewpage is changed to 2, it becomes | << <1 2> >> |.
Second, INIT-Config.xml: The basic configuration of this component, the parameters inside below, one by one,
DataSource: Name of DataSource.xml
JDBCNAME: Name of the data source
DatabaseType: Database type, here there are three values:
1.SQL Server: for MSSQL
2. Oracle: for Oracle
3.Mysql: for mysql
Third, TurnPage.JSP: The style file used by the page can be changed according to your needs.
Fourth, ApplicationResources_iso.properties: Struts resource profile, including the basic data required for this component. Five, edabase-model.jar: this component JAR package
Tired, I will write this today, and later introduce :)