CN103605502B - Form page display method and server - Google Patents
Form page display method and server Download PDFInfo
- Publication number
- CN103605502B CN103605502B CN201310344168.XA CN201310344168A CN103605502B CN 103605502 B CN103605502 B CN 103605502B CN 201310344168 A CN201310344168 A CN 201310344168A CN 103605502 B CN103605502 B CN 103605502B
- Authority
- CN
- China
- Prior art keywords
- attribute
- display
- page
- displayed
- browser
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000011161 development Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
- Digital Computer Display Output (AREA)
Abstract
The present invention provides a kind of form page display method and server.This method includes:The forms pages display request that browser is sent is received, the forms pages display request includes the display width of form number and the browser;According to the form number, the element property of each element in the form attributes and the list of the form number correspondence list is obtained;According to the display width of the browser, it is determined that display columns;According to the element property of each element in the display columns, the form attributes of the list and the list, forms pages to be shown are generated;The forms pages to be shown are sent to the browser, so that the browser shows the forms pages to be shown.The present invention is by the width according to browser, and form number generates forms pages to be shown in real time, improves the reusability of information system list, reduces the workload of information system list exploitation, has saved the storage resource of server.
Description
Technical Field
The invention relates to the technical field of information, in particular to a form page display method and a server.
Background
With popularization and application of various mobile devices such as tablet computers and smart phones, cases of accessing an enterprise information system through a browser in the mobile device are increasing, in the enterprise information system, a form page based on HyperText markup Language (HTML) is the most common interface display mode, and main contents of the form page include form forms and form elements in the forms, such as a single-line input box, a multi-line input box, text labels, radio boxes, check boxes and the like, and also include JavaScript codes related to display and business operations.
Generally, when a form of an information system is developed, only the interface layout of a Personal Computer (PC) as a display device is considered, and it is difficult to apply the designed interface to various mobile devices. At present, in order to meet the requirement of accessing an information system by using terminals with different screen sizes, information system developers design different form display interfaces aiming at terminal screens with different sizes.
Different form display interfaces are developed aiming at terminal screens with different sizes, and multiple sets of display interfaces have more repeated contents, such as form elements, page JavaScript codes and the like, so that the repeatability of the form development work of an information system is caused, and the storage resources of a server are wasted.
Disclosure of Invention
The invention provides a form page display method and a server, which are used for improving the form reuse rate of an information system, thereby reducing the work load of form development in the information system and saving the storage resource of the server.
The invention provides a form page display method, which comprises the following steps:
receiving a form page display request sent by a browser, wherein the form page display request comprises a form number and the display width of the browser;
acquiring form attributes of a form corresponding to the form number and element attributes of each element in the form according to the form number;
determining the number of display columns according to the display width of the browser;
generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form;
and sending the form page to be displayed to the browser so that the browser displays the form page to be displayed.
Another aspect of the present invention provides a server, including:
the browser comprises a receiving module, a display module and a display module, wherein the receiving module is used for receiving a form page display request sent by a browser, and the form page display request comprises a form number and the display width of the browser;
the acquisition module is used for acquiring the form attribute of the form corresponding to the form number and the element attribute of each element in the form according to the form number;
the determining module is used for determining the number of display columns according to the display width of the browser;
the generating module is used for generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form;
and the sending module is used for sending the form page to be displayed to the browser so that the browser displays the form page to be displayed.
One of the above technical solutions has the following advantages or beneficial effects:
according to the form page display method and the server, the number of columns of the forms to be displayed is determined according to the display width of the browser in the form page display request, the form attributes and the attributes of the elements in the forms are obtained according to the form numbers in the form page display request, and the form pages to be displayed are generated, so that the form attributes and the element attributes of the forms are only required to be stored, the form pages are generated and displayed in real time according to the form page display request sent by the browser, the reuse rate of the forms in an enterprise information system is improved, the workload of form development of the information system is reduced, and the storage resources of the server are saved.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of a form page display method according to the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of a form page display method provided by the present invention;
fig. 3 is a schematic structural diagram of an embodiment of a server provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a form page display method according to a first embodiment of the present invention. As shown in fig. 1, the method includes:
s10, receiving a form page display request sent by the browser, wherein the form page display request comprises a form number and the display width of the browser.
In this embodiment, the server receives a form page display request sent by the browser. Specifically, a user clicks a form name to be loaded in a browser of the terminal or inputs the form name to be loaded in a corresponding input box, and the like, so as to determine a form page desired to be loaded, the browser determines a form number corresponding to the form page requested to be loaded by the user according to the input of the user, and sends the form number and a display width parameter of the browser to the server.
And S11, acquiring the form attribute of the form corresponding to the form number and the element attribute of each element in the form according to the form number.
Specifically, the server queries a form attribute table in a locally stored form database according to the form number, determines a form attribute corresponding to the form number, and then queries a form element attribute table in the form database according to the form number, and determines an element attribute of each form element corresponding to the form number. The form attribute table stores the form attributes of each form, the form attributes comprise form numbers, the form element attribute table stores the element attributes of each form element, the form element attributes comprise the form numbers of the elements, and the form numbers are unique identifiers of the forms in the form database. The form attribute table and form element attribute table may be stored in a form database or in a form file. This embodiment is not limited to this. The present invention is described by taking an example in which the form attribute table and the form element attribute table are both stored in the form database.
In general, a form can be divided into a header, a top button area, a form table area, a bottom button area, and a footer 5 area. The main attributes of the form are shown in table 1:
table 1 form attributes
The attributes of the elements in the form are shown in table 2:
TABLE 2 Table Unit element Attribute
It should be noted that the form attributes and the form element attributes listed in the form attribute table and the form element attribute table are only exemplary illustrations of commonly used forms, and are not definitions of the form attributes and the form element attributes. The form attribute and the identifier definition of each element attribute of the form may be executed according to a common specification or a default rule, which is not limited in the present invention. For example, the default number of columns of the form is designed according to the currently commonly used office equipment, specifically, if the currently commonly used office equipment is a PC, the default number of columns is designed as the number of columns of the form table when the terminal where the browser is located is the PC, and if the commonly used office equipment is another mobile terminal, such as a tablet computer (PAD), the default number of columns is the number of columns of the form table when the terminal where the browser is located is the PAD. The invention is not limited in this regard; as another example, the top button alignment property in the form property may define that 1 or L represents the left display, 2 or M represents the center display, and 3 or R represents the right display; as another example, an element type definition in a form element attribute may represent a text label with 1 or T, a single line edit box with 2 or OED, a multi-line edit box with 3 or DED, a radio box with 4 or RB, and so on.
And S12, determining the number of display columns according to the display width of the browser.
In this embodiment, the display width of the browser refers to the display width of the browser on the terminal, and mainly depends on the size of the display screen of the terminal. In addition, many handheld mobile terminals are provided with gravity sensing devices, when the direction in which a user holds the terminal changes, for example, from vertical to horizontal or from horizontal to vertical, the displayable width of the browser displayed on the mobile terminal changes, and accordingly, the number of display columns determined according to the display width of the browser also changes.
In a special application scenario, a form page displayed on a browser of a terminal is a form page generated according to a browser display width carried in a last form page display request of the browser, at this time, a user changes a holding direction of the terminal, that is, the display width of the browser is changed, a new form page display request is triggered, and a server receives the form page display request sent by the browser based on the new display width, so that a new form page to be displayed is generated according to the new request, and the newly generated form page to be displayed is displayed on the browser.
Specifically, the server obtains the column Width COLW of the form table in the form attribute corresponding to the form number according to the form number, and calculates the display column number of the form requested to be displayed on the browser by combining the received display Width Scale Width of the browser
And S13, generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form.
Usually, the server creates a form page data structure according to the form attribute, the element attribute of each element in the form, and the display column number of the form, and then converts the form page data structure into a form HTML file, that is, a form page to be displayed.
S14, sending the form page to be displayed to the browser, so that the browser displays the form page to be displayed.
According to the form page display method provided by the embodiment, the number of columns of the form to be displayed is determined according to the display width of the browser in the form page display request, the form attribute and the attribute of each element in the form are obtained according to the form number in the form page display request, and the form page to be displayed is generated, so that the form attribute and the element attribute of each form only need to be stored, the form page is generated in real time according to the form page display request sent by the browser and displayed, the reuse rate of the form of the information system is improved, the workload of form development of the information system is reduced, and the storage resource of a server is saved.
Fig. 2 is a flowchart illustrating a second embodiment of a form page display method provided by the present invention. As shown in fig. 2, on the basis of the first embodiment shown in fig. 1, the element attributes in the second embodiment include the serial number, the number of rows and the number of columns of the element in the form; accordingly, the above S13 includes:
s131, generating a form page to be displayed according to the display column number;
and S132, loading the elements in the form into the form page to be displayed according to the sequence number, the number of occupied element rows and the number of occupied element columns of the elements in the form according to the form attribute of the form and the element attribute of the elements in the form.
In this embodiment, a blank form page to be displayed, which does not include elements, is first generated only according to the number of display columns, and then each element is loaded into the blank form page according to the element attribute of each element belonging to the form. Specifically, the sequence number of the element in the element attribute in the form indicates the display sequence of the element in the form to which the element belongs, and the display sequence of the element in the form may be sequentially arranged from left to right, from top to bottom, or may be arranged in a horizontal "zigzag" shape, or may be arranged in a vertical "zigzag" shape, which is not limited in this invention. The number of the occupied rows and the number of the occupied columns of the element represent the number of the rows and the number of the columns used by the element in the form, and when the number of the occupied rows or the number of the occupied columns is more than 1, the condition that the element spans across rows or columns in the form is represented; if the number of columns and the number of rows of an element are 0, it indicates that the element is in the same cell as the previous sequence number element in the table. For example, if the display column number of a form with a form number of 100 determined according to the display width of the browser is 4, the form displays the elements in the order from left to right and from top to bottom, in the form, the serial number of the element a is 1, the number of occupied rows is 2, and the number of occupied columns is 1; the serial number of the element B is 2, the number of occupied lines is 1, and the number of occupied columns is 1; the serial number of the element C is 3, the number of occupied lines is 1, and the number of occupied columns is 2; the serial number of the element D is 4, and the number of occupied rows and the number of occupied columns are 0; if the element E has a sequence number of 5, a number of columns of 1, and a number of columns of 3, the generated pages of the form are shown in table 3 below.
TABLE 3 Table 100
Further, the element attribute also includes a minimum display column number of the element;
after S131, the method further includes:
judging the minimum display column number of each element in the form and the size of the display column number;
the S132 includes:
and loading the elements with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of the elements in the form according to the form attribute of the form and the element attribute of each element in the form.
For example, if the number of display columns of the form determined by the server according to the width of the browser in the form display request is 4, only the elements with the minimum number of display columns not exceeding 4 are displayed in the generated form page to be displayed, and for the elements with the minimum number of display columns exceeding 4 belonging to the form, the elements are not loaded in the form page to be displayed, and accordingly, the elements are not displayed in the form page to be displayed generated this time.
In a preferred implementation, the form page display request further includes a scene parameter; the element attributes also comprise display modes of the elements in all scenes;
after S131, the method further includes:
determining a display mode corresponding to each element and the scene parameter according to the scene parameter;
the above loading, according to the form attribute of the form and the element attribute of each element in the form, each element whose minimum display column number does not exceed the display column number into the form page to be displayed according to the sequence number, the element count number, and the element count number of each element in the form, includes: and loading the elements of which the minimum display column number does not exceed the display column number and the corresponding display mode is non-hidden into the form page to be displayed according to the sequence number, the element occupying row number and the element occupying column number of the elements in the form according to the corresponding display mode, the form attribute of the form and the element attribute of the elements in the form.
Specifically, the scene parameter represents a display scene of a form page requested by the browser. For example, the viewing scene indicates that the user only wants to view the form page, and does not edit the page; the new scene shows that a new form page is added to the style of the form page by the user; the modification scenario represents that the user wants to modify some elements in the form page or modify the style of the form, etc. Specifically, the viewing scene may be represented by 1 or S, the new added scene may be represented by 2 or a, and the modification form scene may be represented by 3 or M. The invention is not limited in this regard.
In general, the display mode of each element in the form is different for different scenes. The display modes of the elements in each scene can be divided into two types, namely hidden and non-hidden, and the specific non-hidden display modes include: the method comprises the steps of text form display, control form display, read-only control form display and the like, wherein only elements of which the display mode is non-hidden under the scene parameters are loaded in a form page to be displayed, and for the elements of which the display mode is hidden, the elements do not need to be loaded in the form page generated at this time, namely the elements cannot be displayed in the form page. Specifically, 1 or T may be used to indicate that the element is displayed in a text form, 2 or T may be used to indicate that the element is displayed in a control form, 3 or RT may be used to indicate that the element is displayed in a read-only control form, and 4 or H may be used to indicate that the element is hidden and not displayed in the table. This embodiment is not limited to this. For example, in a newly added scene, some elements or all elements may be hidden and not displayed, then after a form page to be displayed is generated according to the number of display columns, it may be determined whether each element in the generated form page to be displayed is to be displayed in the form page according to the scene parameters and the display mode of each element in the scene, if the display modes of all elements are hidden, a blank form page is directly generated and displayed in the browser, and if the display modes of some elements in the form are not hidden, then each element is loaded into the form page to be displayed according to the element attribute of each element whose display mode is not hidden.
In this embodiment, the step of determining the minimum display column number and the size of the display column number of each element in the table, and the step of determining the display mode of each element under the scene parameter according to the scene parameter are not limited in order, and the minimum display column number and the size of the display column number of each element may be determined first, or the display mode of the element may be determined first according to the scene parameter. It can be understood that, in the case that the form page display request does not carry the scene parameters, the step of determining the display mode of the element according to the scene parameters is not performed in the form page generation process. And after determining whether the element needs to be loaded in the generated form page according to the minimum display column number of the element and the display mode of the element under certain scene parameters, loading each element into the form page to be displayed according to the element attribute of each element.
Correspondingly, after loading each element, the minimum display column number of which is not more than the display column number and the corresponding display mode of which is non-hidden, into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of each element in the form, the method further includes:
and displaying each element according to the display mode corresponding to each element loaded into the form page to be displayed.
For example, in a viewing scene, a display mode of an element loaded in a form page to be displayed is displayed in a text form, and after the element is loaded in the form page to be displayed according to an element attribute of the element, the element is displayed in the text form.
Further, the element attribute also includes the resource number of the element; correspondingly, after loading the elements, the minimum number of display columns of which is not more than the number of display columns, into the form page to be displayed according to the sequence number, the number of rows occupied by the elements and the number of columns occupied by the elements in the form according to the form attribute of the form and the element attribute of each element in the form, the method further includes:
and aiming at the elements which are loaded into the form page to be displayed and contain effective resource numbers in element attributes, acquiring enumeration resources of the elements from a cache according to the effective resource numbers, and loading the enumeration resources into the form page to be displayed.
In this embodiment, a resource number is set in the element attribute, a resource number table is stored in the cache of the server, and a corresponding relationship between the resource number and the enumerated resource is stored in the enumerated resource number table. Specifically, for an element that does not need to be enumerated, the corresponding element resource number may be set to be null, or a preset character may be set to indicate that the element does not have enumerated resources, for example, the resource number is null or set to be 0 to indicate that the element does not have enumerated resources, and the server does not need to query the resource number table; correspondingly, for an element to be enumerated, the corresponding element resource number may be set as a valid resource number. And the server determines enumeration resources corresponding to the resource numbers by inquiring a resource number table stored in a local cache according to the effective resource numbers of the elements in a certain table, and loads the enumeration resources into the form page to be displayed. For example, if a certain drop-down frame table element named "user level" has resource numbers of 1, 2, 3, 4, the server determines that the resource corresponding to the resource number is "VIP client", "clique client", "big client", or "individual client" by querying the resource number table of the cache area, then loads the enumerated resources into the corresponding drop-down list frame, and when the user clicks the drop-down frame in the displayed form page, the resources will be displayed in the form page.
Generally, the storage space of the server cache is limited, and for table elements with more complicated enumerated resources, the resource numbering table may also be stored in the service database, the server first searches the corresponding enumerated resources from the cache according to the effective resource numbers, if not found, searches in the resource numbering table in the service database, and stores the corresponding relationship between the resource numbers and the enumerated resources in the cache while loading the searched enumerated resources to the form page to be displayed.
Still further, the element attribute also includes an element code of the element;
after loading, according to the form attribute of the form and the element attribute of each element in the form, each element whose minimum display column number does not exceed the display column number into the form page to be displayed according to the sequence number, the element count number, and the element count number of each element in the form, the method further includes:
determining whether each element loaded into the page to be displayed needs to load element data or not according to the scene parameters; and if so, acquiring the element data of each element from the business database according to the element code of each element, and loading the element data into the form page to be displayed.
Specifically, the element code is an identifier for acquiring data corresponding to the element, an element code table is stored in the service database, and a corresponding relationship between the element code and the element data is stored in the element code table. Specifically, a scene that needs to load the element data may be preset, for example, the element data needs to be loaded when setting the view scene and the modification scene, and the element data does not need to be loaded when a new scene is added; correspondingly, if the server determines that the form page display request is a view scene or a modification scene according to the scene parameters, the server acquires data corresponding to the code from a service database according to the determined element code of each element of the form and loads the data into the form page to be displayed; if the server determines that the scene parameters carried by the form page display request are new scenes, the element codes of the elements of the form do not need to be checked, and the display form of the elements in the form page to be displayed is determined only according to other attributes of the elements.
Further, before the receiving a form page display request sent by a browser, the method further includes:
receiving form attributes of the form and element attributes of elements in the form, which are sent by a form designer, wherein the form attributes of the form comprise the form number, and the element attributes of the elements in the form comprise the form number;
respectively storing the form attribute of the form and the element attribute of each element in the form in a form attribute table and a table element attribute table;
the obtaining of the form attribute of the form corresponding to the form number and the element attribute of each element in the form according to the form number includes:
and acquiring the form attribute containing the form number from the form attribute table according to the form number, and acquiring the element attribute of each element containing the form number from the form element attribute table.
Specifically, the form is divided into a data structure formed by form attributes and element attributes of each element of the form in the form designer, and then the attributes of the form and the element attributes of each element in the form are set according to preset rules, so that the server stores the set form attributes and form element attributes sent by the form designer in a form database. The specific definition of the form attribute and the form element attribute can refer to the description of the above embodiments, and will not be described herein again. One form attribute corresponds to at least one form element attribute, that is, at least one element in one form belongs to the form.
In this embodiment, when a form page is to be newly added, a default style of a preset form table is loaded in a form designer, and generally, the default style of the preset form table may be a form table with 4 rows and 3 columns, or a form table with 3 rows and 3 columns, which is not limited in this embodiment; correspondingly, if the existing form needs to be modified, obtaining the form attribute and the form element attribute according to the page number to be modified, and displaying the form attribute and the form element attribute in a form designer; modifying the form style displayed in the designer according to the form style to be added or modified, such as splitting cells or merging cells, and setting the form as a default column number, wherein the default column number is usually set for the display width of a browser of a terminal on the basis of a PC (personal computer); adding, modifying and moving an epi-element; setting attributes for the form elements and the forms according to preset rules; and sending the set form attribute and the set form attribute to a server, so that the server stores the form attribute and the form element attribute in a local form attribute table and a local form element attribute table respectively.
According to the method provided by the embodiment, the column number of the form to be displayed is determined according to the display width of the browser in the form page display request, the form attribute and the element attribute of each element are determined according to the form number, the display mode of each element in the form is determined according to the scene parameter, and each element in the form is displayed in the form page to be displayed according to the display sequence number of each element in the form, the minimum display column number of each element and the data of each element, so that the form attribute and the element attribute of each form only need to be stored, the form page is generated and displayed in real time according to the form page display request sent by the browser, the reuse rate of the form of the information system is improved, the workload of form development of the information system is reduced, and the storage resource of a server is saved.
Fig. 3 is a schematic structural diagram of an embodiment of a server provided in the present invention. As shown in fig. 3, the server includes: the device comprises a receiving module 30, an obtaining module 31, a determining module 32, a generating module 33 and a sending module 34; wherein,
the receiving module 30 is configured to receive a form page display request sent by a browser, where the form page display request includes a form number and a display width of the browser;
the obtaining module 31 is configured to obtain, according to the form number, a form attribute of the form corresponding to the form number and an element attribute of each element in the form;
a determining module 32, configured to determine the number of display columns according to the display width of the browser;
the generating module 33 is configured to generate a form page to be displayed according to the display column number, the form attribute of the form, and the element attribute of each element in the form;
a sending module 34, configured to send the form page to be displayed to the browser, so that the browser displays the form page to be displayed.
Specifically, the element attributes include the serial number, the number of rows occupied by the element, and the number of columns occupied by the element in the form;
the generating module is specifically configured to generate a form page to be displayed according to the number of the display columns; and loading each element in the form into the form page to be displayed according to the sequence number, the number of lines occupied by the element and the number of columns occupied by the element in the form according to the form attribute of the form and the element attribute of each element in the form.
Further, the element attribute also includes a minimum display column number of the element;
the generating module 33 is further specifically configured to determine the minimum display column number and the size of the display column number of each element in the form after generating the form page to be displayed according to the display column number; and loading the elements with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of the elements in the form according to the form attribute of the form and the element attribute of each element in the form.
Preferably, the form page display request further includes a scene parameter; the element attributes also comprise display modes of the elements in all scenes;
after the generating module 33 generates the form page to be displayed according to the number of the display columns, the generating module is further specifically configured to: determining a display mode corresponding to each element and the scene parameter according to the scene parameter; and loading the elements of which the minimum display column number does not exceed the display column number and the corresponding display mode is non-hidden into the form page to be displayed according to the sequence number, the element occupying row number and the element occupying column number of the elements in the form according to the corresponding display mode, the form attribute of the form and the element attribute of the elements in the form.
Further, after the generating module 33 loads, into the form page to be displayed, the elements whose minimum display column number does not exceed the display column number and whose corresponding display modes are non-hidden according to the serial numbers, the number of occupied element rows, and the number of occupied element columns of the elements in the form, the generating module is further specifically configured to: and displaying each element according to the display mode corresponding to each element loaded into the form page to be displayed.
Specifically, the element attribute further includes a resource number of the element;
the generating module 33 is configured to, according to the form attribute of the form and the element attribute of each element in the form, load each element having a minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element count number, and the element count number of each element in the form, and then, for an element that has been loaded into the form page to be displayed and includes an effective resource number in the element attribute, obtain an enumeration resource of the element from a cache according to the effective resource number, and load the enumeration resource into the form page to be displayed.
Further, the element attribute also includes an element code of the element;
the generating module 33 is configured to, according to the form attribute of the form and the element attribute of each element in the form, load each element having a minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element count number, and the element count number of each element in the form, and then determine whether each element loaded into the page to be displayed needs to load element data according to the scene parameter; and if necessary, acquiring the element data of each element from the business database according to the element code of each element, and loading the element data into the form page to be displayed.
Generally, before the receiving module 30 receives a form page display request sent by a browser, the receiving module is further configured to receive form attributes of the form and element attributes of each element in the form, which are sent by a form designer, where the form attributes of the form include the form number, and the element attributes of each element in the form include the form number; respectively storing the form attribute of the form and the element attribute of each element in the form in a form attribute table and a table element attribute table;
the obtaining module 31 is specifically configured to obtain, according to the form number, a form attribute including the form number from the form attribute table, and obtain, from the form element attribute table, an element attribute of each element including the form number.
In this embodiment, the specific method of the form page display processing flow of each module of the server refers to the description of the first or second embodiment of the form page display method, which is not described herein again.
According to the server provided by the embodiment, the column number of the form to be displayed is determined according to the display width of the browser in the form page display request, the form attribute and the element attribute of each element are determined according to the form number, and the form page to be displayed is generated, so that the form attribute and the element attribute of each form only need to be stored, the form page is generated in real time according to the form page display request sent by the browser and displayed, the multiplexing rate of the form of the information system is improved, the workload of the form development of the information system is reduced, and the storage resource of the server is saved.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (4)
1. A form page display method is characterized by comprising the following steps:
receiving a form page display request sent by a browser, wherein the form page display request comprises a form number and the display width of the browser;
acquiring form attributes of a form corresponding to the form number and element attributes of each element in the form according to the form number;
determining the number of display columns according to the display width of the browser;
generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form;
sending the form page to be displayed to the browser so that the browser displays the form page to be displayed;
the element attributes comprise the serial number of the element in the form, the number of rows occupied by the element and the number of columns occupied by the element;
generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form, wherein the generating comprises the following steps:
generating a form page to be displayed according to the display column number;
loading each element in the form into the form page to be displayed according to the sequence number, the number of occupied element lines and the number of occupied element columns of each element in the form according to the form attribute of the form and the element attribute of each element in the form;
the element attribute further comprises a minimum number of display columns of the element;
after the form page to be displayed is generated according to the display column number, the method further comprises the following steps:
judging the minimum display column number of each element in the form and the size of the display column number;
and loading each element in the form into the form page to be displayed according to the sequence number, the number of occupied element rows and the number of occupied element columns of each element in the form according to the form attribute of the form and the element attribute of each element in the form, wherein the loading comprises the following steps:
loading each element with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element occupying row number and the element occupying column number of each element in the form according to the form attribute of the form and the element attribute of each element in the form;
the form page display request further comprises scene parameters; the element attributes also comprise display modes of the elements in all scenes;
after the form page to be displayed is generated according to the display column number, the method further comprises the following steps:
determining a display mode corresponding to each element and the scene parameter according to the scene parameter;
and loading the elements with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of the elements in the form according to the form attribute of the form and the element attribute of each element in the form, wherein the loading comprises the following steps:
loading each element of which the minimum display column number does not exceed the display column number and of which the corresponding display mode is non-hidden into the form page to be displayed according to the corresponding display mode, the form attribute of the form and the element attribute of each element in the form, wherein the corresponding display mode is the non-hidden mode according to the serial number, the element occupying row number and the element occupying column number of each element in the form;
the element attribute further comprises a resource number of the element;
after loading the elements with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of the elements in the form according to the form attribute of the form and the element attribute of each element in the form, the method further comprises the following steps:
aiming at the elements which are loaded into the form page to be displayed and contain effective resource numbers in element attributes, acquiring enumeration resources of the elements from a cache according to the effective resource numbers, and loading the enumeration resources into the form page to be displayed;
the element attribute further comprises an element code of the element;
after loading the elements with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of the elements in the form according to the form attribute of the form and the element attribute of each element in the form, the method further comprises the following steps:
determining whether each element loaded into the page to be displayed needs to load element data or not according to the scene parameters;
and if so, acquiring the element data of each element from the business database according to the element code of each element, and loading the element data into the form page to be displayed.
2. The method according to claim 1, wherein after loading the elements, the minimum number of display columns of which is not more than the number of display columns and the corresponding display modes of which are non-hidden, into the form page to be displayed according to the serial number, the number of occupied elements, and the number of occupied elements of each element in the form, the method further comprises:
and displaying each element according to the display mode corresponding to each element loaded into the form page to be displayed.
3. The method according to claim 1, wherein before receiving the form page display request sent by the browser, the method further comprises:
receiving form attributes of the form and element attributes of elements in the form, which are sent by a form designer, wherein the form attributes of the form comprise the form number, and the element attributes of the elements in the form comprise the form number;
respectively storing the form attribute of the form and the element attribute of each element in the form in a form attribute table and a table element attribute table;
the obtaining of the form attribute of the form corresponding to the form number and the element attribute of each element in the form according to the form number includes:
and acquiring the form attribute containing the form number from the form attribute table according to the form number, and acquiring the element attribute of each element containing the form number from the form element attribute table.
4. A server, comprising:
the browser comprises a receiving module, a display module and a display module, wherein the receiving module is used for receiving a form page display request sent by a browser, and the form page display request comprises a form number and the display width of the browser;
the acquisition module is used for acquiring the form attribute of the form corresponding to the form number and the element attribute of each element in the form according to the form number;
the determining module is used for determining the number of display columns according to the display width of the browser;
the generating module is used for generating a form page to be displayed according to the display column number, the form attribute of the form and the element attribute of each element in the form;
the sending module is used for sending the form page to be displayed to the browser so that the browser can display the form page to be displayed;
the element attributes comprise the serial number of the element in the form, the number of rows occupied by the element and the number of columns occupied by the element;
the generating module is specifically configured to generate a form page to be displayed according to the number of the display columns; loading each element in the form into the form page to be displayed according to the sequence number, the number of occupied element lines and the number of occupied element columns of each element in the form according to the form attribute of the form and the element attribute of each element in the form;
wherein the element attribute further comprises a minimum number of display columns of the element;
the generating module is further specifically configured to determine the minimum display column number and the size of the display column number of each element in the form after generating the form page to be displayed according to the display column number; loading each element with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element occupying row number and the element occupying column number of each element in the form according to the form attribute of the form and the element attribute of each element in the form;
the form page display request further comprises scene parameters; the element attributes also comprise display modes of the elements in all scenes;
after the generation module generates the form page to be displayed according to the display column number, the generation module is further specifically configured to: determining a display mode corresponding to each element and the scene parameter according to the scene parameter; loading each element of which the minimum display column number does not exceed the display column number and of which the corresponding display mode is non-hidden into the form page to be displayed according to the corresponding display mode, the form attribute of the form and the element attribute of each element in the form, wherein the corresponding display mode is the non-hidden mode according to the serial number, the element occupying row number and the element occupying column number of each element in the form;
wherein the element attribute further comprises a resource number of the element;
the generating module is used for loading each element with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of the element in the form and the element number of the element in the form, and then obtaining the enumeration resource of the element from a cache according to the effective resource number and loading the enumeration resource into the form page to be displayed aiming at the element which is loaded into the form page to be displayed and contains the effective resource number in the element attribute according to the form attribute of the form and the element attribute of each element in the form;
the element attribute further comprises an element code of the element;
the generating module is used for loading each element with the minimum display column number not exceeding the display column number into the form page to be displayed according to the sequence number, the element number of rows and the element number of columns of each element in the form and determining whether each element loaded into the page to be displayed needs to load element data or not according to the scene parameters after each element with the minimum display column number not exceeding the display column number is loaded into the form page to be displayed according to the form attribute of the form and the element attribute of each element in the form; and if necessary, acquiring the element data of each element from the business database according to the element code of each element, and loading the element data into the form page to be displayed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310344168.XA CN103605502B (en) | 2013-08-08 | 2013-08-08 | Form page display method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310344168.XA CN103605502B (en) | 2013-08-08 | 2013-08-08 | Form page display method and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103605502A CN103605502A (en) | 2014-02-26 |
CN103605502B true CN103605502B (en) | 2017-08-04 |
Family
ID=50123732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310344168.XA Active CN103605502B (en) | 2013-08-08 | 2013-08-08 | Form page display method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103605502B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104932871B (en) * | 2014-03-18 | 2019-08-23 | 腾讯科技(北京)有限公司 | A kind of method and device showing multimedia messages |
CN104461514A (en) * | 2014-11-21 | 2015-03-25 | 山东中创软件工程股份有限公司 | Page layout adjustment method and device and digital terminal |
CN105096104A (en) * | 2015-07-21 | 2015-11-25 | 深圳市永兴元科技有限公司 | Form operation authority control method, apparatus and office automation system |
CN105912363A (en) * | 2016-04-11 | 2016-08-31 | 北京小米移动软件有限公司 | Module loading method and apparatus |
CN107464152B (en) * | 2016-06-03 | 2021-02-26 | 阿里巴巴集团控股有限公司 | Data processing method, client and server |
CN107656910A (en) * | 2016-07-26 | 2018-02-02 | 北京京东尚科信息技术有限公司 | Method and apparatus for generating list |
CN107562455B (en) * | 2017-08-15 | 2019-11-05 | 武汉斗鱼网络科技有限公司 | A kind of HTML list self-adaptive layout method and device |
CN108595681B (en) * | 2018-05-02 | 2020-12-18 | 恒生电子股份有限公司 | Method, device and system for displaying form |
CN110825471A (en) * | 2019-10-14 | 2020-02-21 | 紫光云(南京)数字技术有限公司 | Layout method suitable for configuration type form page |
CN113268686B (en) * | 2021-05-25 | 2022-08-26 | 山东卓创资讯股份有限公司 | Processing method for multiple browsing modes of form in information at APP (application) end |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999052032A1 (en) * | 1998-04-08 | 1999-10-14 | Geoworks Corporation | Wireless communication device with markup language based man-machine interface |
US6556217B1 (en) * | 2000-06-01 | 2003-04-29 | Nokia Corporation | System and method for content adaptation and pagination based on terminal capabilities |
CN1748216A (en) * | 2003-02-14 | 2006-03-15 | 株式会社爱可信 | Browser program for performing table-layout |
CN1938680A (en) * | 2004-03-26 | 2007-03-28 | 劲升逻辑有限公司 | A forms development platform |
CN101499099A (en) * | 2009-03-23 | 2009-08-05 | 深圳市金蝶中间件有限公司 | Method and system for WEB page layout |
CN101661508A (en) * | 2009-09-29 | 2010-03-03 | 金蝶软件(中国)有限公司 | Method for generating memu for multi-technology platform and device thereof |
CN101833586A (en) * | 2010-05-26 | 2010-09-15 | 卓望数码技术(深圳)有限公司 | HTML (Hypertext Markup Language) small screen self-adaption typesetting method and typesetting server |
CN102457528A (en) * | 2010-10-19 | 2012-05-16 | 北京邮电大学 | Method for adaptively issuing web content facing to mobile phone terminal and system thereof |
-
2013
- 2013-08-08 CN CN201310344168.XA patent/CN103605502B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999052032A1 (en) * | 1998-04-08 | 1999-10-14 | Geoworks Corporation | Wireless communication device with markup language based man-machine interface |
US6556217B1 (en) * | 2000-06-01 | 2003-04-29 | Nokia Corporation | System and method for content adaptation and pagination based on terminal capabilities |
CN1748216A (en) * | 2003-02-14 | 2006-03-15 | 株式会社爱可信 | Browser program for performing table-layout |
CN1938680A (en) * | 2004-03-26 | 2007-03-28 | 劲升逻辑有限公司 | A forms development platform |
CN101499099A (en) * | 2009-03-23 | 2009-08-05 | 深圳市金蝶中间件有限公司 | Method and system for WEB page layout |
CN101661508A (en) * | 2009-09-29 | 2010-03-03 | 金蝶软件(中国)有限公司 | Method for generating memu for multi-technology platform and device thereof |
CN101833586A (en) * | 2010-05-26 | 2010-09-15 | 卓望数码技术(深圳)有限公司 | HTML (Hypertext Markup Language) small screen self-adaption typesetting method and typesetting server |
CN102457528A (en) * | 2010-10-19 | 2012-05-16 | 北京邮电大学 | Method for adaptively issuing web content facing to mobile phone terminal and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN103605502A (en) | 2014-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103605502B (en) | Form page display method and server | |
EP3518124A1 (en) | Webpage rendering method and related device | |
CN109863527B (en) | Method and system for server-side rendering of rendered local content | |
US9710440B2 (en) | Presenting fixed format documents in reflowed format | |
EP2965229A1 (en) | Automatic alignment of a multi-dimensional layout | |
CN109359141B (en) | Visual report data display method and device | |
KR20130126610A (en) | Identifiers for style sheets | |
US9684735B2 (en) | System and method for recommending fonts | |
CN103034518A (en) | Method and browser for loading browser control tool | |
CN102662666A (en) | Method and device for creating interface menu | |
CN111427577A (en) | Code processing method and device and server | |
CN113360106A (en) | Webpage printing method and device | |
CN104077292B (en) | The storage method and equipment of info web | |
US20020111970A1 (en) | Method of displaying information in stages | |
CN113395292B (en) | Message processing method and device, electronic equipment and storage medium | |
CN112817590B (en) | Method for batch generation of page cards, storage medium and electronic equipment | |
CN115114556A (en) | Method and device for creating page | |
CN112528189B (en) | Data-based component packaging method and device, computer equipment and storage medium | |
US20200342161A1 (en) | Declarative interface for interaction design | |
CN114004209A (en) | PDF format data export method and device, electronic equipment and readable storage medium | |
CN113656033A (en) | List page generation method, apparatus, device, medium, and program product | |
CN115114280A (en) | Report generation processing method, device and equipment | |
CN112597185A (en) | Big data query method and device | |
CN109213811B (en) | Report form display method and device | |
CN110716994A (en) | Retrieval method and device supporting heterogeneous geographic data resource retrieval |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: 11th Floor, No. 2, No. 43 West North Third Ring Road, Haidian District, Beijing 100086 Patentee after: Beijing NineStar Technology Joint-Stock Co., Ltd. Address before: 100190 Beijing Haidian District Zhongguancun South No. 2 Beijing Junma International Hotel Business Building 6 floors Patentee before: Beijing NineStar Technology Joint-Stock Co., Ltd. |
|
CP02 | Change in the address of a patent holder |