Content of the invention
The present invention provides a kind of display packing of forms pages and device, for optimizing the display process of forms pages, from
And the development process of forms pages file can be simplified, improve development efficiency.
In a first aspect, the present invention provides a kind of display packing of forms pages, including:
The display device of forms pages receives page number and the first scenario parameters;
The display device of described forms pages, according to described page number, obtains the element letter in the first forms pages file
Breath, described element information includes the component identification of element and the element property information of element;Described component identification is located at form page
In the file of face, described element property information Store is in element property file;
The display device of described forms pages, according to described first scenario parameters and described element information, processes described first
Forms pages file;
The display device of described forms pages, according to the first forms pages file after processing, shows the first forms pages.
In conjunction with a first aspect, in the first embodiment, described according to described page number, in the first forms pages file
Middle acquisition element information, including:
The display device of described forms pages, according to described page number, determines the first list in forms pages library
Pagefile;At least one forms pages file, each forms pages file and the page is stored in described forms pages library
Numbering associated storage;
The display device of described forms pages travels through described first forms pages file, obtains described first forms pages literary composition
Each element mark included by part;
The display device of described forms pages, according to each described component identification, inquires about each described element in element property storehouse
Identify corresponding element property file, obtain the element property information of each element;At least one is stored in described element property storehouse
Individual element property file, each described element property file and component identification associated storage.
In conjunction with first aspect first embodiment, in this second embodiment, described element property information includes and each field
Each display information of scape parameter association, each described display information describes under each scenario parameters, and each described element is in described table
Display rule in single-page.
In conjunction with first aspect second embodiment, in the third embodiment, according to described first scenario parameters and described
Element information, processes described first forms pages file, including:
The display device of described forms pages according to described first scenario parameters, in the element property information of each described element
Each first display information that middle determination is associated with described first scenario parameters;
The display device of described forms pages adopts each described first display information, generates each display code;
It is in described first forms pages file and each that the display device of described forms pages adopts described display code to replace
Described element property information corresponding each element mark, acquisition process after the first forms pages file.
In conjunction with first aspect the 3rd embodiment, in the 4th embodiment, described display code include command character and
Constant data, then adopt the display information of each described display pattern mark association, generate each display code, including:
Display rule according to described by described display information for the display device of described forms pages, generates command character simultaneously
Load constant data corresponding with described command character;
Described loading constant data corresponding with described command character, including:
The display device of described forms pages loads described constant data in the caching of the display device of forms pages;Or
Person, loads described constant data in the addressable data base of display device of described forms pages, and this constant data is deposited
Store up to buffer area.
In conjunction with first aspect to first aspect the 4th embodiment, in the 5th embodiment, receive page number with
Before first scenario parameters, described display packing also includes:
The display device of described forms pages receive that management equipment sends newly-increased and/or the forms pages file updating and
Element property file, and described forms pages file is stored in forms pages library;Described element property file is deposited
Storage is in element property storehouse.
Second aspect, the embodiment of the present invention provides a kind of display device of forms pages, including:
Receiver module, for receiving page number and the first scenario parameters;
Acquisition module, for according to described page number, obtaining the element information in the first forms pages file, described unit
Prime information includes the component identification of element and the element property information of element;Described component identification is located in forms pages file,
Described element property information Store is in element property file;
Processing module, for according to described first scenario parameters and described element information, processing described first forms pages
File;
Display module, for according to the first forms pages file after processing, showing the first forms pages.
In conjunction with second aspect, in the first embodiment, described acquisition module is specifically for according to described page number,
The first forms pages file is determined in forms pages library;At least one form page is stored in described forms pages library
Face file, each forms pages file and page number associated storage;
Travel through described first forms pages file, obtain each element mark included by described first forms pages file;
According to each described component identification, element property storehouse is inquired about each described component identification corresponding element property literary composition
Part, obtains the element property information of each element;At least one element property file is stored in described element property storehouse, each described
Element property file and component identification associated storage.
In conjunction with second aspect first embodiment, in this second embodiment, described element property information includes and each field
Each display information of scape parameter association, each described display information describes under each scenario parameters, and each described element is in described table
Display rule in single-page.
In conjunction with second aspect second embodiment, in the third embodiment, described processing module includes:
Acquiring unit, for according to described first scenario parameters, determine in the element property information of each described element with
Each first display information of described first scenario parameters association;
Signal generating unit, for using each described first display information, generating each display code;
Replacement unit, is belonged to each described element for being replaced in described first forms pages file using described display code
Property information corresponding each element mark, acquisition process after the first forms pages file.
In conjunction with second aspect the 3rd embodiment, in the 4th embodiment, described display code include command character and
Constant data, then specifically for the display rule according to described by described display information, generation command character simultaneously adds signal generating unit
Carry constant data corresponding with described command character;
Described signal generating unit is specifically for loading described constant data in the caching of the display device of forms pages;Or
Person, loads described constant data in the addressable data base of display device of described forms pages, and this constant data is deposited
Store up to buffer area.
In conjunction with second aspect to second aspect the 4th embodiment, in the 5th embodiment, described receiver module is also used
In receive that management equipment sends newly-increased and/or the forms pages file updating and element property file, and by described form page
Face file is stored in forms pages library;Described element property file is stored in element property storehouse.
The display packing of forms pages and device that the present invention provides, each due to only recording in the forms pages file of use
The component identification of element, and element property information is located in element property file, element property information includes different scenes ginseng
Display information under several, then, when showing in forms pages, a forms pages file can be multiplexed in each to greatest extent
Under scape, it is not required to, for different scenes, design different forms pages files, thus the exploitation of forms pages file can be simplified
Journey, improves development efficiency.
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described it is clear that described embodiment is
The a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment being obtained under the premise of not making creative work, broadly falls into the scope of protection of the invention.
Fig. 1 is the flow chart of the display packing embodiment one of forms pages of the present invention.As shown in figure 1, the holding of the present embodiment
Row main body is the display device of forms pages, and the display device of this forms pages can be come in fact using hardware and/or software mode
Existing, it is preferably provided at the display to realize forms pages in server, this display packing includes:
S101, the display device of forms pages receive page number and the first scenario parameters.
Interaction between the display device of forms pages and user can be carried out by the browser on user terminal, specifically
, this browser can provide a user interface, then user passes through user interface input page numbering and the first scenario parameters;Its
Scene parameter represents the display pattern needed for user, for example, check, change, increase newly;For example, user can input page
Numbering P5, the first scenario parameters C10, make the display device of forms pages show the forms pages that numbering is 5 according to the pattern of checking
Show;Or, user can input page numbering P5, the first scenario parameters C20, then numbering is 5 by the display device making forms pages
Forms pages according to modification pattern show;Use for ease of user, above-mentioned scenario parameters can be in user interface
Button, for example, " check " button, " modification " button, when user clicks button, then the display device of forms pages just receives
The display pattern of user's instruction, as above-mentioned scenario parameters.
S102, the display device of forms pages, according to page number, obtain the element information in the first forms pages file.
Above-mentioned element information includes the component identification of element and the element property information of element;Wherein, component identification is located at
In forms pages file, described element property information Store is in element property file.Specifically, referring to table 1:
Table 1
With html in table 1(Hypertext Markup Language, HTML)Forms pages file is
Example, the forms pages file B and forms pages file A of the prior art that are applied to the present embodiment are made to contrast, it is possible to find
In the prior art, the element in forms pages file is html code, for example, represent that the element of levels of clients is html code:
“<select name=cust_class>" and each with the option data of html written in code, for example "<option value=1
>Normal client</option>”;And be applied to the forms pages file of the present embodiment display packing, element is only with component identification
Form be located at forms pages file in, for example represent levels of clients element adopt component identification " $ { cust_class } ", should
The element property information of element includes the display information under each display pattern, for example, in the unit representing levels of clients
In element property information corresponding to element, the display information under newly-increased pattern includes expression levels of clients in similar prior art
Four options;And under the pattern of checking, the rank of client has been to determine, therefore represent the specifying information of levels of clients, such as
Gold medal client, silver medal client etc. are to determine that uniquely, therefore under this pattern, element property information only comprises to represent an option
Display information, that is, increase newly pattern under display information only comprise one of the following:" gold medal client ", " silver medal client ", " commonly visitor
Family " and " diamond client ";But it should be noted that, the element property information containing much information is not on forms pages file
Interior.
S103, the display device of forms pages, according to the first scenario parameters and element information, process the first forms pages literary composition
Part.
Due to including the different display information under plurality of display modes of this element in the element property information of element, but
User is only one kind for the display pattern of forms pages, even checking or newly-increased or modification;Therefore, according to user input
Current first scenario parameters, it is determined that display pattern needed for user, accordingly, determine this display mould in element property information
Display information under formula, in order to process the first forms pages file.
S104, the display device of forms pages, according to the first forms pages file after processing, show the first forms pages.
For example, the first scenario parameters of user input represent that user needs browser display to check the list under pattern
The page, then in this forms pages, the concrete rank of element " levels of clients " is to determine uniquely, then, in element property information, check
Under display pattern, the display information of this " levels of clients " is also to determine and is designated as " gold medal client ";Then replaced using this display information
After changing the component identification in the first forms pages file, according to having carried out the first forms pages file after replacement operation, show
First forms pages.
In the present embodiment, due to only recording the component identification of each element in forms pages file, and element property information
In element property file, and in element property information, it is used for the difference work according to display pattern for each display information of display
To divide, then the display device of forms pages can determine corresponding display letter according to current scenario parameters and element property information
Breath, makees to forms pages file to process, then forms pages show according to corresponding display pattern;Thus a forms pages literary composition
Part can be multiplexed under each scene to greatest extent, is not required to, for different scenes, design different forms pages files, from
And the development process of forms pages file can be simplified, improve development efficiency.
Fig. 2 is the flow chart of the display packing embodiment two of forms pages of the present invention.As shown in Fig. 2 the present embodiment be
The detailed description of display packing is made further, the method includes on the basis of embodiment one:
S201, the forms pages file increasing newly and/or updating receiving management equipment transmission and element property file.
In a practical situation, the display of forms pages needs to load associated documents to be shown, this associated documents
It is specially forms pages file and element property file;Therefore developer needs to develop associated documents, in the present embodiment, opens
Send out librarian use as management equipment server provided Form Designer exploitation associated documents.Specifically, this list sets
Gauge includes INTERFACE DESIGN area, toolbar, property window composition;Wherein, INTERFACE DESIGN area is used for the layout of design element, instrument
Hurdle is made up of the element button of representative element, supports in the way of pulling toward INTERFACE DESIGN area addition element, property window is used for
Every property value of setting element.
The INTERFACE DESIGN area of above-mentioned Form Designer supports to carry out using table-layout and absolute fix layout two ways
The layout of element;Under table-layout mode, developer can add unit in the cell of the form that INTERFACE DESIGN area provides
Element;The specification of form can be configured by developer, for example, increase form row, column, Merge Cells, split cell, set
Put cell style etc.;And under absolute fix layout type, addition element can be pulled from instrument to INTERFACE DESIGN area, specifically will
Element is placed in the block of absolute fix, realizes coordinate setting layout, and above-mentioned element is shown with specific code, with html is
Example, element is shown using html code;Subsequently choose element in INTERFACE DESIGN area, press enter key or other trigger actions, open
Open property window, in order to edit each attribute information of this element;After associated documents are completed using Form Designer design, make
With the memory module of Form Designer, element is converted into component identification, preserves as forms pages file;And each element
Attribute information preserves as element property file.Above-mentioned forms pages file and element property file can be sent to by management equipment
The display device of forms pages, wherein, forms pages file is storable in forms pages library, and element property file is deposited
Storage is in element property storehouse;Above-mentioned forms pages library and element property storehouse can be located in the display device of forms pages, also may be used
On the server that the display device of forms pages is located.
If it should be understood that management equipment is increased newly and/or updated, the display device of forms pages is not required to execute
S201.
S202, the display device of forms pages receive page number and the first scenario parameters.
S203, the display device of forms pages, according to page number, determine the first form page in forms pages library
Face file.
Due to storing at least one forms pages file in forms pages library, and each forms pages file and the page
Numbering associated storage;Then the display device of forms pages, according to page number, can get the list corresponding to this page number
Pagefile;In the present embodiment, the page number according to the current input of user, gets the first forms pages of user's needs
File.
S204, the display device of forms pages travel through the first forms pages file, obtain the first forms pages file and are wrapped
The each element mark including.
, travel through this forms pages file taking the forms pages file B in table 1 as a example, four units in this page can be obtained
Element mark, $ { cust_no }, $ { cust_name }, $ { cust_class } and $ { cust_addr }, wherein symbol " $ { } " are easy to
The display device of forms pages quickly finds the element in the page, and cust_no, cust_name etc. are as component identification
Concrete character, due to representing component identification by the way of " symbol+character ", even if above-mentioned concrete character employs writes list
The code character of pagefile, the code character of for example existing html, but the presence due to symbol, the display dress of forms pages
Put and the code character of component identification and existing html will not be obscured;Can be flexible, component identification can also be using except volume
Write other characters beyond the code character of forms pages, then the display device of forms pages equally will not be obscured.
It should be noted that the labeling method of component identification is not exemplified as limiting with above-mentioned in the present embodiment.
S205, the display device of forms pages identify according to each element, and in element property storehouse, inquiry each element mark is right
The element property file answered, obtains the element property information of each element.
At least one element property file is stored, each element property file is associated with component identification to be deposited in element property storehouse
Storage.This element property information includes each display information associating with each scenario parameters, and each display information describes to join in each scene
Under several, display rule in forms pages for each element;Specifically, taking above-mentioned forms pages file B as a example, the current level of client
Not Wei normal client, then the user input page coding referred to the forms pages file comprising this customer data, according to this list
Each element mark in pagefile, in element property storehouse, inquiry each element identifies corresponding element property file, obtains each unit
The element property information of element.This element property information includes the display information under plurality of display modes;With component identification " $
In the element property information that { cust_class } " associates, describe in the display information under the pattern of checking display rule for " with
Text form shows ' normal client ' ";And describing display rule in the display information under modification pattern is " drop-down row
Bezel, cluster shows ' normal client ', ' silver medal client ', ' gold medal client ' and ' diamond client ' ".
The content that display information is used for writing display rule specifically may include:Element character, page number, elements correlation generation
Code and the control type of element;Wherein element character " cust_class " as exemplified above, by this element character, element property
File can set up incidence relation with component identification " $ { cust_class } ";Page number is for carrying out with forms pages file
Association;Elements correlation code is used for guiding the addressable data base of display device from forms pages for the display device of forms pages
(The data base on server that display device as forms pages is located)The middle data loading with this elements correlation;Such as user
The scenario parameters of input refer to modification pattern, then element " address of theenduser " place need to show the address date of previous input, this address
Data, in previous input, is stored under the association code " addr " in server database, then this user is in modification mould
Need under formula to change this address date, then the display device of forms pages can be according to the association code " addr " of element " address of theenduser "
Find the address date of storage in data base, and load this data to display to the user that, be easy to user with reference to modification;And element
Control type be specifically identified for display form, for example, text label, single file edit box, Multiline Edit frame, single choice
Frame, check box, button, drop-down list box etc., this control type can be using the html written in code of standard it is also possible to
It is self-defining code, for example, can be the combination of the html code of multiple standards;For the control type of some option types, example
As drop-down list box, check box etc., in display information, also need to include option data, for example above-mentioned for being shown in drop-down row
" normal client ", " gold medal client " in bezel, cluster etc., this option data can be described as enumerating data, this enumerate data can as piece
Act value is directly programmed in display information it is also possible to be corresponded with resource number, now enumerates data and is stored in server
Data base in, the display device of forms pages can obtain in the server according to resource number and corresponding enumerate data;In addition,
Preferably, for above-mentioned enumerate data can default settings, such as component identification " { cust_class } ", drop-down list
Display " normal client " can be given tacit consent to, that is, enumerating setting " normal client " in data is default value in frame;When forms pages are in user
Browser on show after, in forms pages acquiescence occur " normal client ", if then user be currently needed for select " normal client ",
Then user can not be used in execution selection operation in forms pages, improves the work efficiency of user;If user is currently needed for selecting
" gold medal client ", then select " gold medal client " in drop-down list box.
S206, the display device of forms pages, according to the first scenario parameters, determine in the element property information of each element
Each first display information associating with the first scenario parameters.
Different display rules under each scenario parameters for the element are included, for example, in scenario parameters C10 in display information
Under, it is not enumerate data for component identification " { cust_class } ", only with one of the presence of read-only form in order to table
Show the data of specific levels of clients;And under scenario parameters C20, be then to include multiple to enumerate data;Accordingly, it would be desirable to according to
First scenario parameters, determine each first display information associating with the first scenario parameters in the element property information of each element.
S207, the display device of forms pages adopt each first display information, generate each display code.
Above-mentioned display code includes command character and constant data, the element being associated with component identification $ { cust_class }
As a example attribute information, according to the display code that the display information being associated with scenario parameters C20 is generated it is:<select Name=
cust_class>………………………………………………………(1)<option value=1>Commonly
Client</option>;…………………………………………(2)<option value=2>Silver medal client</
option>;…………………………………………(3)<option value=3>Gold medal client</option
>;…………………………………………(4)<option value=4>Diamond client</option
>;…………………………………………(5)
Wherein(1)Row<select Name=cust_class>As command character, represent in component identification $
{ cust_class } place shows drop-down list box, to select user class;And(2)~(5)The code at place is included alternatively
Constant data;Above-mentioned each constant data is in display information i.e. as enumerating data towards drop-down list box;And generate aobvious
When showing code, the display device of the forms pages display rule according to described by display information, generate command character and load with
The corresponding constant data of command character, and when loading constant data corresponding with command character, the display device of forms pages can
Constant data is loaded in the caching of the display device of forms pages;Or, in the addressable number of the display device of forms pages
According to storehouse(Such as data base in the server that the display device of forms pages is located)Middle loading constant data, and by this constant number
According to storing to buffer area, beneficial to improving the display device of the forms pages treatment effeciency to forms pages.
S208, the display device of forms pages are replaced in the first forms pages file using display code and each element attribute
The corresponding each element of information identifies, the first forms pages file after acquisition process.
S209, the display device of forms pages, according to the first forms pages file after processing, show the first forms pages.
First forms pages, according to the first forms pages file after processing, can show in the browser that user uses;
Specifically, the display device of forms pages, according to the display code in the first forms pages file after processing, controls user's
Browser carries out user oriented display.
In the present embodiment, due to only recording the component identification of each element in forms pages file, and element property information
In element property file, and in element property information, it is used for the difference work according to display pattern for each display code of display
To divide, then the display device of forms pages can determine corresponding display generation according to current scenario parameters and element property information
Code, makees to forms pages file to process, then forms pages show according to corresponding display pattern;Thus a forms pages literary composition
Part can be multiplexed under each scene to greatest extent, is not required to, for different scenes, design different forms pages files, from
And simplify the development process of forms pages file, improve development efficiency.
Fig. 3 is the structure chart of the display device embodiment one of forms pages of the present invention.As shown in figure 3, this device includes:
Receiver module 31, for receiving page number and the first scenario parameters;
Acquisition module 32, for according to page number, obtaining the element information in the first forms pages file, element information
The element property information of the component identification including element and element;Component identification is located in forms pages file, and element property is believed
Breath is stored in element property file;
Processing module 33, for according to the first scenario parameters and element information, processing the first forms pages file;
Display module 34, for according to the first forms pages file after processing, showing the first forms pages.
In the present embodiment, due to only recording the component identification of each element in forms pages file, and element property information
In element property file, and in element property information, it is used for the difference work according to display pattern for each display code of display
To divide, then the display device of forms pages can determine corresponding display generation according to current scenario parameters and element property information
Code, makees to forms pages file to process, then forms pages show according to corresponding display pattern;Thus a forms pages literary composition
Part can be multiplexed under each scene to greatest extent, is not required to, for different scenes, design different forms pages files, from
And simplify the development process of forms pages file, improve development efficiency.
Fig. 4 is the structure chart of the display device embodiment two of forms pages of the present invention.As shown in figure 4, the present embodiment be
On the basis of embodiment illustrated in fig. 3, it is described in detail further, the acquisition module 32 of the display device of this forms pages is concrete
For according to page number, forms pages library determining the first forms pages file;Store in forms pages library
At least one forms pages file, each forms pages file and page number associated storage;
Travel through the first forms pages file, obtain each element mark included by the first forms pages file;
Identified according to each element, inquiry each element identifies corresponding element property file in element property storehouse, obtain each
The element property information of element;At least one element property file, each element property file and unit is stored in element property storehouse
Element mark associated storage.
Above-mentioned element property information includes each display information associating with each scenario parameters, and each display information describes each
Under scenario parameters, display rule in forms pages for each element.
Further, processing module 33 includes:
Acquiring unit 331, for according to the first scenario parameters, determining and first in the element property information of each element
Each first display information of scape parameter association;
Signal generating unit 332, for using each first display information, generating each display code;
Replacement unit 333, for using display code replace the first forms pages file in each element attribute information pair
The each element mark answered, the first forms pages file after acquisition process.
Above-mentioned display code includes command character and constant data, then signal generating unit 332 is specifically for according to display information
Described display rule, generates command character and loads constant data corresponding with command character;
Signal generating unit 332 is specifically for loading constant data in the caching of the display device of forms pages;Or, in table
Load constant data in the addressable data base of display device of single-page, and this constant data is stored to buffer area.
Further, above-mentioned receiver module 31 is additionally operable to receive the form page of the newly-increased and/or renewal that management equipment sends
Face file and element property file, and forms pages file is stored in forms pages library;Element property file is deposited
Storage is in element property storehouse.
In the present embodiment, due to only recording the component identification of each element in forms pages file, and element property information
In element property file, and in element property information, it is used for the difference work according to display pattern for each display code of display
To divide, then the display device of forms pages can determine corresponding display generation according to current scenario parameters and element property information
Code, makees to forms pages file to process, then forms pages show according to corresponding display pattern;Thus a forms pages literary composition
Part can be multiplexed under each scene to greatest extent, is not required to, for different scenes, design different forms pages files, from
And simplify the development process of forms pages file, improve development efficiency.
It should be noted that above-mentioned each module corresponds to above-mentioned each method embodiment, will not be described here.
One of ordinary skill in the art will appreciate that:The all or part of step realizing above-mentioned each method embodiment can be led to
Cross the related hardware of programmed instruction to complete.Aforesaid program can be stored in a computer read/write memory medium.This journey
Sequence upon execution, executes the step including above-mentioned each method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above only in order to technical scheme to be described, is not intended to limit;To the greatest extent
Pipe has been described in detail to the present invention with reference to foregoing embodiments, it will be understood by those within the art that:Its according to
So the technical scheme described in foregoing embodiments can be modified, or wherein some or all of technical characteristic is entered
Row equivalent;And these modifications or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technology
The scope of scheme.