CN104331284A - Method and system for generating and displaying dynamic page - Google Patents

Method and system for generating and displaying dynamic page Download PDF

Info

Publication number
CN104331284A
CN104331284A CN201410594757.8A CN201410594757A CN104331284A CN 104331284 A CN104331284 A CN 104331284A CN 201410594757 A CN201410594757 A CN 201410594757A CN 104331284 A CN104331284 A CN 104331284A
Authority
CN
China
Prior art keywords
data
template
field
dynamic page
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410594757.8A
Other languages
Chinese (zh)
Inventor
梁兴飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201410594757.8A priority Critical patent/CN104331284A/en
Publication of CN104331284A publication Critical patent/CN104331284A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a method and system for generating and displaying a dynamic page. The method comprises the steps: establishing an element template table, an element instance table and a template instance publishing table in a database; acquiring display data and style data, which are required to be displayed, from the database according to display needs; assembling data carrying objects according to business needs, putting the acquired display data and style data into the data carrying objects and encapsulating, so as to form a data carrying object list; returning the encapsulated data carrying object list to the page for cycling; cyclically acquiring data by using a template technology according to the data carrying object list, and displaying the data, so as to achieve the generating and displaying of the dynamic page. According to the method and the system, the data are extracted from the database and are sorted as required, then, collection data are placed in a Request action scope, the data are traversed by using a tag technology, and cycling is carried out according to a specified number of columns, so as to output displayed data, thus, the workload of development is greatly reduced, and meanwhile, the workload of subsequent program maintenance is reduced.

Description

A kind of dynamic page generates methods of exhibiting and system
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of dynamic page and generate methods of exhibiting and system.
Background technology
In development system, some function is purer illustrative function, develops by hand, bothersome effort, and have variation also to need maintain pages later if the html element related to for these function pages also assigns developer, cumbersome.
Summary of the invention
Technical matters to be solved by this invention is for the deficiencies in the prior art, provides a kind of dynamic page to generate methods of exhibiting and system.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of dynamic page generates methods of exhibiting, comprises the steps:
Step 1, sets up element template table, element instance table and template instances publishing table in a database;
Step 2, according to showing the display data and pattern data that need to obtain needs displaying from database;
Step 3, carries data object according to business demand assembling, the display data of acquisition and pattern data is put into and carry data object and encapsulate, form the list object carrying data;
Step 4, by the packaged list object back page carrying data for circulation;
Step 5, utilizes mould plate technique to circulate according to the list object carrying data and obtains data and show, realizes dynamic page and generates and show.
The invention has the beneficial effects as follows: the present invention utilizes mould plate technique configuration element template, element instance and case template etc. in a database, data are taken out as required from database, put into and carry data object, be packaged into the list object carrying data, return to the page, the page utilizes mould plate technique ergodic data, circulate by the columns of regulation, export the data of showing, greatly reduce development amount, decrease the maintenance workload of later stage program simultaneously.
On the basis of technique scheme, the present invention can also do following improvement.
Further, described element template table comprises Element ED field, elementary state field, element name field, element type field and length of element field.
Further, described element instance table comprises template id field, template name field, Element ED field, whether display field and DISPLAY ORDER field.
Further, described template instances publishing table comprises template ID and function code.
Further, described mould plate technique adopts JSTL mould plate technique.
Another technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of dynamic page generates display systems, comprises template configuration module, data acquisition module, list object generation module and page generation module;
Described template configuration module, it is for setting up element template table, element instance table and template instances publishing table in a database;
Described data acquisition module, it is for needing the display data and the pattern data that obtain needs displaying from database according to displaying;
Described list object generation module, it is for carrying data object according to business demand assembling, the display data of acquisition and pattern data are put into and carries data object and encapsulate, form the list object carrying data, and by the packaged list object back page carrying data for circulation;
Described page generation module, it obtains data for utilizing according to the list object carrying data mould plate technique to circulate and shows, realizes dynamic page and generates and show.
On the basis of technique scheme, the present invention can also do following improvement.
Further, described element template table comprises Element ED field, elementary state field, element name field, element type field and length of element field.
Further, described element instance table comprises template id field, template name field, Element ED field, whether display field and DISPLAY ORDER field.
Further, described template instances publishing table comprises template ID and function code.
Further, described mould plate technique adopts JSTL mould plate technique.
Accompanying drawing explanation
Fig. 1 is that a kind of dynamic page of the present invention generates displaying system, method process flow diagram;
Fig. 2 is that a kind of dynamic page of the present invention generates methods of exhibiting system chart.
In accompanying drawing, the list of parts representated by each label is as follows:
1, template configuration module, 2, data acquisition module, 3, list object generation module, 4, page generation module.
Embodiment
Be described principle of the present invention and feature below in conjunction with accompanying drawing, example, only for explaining the present invention, is not intended to limit scope of the present invention.
As shown in Figure 1, a kind of dynamic page generates methods of exhibiting, comprises the steps:
Step 1, sets up element template table, element instance table and template instances publishing table in a database;
Step 2, according to showing the display data and pattern data that need to obtain needs displaying from database;
Step 3, carries data object according to business demand assembling, the display data of acquisition and pattern data is put into and carry data object and encapsulate, form the list object carrying data;
Step 4, by the packaged list object back page carrying data for circulation; (as: putting into Request action scope);
Step 5, utilizes mould plate technique to circulate according to the list object carrying data and obtains data and show, realizes dynamic page and generates and show.
Described element template table comprises Element ED field, elementary state field, element name field, element type field and length of element field.Described element instance table comprises template id field, template name field, Element ED field, whether display field and DISPLAY ORDER field.Described template instances publishing table comprises template ID and function code.
Wherein, described mould plate technique adopts JSTL mould plate technique.J2EE is Java 2 Platform Enterprise Edition (Java2Platform, Enterprise Edition), a set of entirely different in the Technical Architecture of traditional application and development, comprise many assemblies, mainly can simplify and the exploitation of Regular application system and deployment, and then raising is portable, safe and use is worth again.JSTL (JSP Standard Tag Library, JSP standard label storehouse) be the JSP tag library of a continuous perfect open source code, JSTL can only operate on the container of support JSP1.2 and Servlet2.3 specification, also supports as standard in JSP 2.0.
The present invention adopts database configuration template table to realize, in database template table configurable often kind of element exhibition method, whether can revise, then page invocation service acquisition data, realize different bandwagon effects according to different configuration parameters in the page.Be specially and take out data from database, sort as required, then collective data is put into Request action scope, utilize label technique ergodic data, circulate by the columns of regulation, export the data of showing, very big minimizing development amount, decreases the maintenance workload of later stage program simultaneously.
As shown in Figure 2, a kind of dynamic page generates display systems, comprises template configuration module 1, data acquisition module 2, list object generation module 3 and page generation module 4; Described template configuration module 1, it is for setting up element template table, element instance table and template instances publishing table in a database; Described data acquisition module 2, it is for needing the display data and the pattern data that obtain needs displaying from database according to displaying; Described list object generation module 3, it is for carrying data object according to business demand assembling, the display data of acquisition and pattern data are put into and carries data object and encapsulate, form the list object carrying data, and by the packaged list object back page carrying data for circulation; Described page generation module 4, it obtains data for utilizing according to the list object carrying data mould plate technique to circulate and shows, realizes dynamic page and generates and show.
Describe the present invention below in conjunction with instantiation.
1. set up a set of displaying element template table TEMPLATE_ATTR_SPEC, show that element shows example table TEMPLATE_INFO, TEMPLATE_DOMAIN template instances publishing table etc.
Wherein TEMPLATE_ATTR_SPEC comprises following core field:
Wherein TEMPLATE_INFO comprises following core field:
Wherein TEMPLATE_DOMAIN comprises following core field:
Field name explanation of field
TEMPLATE_ID template ID
OP_CODE function code
ATTR_TYPE element type comprises (input text box, select drop-down list, textarea multiline text etc.).OP_CODE is the mark defined to each function in actual applications, or as required the permission ID etc. that OP_CODE is revised as each function is also fine.
2. fetch data by displaying demand
This step effect is the ergodic data in order to provide circulation time to the page, according to the template set up in 1.1 data gone out from data base querying can be converted in this step and carry data and pattern data object, put into and carry data object list, after the list object carrying data has obtained, data are returned to the page.
Set up the template class TemplateInfoBo carrying data, roughly code is as follows:
Wherein attrValue is the occurrence that the page will show.
This example is employing the example of Spring, and roughly program is as follows:
Wherein operationList is the set of TemplateInfoBo.
3.JSP page loop-around data
The technology circulations such as similar JSTL can be used to obtain data and carry out data display, a unified displayed page, reduces page development workload.Program is roughly as follows, arranges for every row 3:
Main thought is exactly the set (array etc.) of circulation TemplateInfoBo, according to attributes different in TemplateInfoBo, control to export different page elements, it is such as should how showing of the select drop-down list of html, control whether to show according to isVisible, and follow-up have pure function of showing just can this page multiplexing again, the work being converted to functional configuration data element for this reason that works.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. dynamic page generates a methods of exhibiting, it is characterized in that, comprises the steps:
Step 1, sets up element template table, element instance table and template instances publishing table in a database;
Step 2, according to showing the display data and pattern data that need to obtain needs displaying from database;
Step 3, carries data object according to business demand assembling, the display data of acquisition and pattern data is put into and carry data object and encapsulate, form the list object carrying data;
Step 4, by the packaged list object back page carrying data for circulation;
Step 5, utilizes mould plate technique to circulate according to the list object carrying data and obtains data and show, realizes dynamic page and generates and show.
2. a kind of dynamic page generates methods of exhibiting according to claim 1, and it is characterized in that, described element template table comprises Element ED field, elementary state field, element name field, element type field and length of element field.
3. a kind of dynamic page generates methods of exhibiting according to claim 1, it is characterized in that, described element instance table comprises template id field, template name field, Element ED field, whether display field and DISPLAY ORDER field.
4. a kind of dynamic page generates methods of exhibiting according to claim 1, and it is characterized in that, described template instances publishing table comprises template ID and function code.
5. a kind of dynamic page generates methods of exhibiting according to claim 1, it is characterized in that, described mould plate technique adopts JSTL mould plate technique.
6. dynamic page generates a display systems, it is characterized in that, comprises template configuration module, data acquisition module, list object generation module and page generation module;
Described template configuration module, it is for setting up element template table, element instance table and template instances publishing table in a database;
Described data acquisition module, it is for needing the display data and the pattern data that obtain needs displaying from database according to displaying;
Described list object generation module, it is for carrying data object according to business demand assembling, the display data of acquisition and pattern data are put into and carries data object and encapsulate, form the list object carrying data, and by the packaged list object back page carrying data for circulation;
Described page generation module, it obtains data for utilizing according to the list object carrying data mould plate technique to circulate and shows, realizes dynamic page and generates and show.
7. a kind of dynamic page generates display systems according to claim 6, and it is characterized in that, described element template table comprises Element ED field, elementary state field, element name field, element type field and length of element field.
8. a kind of dynamic page generates display systems according to claim 6, it is characterized in that, described element instance table comprises template id field, template name field, Element ED field, whether display field and DISPLAY ORDER field.
9. a kind of dynamic page generates display systems according to claim 6, and it is characterized in that, described template instances publishing table comprises template ID and function code.
10. a kind of dynamic page generates display systems according to claim 6, it is characterized in that, described mould plate technique adopts JSTL mould plate technique.
CN201410594757.8A 2014-10-29 2014-10-29 Method and system for generating and displaying dynamic page Pending CN104331284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410594757.8A CN104331284A (en) 2014-10-29 2014-10-29 Method and system for generating and displaying dynamic page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410594757.8A CN104331284A (en) 2014-10-29 2014-10-29 Method and system for generating and displaying dynamic page

Publications (1)

Publication Number Publication Date
CN104331284A true CN104331284A (en) 2015-02-04

Family

ID=52406018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410594757.8A Pending CN104331284A (en) 2014-10-29 2014-10-29 Method and system for generating and displaying dynamic page

Country Status (1)

Country Link
CN (1) CN104331284A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573765A (en) * 2015-12-29 2016-05-11 武汉传神信息技术有限公司 Implementation method for dynamic form, client and server
CN105824647A (en) * 2016-04-05 2016-08-03 浪潮电子信息产业股份有限公司 Form page generating method and device
CN106096064A (en) * 2016-07-19 2016-11-09 百度在线网络技术(北京)有限公司 For the method and apparatus generating the page
CN107016297A (en) * 2017-01-24 2017-08-04 阿里巴巴集团控股有限公司 The method for packing and equipment of a kind of data object
CN107391566A (en) * 2017-06-13 2017-11-24 珠海格力电器股份有限公司 Show the method and device of multi-medium data
CN110134477A (en) * 2019-04-24 2019-08-16 北京字节跳动网络技术有限公司 A kind of method, apparatus, medium and the electronic equipment of Dynamic Distribution's User Page
CN110222293A (en) * 2019-04-30 2019-09-10 北京三快在线科技有限公司 A kind of forms pages generation method and device
CN111367507A (en) * 2020-03-11 2020-07-03 上海东普信息科技有限公司 Page code generation method, device, equipment and storage medium
CN113139013A (en) * 2021-03-25 2021-07-20 北京思特奇信息技术股份有限公司 Method and system for dynamically configuring view display

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020073058A1 (en) * 2000-12-07 2002-06-13 Oren Kremer Method and apparatus for providing web site preview information
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101882074A (en) * 2010-03-15 2010-11-10 浪潮集团山东通用软件有限公司 Method and system for graphic user interface combination and layout
CN103019683A (en) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 Method for dynamically configuring page view

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020073058A1 (en) * 2000-12-07 2002-06-13 Oren Kremer Method and apparatus for providing web site preview information
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101882074A (en) * 2010-03-15 2010-11-10 浪潮集团山东通用软件有限公司 Method and system for graphic user interface combination and layout
CN103019683A (en) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 Method for dynamically configuring page view

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
软件开发技术联盟: "《Java Web开发实战》", 30 September 2013 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573765A (en) * 2015-12-29 2016-05-11 武汉传神信息技术有限公司 Implementation method for dynamic form, client and server
CN105824647A (en) * 2016-04-05 2016-08-03 浪潮电子信息产业股份有限公司 Form page generating method and device
CN106096064A (en) * 2016-07-19 2016-11-09 百度在线网络技术(北京)有限公司 For the method and apparatus generating the page
CN107016297A (en) * 2017-01-24 2017-08-04 阿里巴巴集团控股有限公司 The method for packing and equipment of a kind of data object
CN107391566A (en) * 2017-06-13 2017-11-24 珠海格力电器股份有限公司 Show the method and device of multi-medium data
CN110134477A (en) * 2019-04-24 2019-08-16 北京字节跳动网络技术有限公司 A kind of method, apparatus, medium and the electronic equipment of Dynamic Distribution's User Page
CN110134477B (en) * 2019-04-24 2021-07-20 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for dynamically laying out user pages
CN110222293A (en) * 2019-04-30 2019-09-10 北京三快在线科技有限公司 A kind of forms pages generation method and device
CN111367507A (en) * 2020-03-11 2020-07-03 上海东普信息科技有限公司 Page code generation method, device, equipment and storage medium
CN113139013A (en) * 2021-03-25 2021-07-20 北京思特奇信息技术股份有限公司 Method and system for dynamically configuring view display
CN113139013B (en) * 2021-03-25 2024-03-19 北京思特奇信息技术股份有限公司 Method and system for displaying dynamic configuration view

Similar Documents

Publication Publication Date Title
CN104331284A (en) Method and system for generating and displaying dynamic page
CN109597661B (en) Service function configuration method and device
CN105022615B (en) A kind of generation method and system at interface
CN105045775A (en) Method and apparatus for generating Excel document in designated format
CN102945287B (en) JSP data automatic paging JSTL stamp methods
CN110019397B (en) Method and device for data processing
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
CN102789491B (en) A kind of configurable data subscription and delivery system and method thereof
CN110597842B (en) Service data query method and system
CN105487864A (en) Method and device for automatically generating code
CN105589734B (en) A kind of method of self-defined template creation application
CN103309806B (en) The device and method of a kind of quick development and testing
CN104572597A (en) Automatic word analysis report generation method and device
CN104133772A (en) Automatic test data generation method
CN102902767A (en) Method and system for rapidly creating forms
CN106648587A (en) Annotation-based Web application code generation method
CN105183450A (en) E-government form model configuration system with foreground and background separation function
US20150066977A1 (en) Method and system for managing digital resources
CN104111994A (en) Label data screening method and device based on mixed data source
CN103218417A (en) Configurable form generation device and form generation method
CN104216961A (en) Method and device for data processing
CN104915414A (en) Data extraction method and device
US20200394036A1 (en) Method and system for integrating a development environment repository with a version control tool
CN106886535A (en) A kind of data pick-up method and apparatus for being adapted to multiple data sources
CN105354072A (en) Code generation method based on Eclipse platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150204