CN109376343A - The automatic generation method and electronic equipment of a kind of list under programming platform - Google Patents

The automatic generation method and electronic equipment of a kind of list under programming platform Download PDF

Info

Publication number
CN109376343A
CN109376343A CN201810962771.7A CN201810962771A CN109376343A CN 109376343 A CN109376343 A CN 109376343A CN 201810962771 A CN201810962771 A CN 201810962771A CN 109376343 A CN109376343 A CN 109376343A
Authority
CN
China
Prior art keywords
list
rule
generation method
automatic generation
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810962771.7A
Other languages
Chinese (zh)
Inventor
李天驰
孙悦
罗倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dianmao Technology Co Ltd
Original Assignee
Shenzhen Dianmao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dianmao Technology Co Ltd filed Critical Shenzhen Dianmao Technology Co Ltd
Priority to CN201810962771.7A priority Critical patent/CN109376343A/en
Publication of CN109376343A publication Critical patent/CN109376343A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

The present invention discloses the automatic generation method and electronic equipment of the list under a kind of programming platform, wherein method is comprising steps of A, according to different list demands be arranged corresponding configuration array;B, list is generated according to the configuration array;C, when submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the list, if the list is otherwise prompted not meet list rule.The present invention unifies project form item pattern layout, makes list pattern easy to maintain;A large amount of list html code and list Value Operations code are reduced, keeps code more succinct easy to maintain, improves at least 50% development efficiency;Forms pages are more flexible, be suitable for more scenes, such as dynamic list and according to Back end data generate list.

Description

The automatic generation method and electronic equipment of a kind of list under programming platform
Technical field
The present invention relates to a kind of automatic generation method of the list under field of computer technology more particularly to programming platform and Electronic equipment.
Background technique
List is for collecting different types of user's input.List is the region comprising Form Element, Form Element It is the element for allowing user's input information in list (such as textview field, drop-down list, radio box, check box etc.).List It is defined using form tags (<form>).
HTML5 possesses multiple new list input types, these new features provide better input control and verifying.Example Such as, email type for should include e-mail address input domain, url type for should include the address URL input Domain, number type is for that should include the input domain etc. of numerical value.
The list quantity of background management system is more, and list may include many different fields.
And have the html code and event binding of big section in code, and the duplicated codes such as list Value Operations, many redundancies of code And it is not convenient for safeguarding.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a kind of the automatic of the list under programming platform Generation method and electronic equipment, it is intended to solve the problems such as list is not convenient for safeguarding in the prior art, development efficiency is low.
Technical scheme is as follows:
A kind of automatic generation method of list under programming platform, wherein comprising steps of
A, corresponding configuration array is arranged according to different list demands;
B, list is generated according to the configuration array;
C, when submitting the list, whether the list for verifying submission meets list rule, if then automatically saving described List, if the list is otherwise prompted not meet list rule.
The automatic generation method of list under the programming platform, wherein before the step A further include:
Encapsulation form component in advance.
The automatic generation method of list under the programming platform, wherein after the step C further include:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
The automatic generation method of list under the programming platform, wherein encapsulate different types of form item and list Layout forms form component.
The automatic generation method of list under the programming platform, wherein in the step C, when the submission list When, whether the list for verifying submission meets list rule, if the step of then automatically saving the list specifically includes:
When submitting the list, whether the list for verifying submission meets list rule;
If the list submitted meets list rule, is saved by request interface and export the list.
A kind of electronic equipment, wherein include:
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
According to different list demands, corresponding configuration array is set;
List is generated according to the configuration array;
When submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the table It is single, if the list is otherwise prompted not meet list rule.
The electronic equipment, wherein described instruction is further adapted for being loaded by processor and being executed:
Encapsulation form component in advance.
The electronic equipment, wherein described instruction is further adapted for being loaded by processor and being executed:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
A kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer readable storage medium storing program for executing is deposited Computer executable instructions are contained, when which is executed by one or more processors, may make described one A or multiple processors execute the automatic generation method of the list under the programming platform.
A kind of computer program product, wherein non-volatile computer is readable to be deposited computer program product including being stored in Computer program on storage media, computer program include program instruction, when program instruction is executed by processor, make the place Manage the automatic generation method for the list that device executes under the programming platform.
The utility model has the advantages that the present invention unifies project form item pattern layout, make list pattern easy to maintain;Reduce a large amount of table Single html code and list Value Operations code keep code more succinct easy to maintain, improve at least 50% development efficiency;List The page is more flexible, be suitable for more scenes, such as dynamic list and according to Back end data generate list.
Detailed description of the invention
Fig. 1 is the flow chart of the automatic generation method preferred embodiment of the list under a kind of programming platform of the present invention.
Fig. 2 is the structural block diagram of a kind of electronic equipment preferred embodiment of the present invention.
Specific embodiment
The present invention provides the automatic generation method and electronic equipment of the list under a kind of programming platform, to make mesh of the invention , technical solution and effect it is clearer, clear, the present invention is described in more detail below.It should be appreciated that described herein Specific embodiment be only used to explain the present invention, be not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is the stream of the automatic generation method preferred embodiment of the list under a kind of programming platform of the present invention Cheng Tu, as shown, itself comprising steps of
S1, corresponding configuration array is arranged according to different list demands;
S2, list is generated according to the configuration array;
S3, when submitting the list, whether the list for verifying submission meets list rule, if then automatically saving described List, if the list is otherwise prompted not meet list rule.
The present invention unifies project form item pattern layout, makes list pattern easy to maintain;Reduce a large amount of list html generation Code and list Value Operations code keep code more succinct easy to maintain, improve at least 50% development efficiency;Forms pages are more Flexibly, be suitable for more scenes, such as dynamic list and according to Back end data generate list.
Specifically, before the step S1 further include:
Encapsulation form component in advance.
Form component therein is form component, and form refers to list, is the basic label in HTML, need using List submits data to backstage.
Form component has 2 big functions: 1 is verifying (display error message), and 2 be the information inputted reservation user's last time, To generate html label.
For authentication function, the example of form has is_valid () method, it can carry out school to the field of input It tests, if all fields are all legal, True will be returned, the data of list are put into cleaned_data attribute.
For saving function, if what is carried out is to submit operation, an object is instantiated again, but not with get request With form_obj is that have value.
When encapsulating form component, the incoming attribute of form component is defined, which includes form item array and form layout Object, the configuration of each form item includes: 1, form item title;2, form item key value;3, the component of the list is defaulted as defeated Enter frame;4, option includes default value etc.;5, form validation rule.Finally traverse form item array.
Attribute further include: method attribute, action attribute, Enctype attribute, Target attribute, Autocomplete Attribute etc..
Method attribute: setting value can be post (uploading data to server) and get (obtaining data from server), Get mode can be applied directly to after URL when sending data, and post mode is retransmited after encapsulating data, string length There is no limit Information Security is relatively high.
Action attribute: list would generally be used cooperatively with database programs such as asp or php, be used to refer to the mesh sent Ground.
Enctype attribute: entype=" multipart/form-data ": when being used for upper transmitting file.Entype =" text/plain ": e-mail is sent by form attributes.
Target attribute: specified which window be submitted to, e.g., blank refers to that opening new window, self refer to current window Mouthful, parent refers to that upper one layer of window, top refer to the window of top layer.
Autocomplete attribute: for being arranged whether input component uses auto-complete function, there are on and two kinds of off.
Novalidate: whether list is verified when sending list for being arranged.
Input module:
Text box text:
<input
10 " maxlength=" 10 of type=" text " name=" username " value=" guest " size=" >
Type=" text ": input mode is text box
The title of name=" username " text box
Value=" guest " default value
10 " TextField.length of size="
The number of words of the limitation text box of maxlength=" 10
Autofocus: after referring to load webpage, this text box is moved the cursor to automatically
Multiline text frame textarea:
<20 " rows=" of textarea name=" name " cols=", 4 " wrap=" virtual ">
The name of name=" name " text box
The width of 20 " text box of cols="
The line number of 4 " text box of rows="
Whether wrap=" virtual " enters a new line, and hard is line feed, and soft is not enter a new line
Password domain password:
<input type=" password " name=" 2 " size=" 20 ">
Date field date:
<input type=" datetime " name=" " value=" " placeholder=" ">
Numeric field number:
<input type=" number " name=" 4 " value=" 0 ">
Color color:
<input type=" color " name=" " value=" ">
Range domain range:
<input type=" range " name=" " value=" " placeholder=" ">
Search domain search:
<input type=" search " name=" " value=" lookup " placeholder=" ">
List element:
Select component:
<select size=" 1 " name=" 2 ">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
</select>
Size indicates display how many row.Multiple option can be with multiselect.
Datalist component:
<input list=" 1 ">
<datalist id=" 1 ">necessary specified id
<option value="1111"></option>
<option value="2222"></option>
<option value="3333"></option>
<option value="4444"></option>
<option value="5555"></option>
</datalist>prompt user's input
Select component:
Radio button radio:
<input type=" radio " name=" 1 " value=" female " checked>female
<input type=" radio " name=" 1 " value=" male ">male
The title of Name=" " component, the identical radio component of name attribute value can be considered as same group of component.
The value of Value=" " radio component, when list is submitted, the value value of selected radio component will It is sent.
Checked: this has been selected in expression
Check box checkbox:
The title of Name=" " component, the identical radio component of name attribute value can be considered as same group of component.
The value of Value=" " radio component, when list is submitted, the value value of selected radio component will It is sent.
Checked: this has been selected in expression.
It is to form form component by encapsulating different types of form item and form layout in the present invention.
I.e. form component has unified form item and form layout.By unified form item and form layout, table can be allowed Single pattern is easy to maintain.And complicated form item transmitting file as above etc., it is realized using configuration Custom component mode.
Specifically, the present invention is encapsulation high-order component, can be the case where not modifying former component code using high-order component Under, modify the behavior or enhancing function of former component.
For example, list has 3 fields: name, age, gender, and each field has the verification of own to advise Then with corresponding error message.
Such as need to do the function of an addition books, the list of books has tri- fields of name, price, owner_id, Equally, each field has the verification rule and error message of oneself.
When needing to write a list, a place is required to save the value (state) of form fields, is had One function handles the update and verification (handleValueChange) of list value, these contents can use high-order component To encapsulate.
And the difference added between the list of user and the list for adding books is only form fields and field Default value, verification rule and error message.
In the step S1, corresponding configuration array is arranged according to different list demands.
Configuration array is the various settings to form attributes, and the class of the content inputted in list is determined according to configuration array Type.Specifically corresponding configuration array can be write according to different forms pages demands.
In the step S2, list is generated according to the configuration array.Configuration array, that is, the configuration file, passes through institute List can be quickly generated by stating configuration file.That is, the list array data of configuration is passed to form component.
In the step S3, when submitting the list, whether the list for verifying submission meets list rule.
That is list generated in step S2 might not meet list rule, so needing in submission form to giving birth to At list verified.
Specifically, whether the list for verifying submission meets list rule, if met, automatically saves the list. If do not met, prompted, that is, the list is prompted not meet list rule.
Further, in the step S3, when submitting the list, whether the list for verifying submission meets list rule, If the step of then automatically saving the list specifically includes:
When submitting the list, whether the list for verifying submission meets list rule;
If the list submitted meets list rule, is saved by request interface and export the list.
That is, being saved and being exported by request interface if the list submitted meets list rule.
Further, after the step S3 further include:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
This step be editor do not meet proof rule list list value, and transfer to the form component of aforementioned encapsulation come into Row processing, makes list value meet proof rule.
Specifically, when list does not meet proof rule, then update list, and by list value transfer to form component into Row processing, without manually adding response events for each form item and changing form item value function.
The present invention can reduce a large amount of list html code and list Value Operations code, and code is made more succinctly to be easy to tie up Shield improves at least 50% development efficiency.
And forms pages of the present invention are more flexible, are suitable for more scenes, such as dynamic list and raw according to Back end data At list.
Referring to Fig. 2, the present invention also provides a kind of electronic equipment 10 comprising:
Processor 110 is adapted for carrying out each instruction, and
Equipment 120 is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
According to different list demands, corresponding configuration array is set;
List is generated according to the configuration array;
When submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the table It is single, if the list is otherwise prompted not meet list rule.
The processor 110 can for general processor, digital signal processor (DSP), specific integrated circuit (ASIC), Field programmable gate array (FPGA), single-chip microcontroller, ARM (Acorn RISC Machine) or other programmable logic device are divided Any combination of vertical door or transistor logic, discrete hardware component or these components.In addition, processor can also be any Conventional processors, microprocessor or state machine.Processor also may be implemented as calculating the combination of equipment, for example, DSP and Wei Chu Manage combination, multi-microprocessor, one or more microprocessors combination DSP core, any other this configuration of device.
It stores equipment 120 and is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software Program, non-volatile computer executable program and module, such as the corresponding journey of automatic generation method in the embodiment of the present invention Sequence instruction.Processor is stored in non-volatile software program, instruction and unit in storage equipment by operation, thereby executing The various function application and data processing of automatic generation method, i.e. automatic generation method in realization above method embodiment.
Further, described instruction is further adapted for being loaded by processor and executes following steps:
Encapsulation form component in advance.
Further, described instruction is further adapted for being loaded by processor and executes following steps:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
Further, different types of form item and form layout are encapsulated, form component is formed.
It has been described in detail in the method for particular technique details in front about above-mentioned electronic equipment 10, so it will not be repeated.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, the non-volatile computer readable storage Media storage has computer executable instructions, when which is executed by one or more processors, may make One or more of processors execute the automatic generation method of the list under the programming platform.
The present invention also provides a kind of computer program product, computer program product includes being stored in non-volatile computer Computer program on readable storage medium storing program for executing, computer program include program instruction, when program instruction is executed by processor, are made The processor executes the automatic generation method of the list under the programming platform.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. a kind of automatic generation method of the list under programming platform, which is characterized in that comprising steps of
A, corresponding configuration array is arranged according to different list demands;
B, list is generated according to the configuration array;
C, when submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the list, If the list is otherwise prompted not meet list rule.
2. the automatic generation method of the list under programming platform according to claim 1, which is characterized in that the step A Before further include:
Encapsulation form component in advance.
3. the automatic generation method of the list under programming platform according to claim 2, which is characterized in that the step C Later further include:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
4. the automatic generation method of the list under programming platform according to claim 2, which is characterized in that encapsulation inhomogeneity The form item of type and form layout form form component.
5. the automatic generation method of the list under programming platform according to claim 1, which is characterized in that the step C In, when submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the step of the list Suddenly it specifically includes:
When submitting the list, whether the list for verifying submission meets list rule;
If the list submitted meets list rule, is saved by request interface and export the list.
6. a kind of electronic equipment characterized by comprising
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
According to different list demands, corresponding configuration array is set;
List is generated according to the configuration array;
When submitting the list, whether the list for verifying submission meets list rule, if then automatically saving the list, if Otherwise the list is prompted not meet list rule.
7. electronic equipment according to claim 6, which is characterized in that described instruction is further adapted for being loaded by processor and being held Row:
Encapsulation form component in advance.
8. electronic equipment according to claim 7, which is characterized in that described instruction is further adapted for being loaded by processor and being held Row:
The form component of encapsulation is transferred to handle the list for not meeting proof rule.
9. a kind of non-volatile computer readable storage medium storing program for executing, which is characterized in that the non-volatile computer readable storage medium Matter is stored with computer executable instructions, when which is executed by one or more processors, may make institute State the automatic generation method for the list that one or more processors perform claim requires under the described in any item programming platforms of 1-5.
10. a kind of computer program product, which is characterized in that computer program product can including being stored in non-volatile computer The computer program on storage medium is read, computer program includes program instruction, when program instruction is executed by processor, makes institute State the automatic generation method for the list that processor perform claim requires under the described in any item programming platforms of 1-5.
CN201810962771.7A 2018-08-22 2018-08-22 The automatic generation method and electronic equipment of a kind of list under programming platform Pending CN109376343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810962771.7A CN109376343A (en) 2018-08-22 2018-08-22 The automatic generation method and electronic equipment of a kind of list under programming platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810962771.7A CN109376343A (en) 2018-08-22 2018-08-22 The automatic generation method and electronic equipment of a kind of list under programming platform

Publications (1)

Publication Number Publication Date
CN109376343A true CN109376343A (en) 2019-02-22

Family

ID=65403924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810962771.7A Pending CN109376343A (en) 2018-08-22 2018-08-22 The automatic generation method and electronic equipment of a kind of list under programming platform

Country Status (1)

Country Link
CN (1) CN109376343A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427949A (en) * 2019-07-31 2019-11-08 中国工商银行股份有限公司 The method, apparatus of list verification calculates equipment and medium
CN113051012A (en) * 2021-03-18 2021-06-29 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204881A1 (en) * 2008-02-08 2009-08-13 M/S. Scmooth (India) Private Limited Method and system for knowledge-based filling and verification of complex forms
CN102413162A (en) * 2011-07-29 2012-04-11 互动在线(北京)科技有限公司 Website front-end verification method and device
CN103984547A (en) * 2014-05-14 2014-08-13 上海上讯信息技术股份有限公司 Form validation method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204881A1 (en) * 2008-02-08 2009-08-13 M/S. Scmooth (India) Private Limited Method and system for knowledge-based filling and verification of complex forms
CN102413162A (en) * 2011-07-29 2012-04-11 互动在线(北京)科技有限公司 Website front-end verification method and device
CN103984547A (en) * 2014-05-14 2014-08-13 上海上讯信息技术股份有限公司 Form validation method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427949A (en) * 2019-07-31 2019-11-08 中国工商银行股份有限公司 The method, apparatus of list verification calculates equipment and medium
CN113051012A (en) * 2021-03-18 2021-06-29 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view
CN113051012B (en) * 2021-03-18 2022-12-02 平安普惠企业管理有限公司 Data loading method, device, equipment and medium based on list view

Similar Documents

Publication Publication Date Title
US9244900B2 (en) Template based website development and management
US20150293764A1 (en) Method and system to compose and execute business rules
US9052845B2 (en) Unified interface for meta model checking, modifying, and reporting
CN110020307A (en) A kind of method for drafting and device of client&#39;s end-view
WO2019148196A1 (en) Single-page web application builder system and method based on a finite-state machine
US9563450B1 (en) Expression based hierarchical mechanism for HTML form data validation
CN102346785A (en) Method and device for directly self-defining field of database
CN106485390A (en) The generation method of examination & approval stream and device
CN108363566A (en) File configuration method, intelligent terminal and storage medium in a kind of project development process
US20150363079A1 (en) Data-driven schema for describing and executing management tasks in a graphical user interface
CN109657177A (en) The generation method of the page, device, storage medium and computer equipment after upgrading
CN107656729A (en) Updating device, method and the computer-readable recording medium of List View
US20120233186A1 (en) Exposing and using metadata and meta-metadata
US20130080338A1 (en) Ideas promoted to projects and synchronization of status information
CN109376343A (en) The automatic generation method and electronic equipment of a kind of list under programming platform
CN101201918A (en) Method and system for automatically configuring an information system
Li et al. Siphon extraction for deadlock control in flexible manufacturing systems by using Petri nets
US8799256B2 (en) Incorporated web page content
Di Pierro web2py
CN102999580B (en) Password input frame element processing method and browser
CN109063059A (en) User behaviors log processing method, device and electronic equipment
CN112579149B (en) Method, device, equipment and storage medium for generating model training program mirror image
Cosentino Advanced PHP for Web professionals
CN112241267A (en) Configuration tool and method for realizing form page development by using same
CN108228708B (en) Big data ETL system and scheduling method thereof

Legal Events

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

Application publication date: 20190222