CN102915239A - Generation method of label-based JSP (java server pages) form read-only page code - Google Patents
Generation method of label-based JSP (java server pages) form read-only page code Download PDFInfo
- Publication number
- CN102915239A CN102915239A CN2012103372793A CN201210337279A CN102915239A CN 102915239 A CN102915239 A CN 102915239A CN 2012103372793 A CN2012103372793 A CN 2012103372793A CN 201210337279 A CN201210337279 A CN 201210337279A CN 102915239 A CN102915239 A CN 102915239A
- Authority
- CN
- China
- Prior art keywords
- label
- read
- page
- status
- jsp
- 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
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The invention discloses a generation method of a label-based JSP (java server pages) form read-only page code. A JSP form page generally comprises a group or a plurality of groups of input fields; and when a modification status is added, the form elements are generally displayed in a programmable status. But in browsing status, the form elements are designed to be in a read-only status, and page resources can be shared. By the page design process, although a page code can be shared, a display effect is not good. Conventionally, the read-only status is displayed as a text according to a printing format, instead of an input control format. By a user-defined label technology, the invention provides a page code generation method, so that in the read-only status, through automatically controlling the input fields by a switch, the form page has a final display effect on a page that the programmable status is displayed as a control, and the read-only status is displayed as the text. By the generation method, perceptibility of the page is increased, and data which are required to be displayed on the form page are expressed more clearly.
Description
Technical field
The present invention relates to areas of information technology, particularly the realization of the read-only state code generation of JSP label.
Background technology
The forms pages generation technique is the common technique in the Web application and development.The code of forms pages generally meets the html standard.Comprise one group or the input domain of organizing, when increasing the modification state, but Form Element is shown generically editing mode more.And when browse state, general designing form element is a read states, and page resource can be shared.The processing of this Pages Design, although can share same page code, display effect is not good.Convention, a read states generally can directly be shown as text according to print format, rather than adopt the input control pattern.The present invention is by the customized label technology, a kind of page code generation method is provided, so that in forms pages below a read states, by the final display effect of the automatic control inputs of switch territory on the page: but editing mode is shown as control, a read states is shown as text.By the method, can improve the perceptibility of the page, express more clearly the data that forms pages need to show.
Summary of the invention
The invention discloses a kind of read-only page code of Jsp list generation method based on label, realize same forms pages resource by the mode that defines the label read only attribute, below read-only and editor's two states, generate different html scripts.Simultaneously, aspect status attribute, provide control levels and list rank two kinds of control modes.
For achieving the above object, the invention provides the self-defined controls tab of a cover.The label that comprises Windows form controls commonly used is such as single-line text boxes, multiline text frame, drop-down frame, radio box, the check box of selecting.
The attribute of label is designed with Provider attribute and Status attribute.The Provider attribute is used for the binding relationship of description value; Status as abstract factory final represent pattern, by this Status switch attribute, select different code generators to make up the html script that label finally represents.Read-only like this and editor's two states page can use same page resource, but is presented as distinct page effect.
The attribute of label also comprises the attribute commonly used of general Form Element type, to support corresponding Form Element function.
The present invention also provides the Form form tags.Form tags provides Provider and Status attribute.The show state of the whole list of Status property control, subordinate's form controls label can be inherited this attribute, when the Form label is provided with the Status attribute, all controls of whole list will be preferentially according to the state control display of Form label.
The present invention also provides the method for input thresholding binding.The Provider attribute is used for arranging the bound object of respectively inputting thresholding in the list.Empty object is that initialization list, value object are editor's list.The binding of value is transmitted by the jstl expression formula.Object type is Map<String, String 〉, key and Form Element are of the same name, and value is the value of Form Element.
The present invention also provides the dictionary table caching function.But during the binding of element value, the input input frame is directly finished the assignment of object by the key/value of Map.The assignment of select is carried out the name conversion of key by provider.The buffer memory of dictionary data is dynamically finished.Buffer structure is designed to ConcurrentHashMap<name, Map<String, String〉〉.
Can be found out by such scheme, the read-only page code of control Jsp list attribute that arranges by tag attributes among the present invention generates, and realizes same forms pages resource, below read-only and editor's two states, generates different html scripts.Accelerate inquiry and the binding of page data by the mode of dictionary buffer memory.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do simple the introduction to the accompanying drawing of required use in embodiment or the description of the Prior Art.
Figure is system architecture schematic diagram in the embodiment of the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further illustrated below in conjunction with the drawings and specific embodiments.
Embodiment one, referring to figure.
The invention provides a kind of read-only page code of Jsp list generation method based on label, realize same forms pages resource by the mode that defines the label read only attribute, below read-only and editor's two states, generate different html scripts.Its development and implementation process is as follows:
1) in the web project, adds tag library jar bag.
2) create the jsp page, in the page, import tld.
3) at the jsp page, add the form label, status attribute and provider attribute are set, the provider attribute imports Map<String into, String 〉.
4) in the form label, add controls tab, the status attribute is set.When having specified status such as form, the status attribute that control arranges is invalid.
5) start web server, browse the status page, view result.
6) switch form label status attribute, again browse the status page, view result.
Can be found out by such scheme, pass through the customized label technology among the present invention, a kind of page code generation method is provided, so that in forms pages below a read states, by the final display effect of the automatic control inputs of switch territory on the page: but editing mode is shown as control, a read states is shown as text.By the method, improved the perceptibility of the page, express more clearly the data that forms pages need to show.
Claims (5)
1. the read-only page code of Jsp list generation method based on label, it is characterized in that: designed one group of controls tab that comprises the Status attribute, the label that comprises Windows form controls commonly used is such as single-line text boxes, multiline text frame, drop-down frame, radio box, the check box etc. of selecting; Also comprise simultaneously the containers labels such as Grid, Window; Label comprises particular community: Status, and as the switch of the final display effect of abstract factory, when the status attribute was edit, label was shown as control; When if the status attribute is read, label only is shown as text message, and design and browsing pages can use same rower label code like this.
2. the read-only page code of Jsp list generation method based on label, it is characterized in that: designed one group of form tags that comprises the Status attribute, it is characterized in that: form tags also comprises the Status attribute, as the overall situation setting of whole label; When list is provided with the Status attribute, each the input domain label in the list can both be inherited this attribute so.
3. the read-only page code of Jsp list generation method based on label, it is characterized in that: designed one group of code and generated masterplate, it is characterized in that: code generates by Velocity masterplate engine implementation, and list, controls tab have all defined the masterplate file of the generating code of oneself.
4. the read-only page code of Jsp list generation method based on label, it is characterized in that: designed a kind of binding method of inputting thresholding, it is characterized in that: the binding of input domain can be divided into two situations: static data and dynamic data, and the binding of static data is bound by property value; The binding of dynamic data realizes by unified Provider interface.
5. the read-only page code of Jsp list generation method based on label is characterized in that: designed a kind of design that is worth binding dictionary table data buffer storage, it is characterized in that: during the input domain binding, the buffer memory key assignments is to data automatically; The data source that the field buffer memory is corresponding is specified by the label dictionary attribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012103372793A CN102915239A (en) | 2012-09-06 | 2012-09-06 | Generation method of label-based JSP (java server pages) form read-only page code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012103372793A CN102915239A (en) | 2012-09-06 | 2012-09-06 | Generation method of label-based JSP (java server pages) form read-only page code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102915239A true CN102915239A (en) | 2013-02-06 |
Family
ID=47613613
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012103372793A Pending CN102915239A (en) | 2012-09-06 | 2012-09-06 | Generation method of label-based JSP (java server pages) form read-only page code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102915239A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164226A (en) * | 2013-03-15 | 2013-06-19 | 成都三零凯天通信实业有限公司 | Set top box human-computer interface automatic generating method |
WO2016201814A1 (en) * | 2015-06-17 | 2016-12-22 | 中兴通讯股份有限公司 | Field displaying method and device |
CN106325833A (en) * | 2015-06-18 | 2017-01-11 | 中国石油化工股份有限公司 | Code generation method for enterprise information management |
CN113568615A (en) * | 2021-08-05 | 2021-10-29 | 上海淇玥信息技术有限公司 | Form page editing prohibition display method and device and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020099792A1 (en) * | 2001-01-23 | 2002-07-25 | Neo-Core, L.L.C. | Method of performing a search of a numerical document object model |
CN101706821A (en) * | 2009-12-10 | 2010-05-12 | 中兴通讯股份有限公司 | Tag-based mobile internet page design system and method |
CN102495882A (en) * | 2011-12-07 | 2012-06-13 | 方正国际软件有限公司 | System and method for binding page object and database field in Java environment |
-
2012
- 2012-09-06 CN CN2012103372793A patent/CN102915239A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020099792A1 (en) * | 2001-01-23 | 2002-07-25 | Neo-Core, L.L.C. | Method of performing a search of a numerical document object model |
CN101706821A (en) * | 2009-12-10 | 2010-05-12 | 中兴通讯股份有限公司 | Tag-based mobile internet page design system and method |
CN102495882A (en) * | 2011-12-07 | 2012-06-13 | 方正国际软件有限公司 | System and method for binding page object and database field in Java environment |
Non-Patent Citations (1)
Title |
---|
埃斯帕托: "《ASP.NET 3.5 核心编程》", 31 January 2009, 清华大学出版社, article "第13章记录视图的管理", pages: 535-542 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164226A (en) * | 2013-03-15 | 2013-06-19 | 成都三零凯天通信实业有限公司 | Set top box human-computer interface automatic generating method |
CN103164226B (en) * | 2013-03-15 | 2016-03-02 | 成都三零凯天通信实业有限公司 | A kind of set top box human-computer interface automatic generation method |
WO2016201814A1 (en) * | 2015-06-17 | 2016-12-22 | 中兴通讯股份有限公司 | Field displaying method and device |
CN106325833A (en) * | 2015-06-18 | 2017-01-11 | 中国石油化工股份有限公司 | Code generation method for enterprise information management |
CN113568615A (en) * | 2021-08-05 | 2021-10-29 | 上海淇玥信息技术有限公司 | Form page editing prohibition display method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104461484B (en) | The implementation method and device of front-end template | |
Leutnant et al. | swmmr-an R package to interface SWMM | |
US20160283499A1 (en) | Webpage advertisement interception method, device and browser | |
CN102043626B (en) | Method and device for encapsulating extjs component, and method and system for generating user interface | |
CN103631865B (en) | Webpage generating method and equipment | |
CN102662921B (en) | A kind of document processing method, device and editing machine | |
CN101154157A (en) | System and method for providing globalization function to application of JavaScript | |
CN109697064A (en) | A kind of generation method and device of the customized page | |
CN103631578B (en) | Method for exhibiting data in a kind of distribution automation system | |
CN102654833A (en) | Mobile phone application development method and system | |
US20100251266A1 (en) | Mechanism for interfacing a display screen of another technology with a computing platform | |
CN103577197A (en) | Method for achieving android application program dynamic form | |
CN102880708A (en) | Visual design system and method for implementing hypertext markup language (HTML) page | |
CN103577536A (en) | System and method for generating and improving template website | |
CN106909361A (en) | Web development approaches and device based on masterplate engine | |
CN102915239A (en) | Generation method of label-based JSP (java server pages) form read-only page code | |
CN108681454A (en) | A kind of webpage visualization component development method | |
CN102707945A (en) | Implementation method of form designer based on layout template in Eclipse | |
CN106776800B (en) | Page generation method, device and system for AngularJS framework | |
CN103870254A (en) | Dynamic form achieving method, client and server | |
CN108885544A (en) | Front end page internationalization processing method, application server and computer readable storage medium | |
CN106294760A (en) | Sheet disposal method and server, client | |
CN109240784A (en) | A kind of the chart rendering method and system of memory object | |
CN103914293A (en) | Page generation method and server | |
CN102708710B (en) | E-book reader and working method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130206 |