CN102495882A - System and method for binding page object and database field in Java environment - Google Patents
System and method for binding page object and database field in Java environment Download PDFInfo
- Publication number
- CN102495882A CN102495882A CN2011104026717A CN201110402671A CN102495882A CN 102495882 A CN102495882 A CN 102495882A CN 2011104026717 A CN2011104026717 A CN 2011104026717A CN 201110402671 A CN201110402671 A CN 201110402671A CN 102495882 A CN102495882 A CN 102495882A
- Authority
- CN
- China
- Prior art keywords
- database
- label
- page
- self
- property name
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a system and a method for binding a page object and a database field in a Java environment and belongs to the field of computers. A custom object is obtained by reforming a custom tag on a Java server page (JSP) and serves as the page object, and the custom object and the database field are dynamically bound, so that a data presentation function of the custom tag is realized. The invention has the advantages that: a hypertext markup language (HTML) control can be graphically designed in a development tool; the custom tag can be visually designed; and the custom tag and a database can be bound, and a database value can be automatically displayed and directly stored.
Description
Technical field
The present invention relates to the realization system and method that a kind of page object and Database field are bound, relate in particular to the realization system and method that a kind of Java environment lower page object and Database field are bound.
Background technology
VS developing instrument under the .net environment; Possessed the function that page object (TextField, Label etc.) and background data base field under the .net environment are bound .netFramework is defined as object to the control on the aspx page; Can carry out the AM/BAM operational attribute; Make control become the object of page-level like this,, also let the mentality of designing based on the What You See Is What You Get of figure become a reality simultaneously because the attribute of object is open.
.net the object system under the framework has been that a cover has improved with the proven technique system very much, and the programmer can use very easily based on the form design tools under this system and carry out writing of interface and code.
Being eclipse at the best developing instrument of Java development field at present, is the code level exploitation and it is good at most.It is an and general design tool the most conventional based on the Graphics Design interface of JSP.
But above these instruments cannot directly be faced the Java environment.Because the no object of the page under the Java environment can be sayed, be referred to as label at most, therefore, the list mentality of designing under .net is to satisfy use under the Java environment.
Summary of the invention
In view of the defective that above-mentioned prior art exists, the objective of the invention is to propose a kind ofly can support complex calculation, support according to the Java environment lower page object of the condition combination circulation of a plurality of form datas and the realization system and method for Database field binding.
One object of the present invention will be achieved through following technical scheme:
The realization system that a kind of Java environment lower page object and Database field are bound is used for the demonstration of service end JSP page database related data at web end html page, it is characterized in that, said system comprises and is arranged on service end:
Transform module, be used for the customized label on the JSP page is transformed into self-defined object, make said customized label become the object of page-level; With,
Binding module is used for said self-defined object and database are carried out the dynamic binding operation.
Preferably, said transformation module also is used for:
Said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; In order to register the object of said Property Name correlation type automatically to buffer memory; When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back;
Through the label registered events of doEndTag, obtain corresponding said Property Name in this incident through label, obtain object that should Property Name to buffer memory through said Property Name again;
Carrying out HTML through the unified method for drafting of said object draws.
Preferably, said method for drafting is the Release method.
Preferably, said binding module also is used for:
The single table or the multilist of said database are formed the connection object code in the Java code, said connection object is formed member variable according to field, and generate get and set method to said member variable;
Form one by one corresponding with the attribute of said self-defined object the attribute of said connection object;
In the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same assign method, said assign method is loaded into said connection object in the said self-defined object, is implemented in said customized label demonstrating data.
Another object of the present invention will be achieved through following technical scheme:
The implementation method that a kind of Java environment lower page object and Database field are bound is used for the demonstration of service end JSP page database related data at web end html page, it is characterized in that, comprises the steps:
(1) customized label on the JSP page is transformed into self-defined object, makes said customized label become the object of page-level;
(2) said self-defined object and database are carried out the dynamic binding operation.
Preferably, step (1) comprises following detailed process:
(a) said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; In order to register the object of said Property Name correlation type automatically to buffer memory; When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back;
(b) the label registered events through doEndTag can obtain corresponding said Property Name through label in this incident, obtains object that should Property Name to buffer memory through said Property Name again;
(c) carrying out HTML through the unified method for drafting of said object draws.
Preferably, method for drafting is the Release method described in the step (c).
Preferably, step (2) comprises following detailed process:
(I) single table or the multilist with said database forms the connection object code in the Java code, said connection object formed member variable according to field, and generate get and set method to said member variable;
(II) attribute with said connection object forms corresponding one by one with the attribute of said self-defined object;
(III) in the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same assign method, said assign method is loaded into said connection object in the said self-defined object, is implemented in said customized label demonstrating data.
Compared with prior art, beneficial effect of the present invention is:
(1) can be at developing instrument Graphics Design HTML control; (2) can visual design customized label; (3) can bind customized label and database, realize automatic video data storehouse value and directly preservation.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is further described:
Fig. 1 is the structured flowchart of the realization system that Java environment lower page object and Database field are bound in the embodiment;
Fig. 2 is the process flow diagram of the implementation method that Java environment lower page object and Database field are bound in the embodiment;
Fig. 3 is the process flow diagram that the customized label on the JSP page is transformed into self-defined object;
Fig. 4 is the process flow diagram that self-defined object and database is carried out dynamic binding.
Embodiment
Below in conjunction with specific embodiment such scheme is further specified.Should be understood that these embodiment are used to the present invention is described and are not limited to limit scope of the present invention.The implementation condition that adopts among the embodiment can be done further adjustment according to the condition of concrete producer, and not marked implementation condition is generally the conventional condition of using.
Embodiment
As shown in Figure 1 is the realization system 10 that Java environment lower page object and Database field are bound in the embodiment of the present invention, comprises transforming module and binding module.
Said transformation module is mainly used in: the customized label on the JSP page is transformed into self-defined object, makes said customized label become the object of page-level.
Said transformation module also can be used for: said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; In order to register the object of said Property Name correlation type automatically to buffer memory; When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back; Through the label registered events of doEndTag, can obtain corresponding said Property Name through label in this incident, obtain object that should Property Name to buffer memory through said Property Name again; Carrying out HTML through the unified method for drafting of said object draws.
Preferably, said method for drafting is the Release method.
Said binding module is mainly used in: said self-defined object and database are carried out the dynamic binding operation.
Said binding module can also be used for: the single table or the multilist of said database are formed connection object code TO at the Java code, said connection object is formed member variable according to field, and generate get and set method to said member variable; Form one by one corresponding with the attribute of said self-defined object the attribute of said connection object; In the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same method assign, said method assign is loaded into said connection object in the said self-defined object, thereby is implemented in the function of said customized label demonstrating data.
Implementation method as shown in Figure 2, that Java environment lower page object and Database field are bound in the embodiment of the present invention specifically comprises the steps:
Step S1: the customized label on the JSP page is transformed into self-defined object, makes said customized label become the object of page-level.Can make the customized label that is placed on the JSP page to be conducted interviews through this step by the form of Java background class with object.
In step S1, the process that the customized label on the JSP page is transformed into self-defined object comprises following steps as shown in Figure 2:
Step S11: said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; For example: said Property Name is defined as ID; The value of this ID can be as the title of the self-defined object in backstage, for example: and FIX:TREEVIEW id=" TreeView1 "/.At this moment, system can be a blocker in the middle of the said customized label definition, in order to register the object of said Property Name ID correlation type automatically to buffer memory, for example: TreeView TreeView1=new TreeView ().When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back.
Step S12: through the label registered events of doEndTag, can obtain corresponding said Property Name through label in this incident, for example: ID, obtain object that should Property Name to buffer memory through said Property Name again.
Step S13: after obtaining said object, carry out HTML through the unified method for drafting of said object and draw, for example: said method for drafting is Release.
Step S2: said self-defined object and Database field are carried out dynamic binding, thereby realize the data exhibiting function of said customized label.
In step S2, the process of self-defined object and Database field being carried out dynamic binding comprises following steps as shown in Figure 2:
Step S21: the single table or the multilist of said database are formed the connection object code in the Java code, said connection object is formed member variable according to field, and generate get and set method to said member variable.
Step S22: form one by one corresponding with the attribute of said self-defined object the attribute of said connection object.
Step S23: in the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same method assign, said method assign is loaded into said connection object in the said self-defined object, thereby is implemented in the function of said customized label demonstrating data.
Embodiment of the present invention has following beneficial effect:
(1) design of finding gained: utilize the list designer,, select just can design the list more than 90% through dilatory; (2) closely integrated with database: with data is core, can directly show, selects each data item in the database; (3) design and source code bidirectional reversible: design interface can switch to source code interface and make amendment, and still can switch to design interface after source code is revised, and continues design; (4) can use other design software:, can arrive and continue design in this list designer via the list of other design software design; (5) different step is used different lists: different treatment steps can be seen different lists; (6) according to database definition self-verifying data: the data check of unary, can carry out validity checking to input item automatically according to the definition of database; (7) support the additional data form: outside satisfying the form of database definition, can also specify additional format restriction, like scale etc. to the input data; (8) choice box is tied to database table: can be with the content in the database as the project of selecting; (9) form calculates: can as Excel to the form item order add, subtract, computing such as multiplication and division.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the memory storage and carry out, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize by calculation element.Like this, the present invention is not restricted to any specific hardware and software combination.
Above-mentioned instance only is explanation technical conceive of the present invention and characteristics, and its purpose is to let the people who is familiar with this technology can understand content of the present invention and enforcement according to this, can not limit protection scope of the present invention with this.All equivalent transformations that spirit is done according to the present invention or modification all should be encompassed within protection scope of the present invention.
Claims (8)
1. Java environment lower page object and the Database field realization system of binding is used for the demonstration of service end JSP page database related data at web end html page, it is characterized in that, said system comprises and is arranged on service end:
Transform module, be used for the customized label on the JSP page is transformed into self-defined object, make said customized label become the object of page-level; With,
Binding module is used for said self-defined object and database are carried out the dynamic binding operation.
2. the realization system that Java environment lower page object according to claim 1 and Database field are bound is characterized in that said transformation module also is used for:
Said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; In order to register the object of said Property Name correlation type automatically to buffer memory; When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back;
Through the label registered events of doEndTag, obtain corresponding said Property Name in this incident through label, obtain object that should Property Name to buffer memory through said Property Name again;
Carrying out HTML through the unified method for drafting of said object draws.
3. the realization system that Java environment lower page object according to claim 2 and Database field are bound, it is characterized in that: said method for drafting is the Release method.
4. the realization system that Java environment lower page object according to claim 3 and Database field are bound is characterized in that said binding module also is used for:
The single table or the multilist of said database are formed the connection object code in the Java code, said connection object is formed member variable according to field, and generate get and set method to said member variable;
Form one by one corresponding with the attribute of said self-defined object the attribute of said connection object;
In the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same assign method, said assign method is loaded into said connection object in the said self-defined object, is implemented in said customized label demonstrating data.
5. Java environment lower page object and the Database field implementation method of binding is used for the demonstration of service end JSP page database related data at web end html page, it is characterized in that, comprises the steps:
(1) customized label on the JSP page is transformed into self-defined object, makes said customized label become the object of page-level;
(2) said self-defined object and database are carried out the dynamic binding operation.
6. the implementation method that Java environment lower page object according to claim 5 and Database field are bound, it is characterized in that: step (1) comprises following detailed process:
(a) said customized label is placed on the said JSP page; And the Property Name of the said customized label of unified Definition; In order to register the object of said Property Name correlation type automatically to buffer memory; When said customized label loaded, said service end was collected the good label backstage object of registration to buffer memory, and adjusts back;
(b) the label registered events through doEndTag can obtain corresponding said Property Name through label in this incident, obtains object that should Property Name to buffer memory through said Property Name again;
(c) carrying out HTML through the unified method for drafting of said object draws.
7. the implementation method that Java environment lower page object according to claim 6 and Database field are bound, it is characterized in that: method for drafting is the Release method described in the step (c).
8. the implementation method that Java environment lower page object according to claim 7 and Database field are bound, it is characterized in that: step (2) comprises following detailed process:
(I) forms the connection object code with the single table or the multilist of said database in the Java code, said connection object is formed member variable according to field, and generate get and set method to said member variable;
(II) forms one by one corresponding with the attribute of said self-defined object the attribute of said connection object;
(III) in the process of implementation; Handling implement through unified is connected; Make said self-defined object all continue from unified interface; And having same assign method, said assign method is loaded into said connection object in the said self-defined object, is implemented in said customized label demonstrating data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110402671.7A CN102495882B (en) | 2011-12-07 | 2011-12-07 | System and method for binding page object and database field in Java environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110402671.7A CN102495882B (en) | 2011-12-07 | 2011-12-07 | System and method for binding page object and database field in Java environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102495882A true CN102495882A (en) | 2012-06-13 |
CN102495882B CN102495882B (en) | 2014-01-22 |
Family
ID=46187707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110402671.7A Active CN102495882B (en) | 2011-12-07 | 2011-12-07 | System and method for binding page object and database field in Java environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102495882B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915239A (en) * | 2012-09-06 | 2013-02-06 | 佳都新太科技股份有限公司 | Generation method of label-based JSP (java server pages) form read-only page code |
CN104239508A (en) * | 2014-09-12 | 2014-12-24 | 中国工商银行股份有限公司 | Data query method and data query device |
CN105549978A (en) * | 2015-12-17 | 2016-05-04 | 浪潮软件集团有限公司 | Configuration method for solving pull-down list parameters of web foreground page |
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN106484410A (en) * | 2016-09-28 | 2017-03-08 | 北京赢点科技有限公司 | Destination object generation method and device |
CN107832460A (en) * | 2017-11-28 | 2018-03-23 | 航天天绘科技有限公司 | The graphical page control method of real-time display Satellite TT data based on SVG |
CN108427689A (en) * | 2017-02-15 | 2018-08-21 | 北京国双科技有限公司 | Information acquisition method and device |
CN104933019B (en) * | 2015-06-05 | 2019-05-10 | 亚信科技(南京)有限公司 | A kind of method and device that list generates |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1916842A (en) * | 2006-09-06 | 2007-02-21 | 上海科泰世纪科技有限公司 | Method of packaging component for implementing reflection mechanism in structurized software system |
CN102053994A (en) * | 2009-11-10 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Language parser and parsing method using same |
CN102207873A (en) * | 2011-06-15 | 2011-10-05 | 中国联合网络通信集团有限公司 | Realizing method of JavaScript extended object based on Android platform, and binding interface structure |
-
2011
- 2011-12-07 CN CN201110402671.7A patent/CN102495882B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1916842A (en) * | 2006-09-06 | 2007-02-21 | 上海科泰世纪科技有限公司 | Method of packaging component for implementing reflection mechanism in structurized software system |
CN102053994A (en) * | 2009-11-10 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Language parser and parsing method using same |
CN102207873A (en) * | 2011-06-15 | 2011-10-05 | 中国联合网络通信集团有限公司 | Realizing method of JavaScript extended object based on Android platform, and binding interface structure |
Non-Patent Citations (1)
Title |
---|
NOTHINGISGOD: "jsp自定义标签(5):开发迭代的标签", 《CSDN博客》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915239A (en) * | 2012-09-06 | 2013-02-06 | 佳都新太科技股份有限公司 | Generation method of label-based JSP (java server pages) form read-only page code |
CN104239508A (en) * | 2014-09-12 | 2014-12-24 | 中国工商银行股份有限公司 | Data query method and data query device |
CN104239508B (en) * | 2014-09-12 | 2017-05-10 | 中国工商银行股份有限公司 | Data query method and data query device |
CN104933019B (en) * | 2015-06-05 | 2019-05-10 | 亚信科技(南京)有限公司 | A kind of method and device that list generates |
CN105549978A (en) * | 2015-12-17 | 2016-05-04 | 浪潮软件集团有限公司 | Configuration method for solving pull-down list parameters of web foreground page |
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN105739969B (en) * | 2016-01-21 | 2018-11-02 | 南京南瑞集团公司 | Application method based on the self-defined tag labels of input labels |
CN106484410A (en) * | 2016-09-28 | 2017-03-08 | 北京赢点科技有限公司 | Destination object generation method and device |
CN108427689A (en) * | 2017-02-15 | 2018-08-21 | 北京国双科技有限公司 | Information acquisition method and device |
CN107832460A (en) * | 2017-11-28 | 2018-03-23 | 航天天绘科技有限公司 | The graphical page control method of real-time display Satellite TT data based on SVG |
CN107832460B (en) * | 2017-11-28 | 2022-04-08 | 航天天绘科技有限公司 | SVG-based graphic page control method for displaying satellite measurement and control data in real time |
Also Published As
Publication number | Publication date |
---|---|
CN102495882B (en) | 2014-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102495882B (en) | System and method for binding page object and database field in Java environment | |
US9256582B2 (en) | Conversion of a presentation to Darwin Information Typing Architecture (DITA) | |
CN110059282A (en) | A kind of acquisition methods and system of interactive class data | |
CN101876897A (en) | System and method used for processing Widget on Web browser | |
CN108614776A (en) | Across the dynamic fixing method and system of language protocol test request | |
CN103309806B (en) | The device and method of a kind of quick development and testing | |
KR20150043333A (en) | User interface control framework for stamping out controls using a declarative template | |
CN101699397A (en) | Method for binding Java and XML data | |
US20070130514A1 (en) | Dynamic data presentation | |
CN109885301B (en) | Method, device, storage medium and equipment for generating scalable vector graphics | |
CN102053987A (en) | Uniform interface for displaying and modifying data array | |
CN109670129A (en) | A kind of method and device for switching to html web page to be adapted to MIP format | |
CN102609503A (en) | Method and device for generating static webpages | |
CN108614686A (en) | Image information generating means, image information generation method and recording medium | |
CN103984554A (en) | Software design document generating method and device | |
CN106126240A (en) | A kind of method and system customizing mobile terminal desktop shortcut icon | |
CN109460227A (en) | A kind of development approach of Website front-end, device, equipment and medium | |
CN103678341A (en) | Database interaction system and method | |
CN103246680A (en) | Method and device for aggregating and displaying webpage contents in browser | |
CN102637290A (en) | Operating system based on browser and compiling method | |
CN102663063A (en) | System and method for showing general information of multiple user platforms based on XSLT (extensible stylesheet language transformation) | |
Zhang et al. | Research of web front-end engineering solution in public cultural service project | |
US10726076B2 (en) | Information acquisition method, and information acquisition device | |
CN102129386A (en) | Mobile widget and method for realizing terminal transplantation for same | |
Budaev et al. | Development of the Web Service «Analysis of Demographic Indicators of the Region» |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |