CN106843836B - Advanced control implementation method, device and system of dynamic form - Google Patents

Advanced control implementation method, device and system of dynamic form Download PDF

Info

Publication number
CN106843836B
CN106843836B CN201611191396.8A CN201611191396A CN106843836B CN 106843836 B CN106843836 B CN 106843836B CN 201611191396 A CN201611191396 A CN 201611191396A CN 106843836 B CN106843836 B CN 106843836B
Authority
CN
China
Prior art keywords
script
input
unit
dynamic
legal
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
Application number
CN201611191396.8A
Other languages
Chinese (zh)
Other versions
CN106843836A (en
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.)
Beijing Zhiyuan Internet Software Ltd By Share Ltd
Original Assignee
Beijing Zhiyuan Internet Software Ltd By Share 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 Beijing Zhiyuan Internet Software Ltd By Share Ltd filed Critical Beijing Zhiyuan Internet Software Ltd By Share Ltd
Priority to CN201611191396.8A priority Critical patent/CN106843836B/en
Publication of CN106843836A publication Critical patent/CN106843836A/en
Application granted granted Critical
Publication of CN106843836B publication Critical patent/CN106843836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The invention provides a method, a device and a system for realizing advanced controls of a dynamic form, which realize an entry allowing a user to define a calculation formula and allow the user to input script codes of different script types, so that when the user fills in the form, the user can call an actuator corresponding to the script type to execute the script and backfill the script operation result into the form, thereby flexibly realizing the requirement of the user on applying the advanced controls on the dynamic form.

Description

Advanced control implementation method, device and system of dynamic form
Technical Field
The invention relates to the technical field of form generation, in particular to a method, a device and a system for realizing advanced controls of a dynamic form.
Background
Due to the constraints of the html standard, such as constraints on input length or constraints on input types (including data constraints, letter constraints, Chinese character constraints and the like), the traditional form can only realize simple input constraints and use purposes, but flexible requirements of users on dynamic forms cannot be met.
Disclosure of Invention
The invention aims to provide a method, a device and a system for realizing advanced controls of a dynamic form, and aims to solve the problem that the traditional form is restricted by html standard and cannot meet the requirements of users.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a method for implementing advanced controls of a dynamic form comprises the following steps:
a script storage step:
setting a data structure for storing scripts; fields in the data structure include script type;
receiving a script input into the dynamic form by a user as an input script;
calling an actuator corresponding to the script type to execute the input script according to the script type, verifying the legality of the input script and acquiring a verification result; the verification result comprises legal and illegal;
when the verification result is legal, storing the input script as a legal script;
the script executing step:
writing html to realize input control;
realizing ajax according to the input control, and acquiring a script execution request;
calling the server side to judge whether the script execution request is configured with the dynamic script or not, and acquiring a judgment result; the judgment result comprises configured and unconfigured;
when the judgment result is configured, calling an actuator corresponding to the script type to execute the legal script according to the script type, and acquiring a script execution result; the script execution result comprises a return structure;
and adjusting the page data of the dynamic form through javascript according to the return structure.
On the basis of the above embodiment, further, the fields in the data structure further include html control identification and script content.
On the basis of any of the above embodiments, further, the script types include Groovy, Python, and Ruby.
An advanced control implementation apparatus for a dynamic form, comprising:
the script storage module includes:
the setting unit is used for setting a data structure stored by the script; fields in the data structure include script type;
the input unit is used for receiving a script input to the dynamic form by a user as an input script;
the verification unit is used for calling an actuator corresponding to the script type to execute the input script according to the script type, verifying the legality of the input script and acquiring a verification result; the verification result comprises legal and illegal;
the storage unit is used for storing the input script as a legal script when the verification result is legal;
the script execution module comprises:
the compiling unit is used for compiling html and realizing input control;
the request unit is used for realizing ajax according to the input control and acquiring a script execution request;
the judging unit is used for calling the server side to judge whether the script execution request is configured with the dynamic script or not and acquiring a judging result; the judgment result comprises configured and unconfigured;
the execution unit is used for calling an actuator corresponding to the script type to execute the legal script according to the script type to acquire a script execution result when the judgment result is configured; the script execution result comprises a return structure;
and the adjusting unit is used for adjusting the page data of the dynamic form through javascript according to the return structure.
On the basis of the above embodiment, further, the fields in the data structure further include html control identification and script content.
On the basis of any of the above embodiments, further, the script types include Groovy, Python, and Ruby.
An advanced control implementation system for dynamic forms, comprising:
the advanced control realizing device of any dynamic form;
the server is used for being called by the judging unit, judging whether the script execution request is configured with the dynamic script or not, acquiring a judging result and sending the judging result to the judging unit;
the executor is called by the verification unit, executes the input script, verifies the legality of the input script, acquires a verification result and sends the verification result to the verification unit; and the legal script is called by the execution unit, the legal script is executed, the script execution result is obtained, and the script execution result is sent to the execution unit.
On the basis of the above embodiment, further, the method further includes:
and the memory is used for storing the legal script sent by the storage unit.
On the basis of any of the above embodiments, further, the fields in the data structure further include html control identification and script content.
On the basis of any of the above embodiments, further, the script types include Groovy, Python, and Ruby.
The invention has the beneficial effects that:
the invention provides a method, a device and a system for realizing advanced controls of a dynamic form, which realize an entry allowing a user to define a calculation formula and allow the user to input script codes of different script types, so that when the user fills in the form, the user can call an actuator corresponding to the script type to execute the script and backfill the script operation result into the form, thereby flexibly realizing the requirement of the user on applying the advanced controls on the dynamic form.
Drawings
The invention is further illustrated with reference to the following figures and examples.
FIG. 1 is a flow chart of a method for implementing advanced controls of a dynamic form according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an advanced control implementation apparatus for a dynamic form according to an embodiment of the present invention;
fig. 3 shows a structural diagram of a high-level control implementation system of a dynamic form according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Detailed description of the preferred embodiment
As shown in fig. 1 and fig. 2, an embodiment of the present invention provides a method for implementing advanced controls of a dynamic form, including:
script storage step S101:
step S1011, setting a data structure stored by the script; fields in the data structure include script type;
step S1012, receiving a script input to the dynamic form by the user as an input script;
step S1013, according to the script type, calling an actuator corresponding to the script type to execute the input script, checking the legality of the input script, and obtaining a checking result; the verification result comprises legal and illegal;
step S1014, when the verification result is legal, storing the input script as a legal script;
script execution step S102:
step S1021, compiling html to realize input control;
step S1022, according to the input control, ajax is realized, and a script execution request is obtained;
step S1023, a server end is called to judge whether the script execution request is configured with a dynamic script or not, and a judgment result is obtained; the judgment result comprises configured and unconfigured;
step S1024, when the judgment result is configured, calling an actuator corresponding to the script type to execute the legal script according to the script type to obtain a script execution result; the script execution result comprises a return structure;
and S1025, adjusting the page data of the dynamic form through javascript according to the return structure.
The embodiment of the invention realizes an entry allowing a user to define a calculation formula and allows the user to input script codes of different script types, so that when the user fills in the form, an actuator corresponding to the script type can be called to execute the script, and the script operation result is filled back into the form, thereby flexibly realizing the requirement of the user on applying advanced controls on the dynamic form.
The field in the data structure is not limited in the embodiment of the present invention, and preferably, the field in the data structure may further include an html control identifier and script content.
The script type is not limited in the embodiment of the present invention, and preferably, the script type includes Groovy, Python, and Ruby. When the script type is Groovy, the executor called in step S1013 and step S1024 is a Groovy executor.
Detailed description of the invention
As shown in fig. 2, an embodiment of the present invention provides an advanced control implementation apparatus for a dynamic form, including:
the script storage module 201 includes:
a setting unit 2011, configured to set a data structure of the script storage; fields in the data structure include script type;
an input unit 2012 for receiving a script input to the dynamic form by the user as an input script;
a checking unit 2013, configured to invoke, according to the script type, an actuator corresponding to the script type to execute the input script, check the validity of the input script, and obtain a checking result; the verification result comprises legal and illegal;
a saving unit 2014, configured to save the input script as a legal script when the verification result is legal;
the script execution module 202 includes:
the writing unit 2021 is used for writing html to realize input control;
the request unit 2022 is configured to implement ajax according to the input control, and obtain a script execution request;
the judging unit 2023 is configured to invoke the server to judge whether the script execution request configures a dynamic script, and obtain a judgment result; the judgment result comprises configured and unconfigured;
the execution unit 2024 is configured to, when the determination result is configured, invoke an actuator corresponding to the script type to execute the legal script according to the script type, and obtain a script execution result; the script execution result comprises a return structure;
an adjusting unit 2025, configured to adjust the page data of the dynamic form through javascript according to the return structure.
The field in the data structure is not limited in the embodiment of the present invention, and preferably, the field in the data structure may further include an html control identifier and script content.
The script type is not limited in the embodiment of the present invention, and preferably, the script type includes Groovy, Python, and Ruby. When the script type is Groovy, the executor called in step S1013 and step S1024 is a Groovy executor.
Detailed description of the preferred embodiment
As shown in fig. 3, an embodiment of the present invention provides a system for implementing advanced controls of a dynamic form, including:
the advanced control implementation apparatus 301 of any dynamic form in the second embodiment;
the server 302 is called by the judging unit, judges whether the script execution request is configured with a dynamic script, acquires a judgment result and sends the judgment result to the judging unit;
the executor 303 is called by the verification unit, executes the input script, verifies the validity of the input script, obtains a verification result, and sends the verification result to the verification unit; and the legal script is called by the execution unit, the legal script is executed, the script execution result is obtained, and the script execution result is sent to the execution unit.
Preferably, the embodiment of the present invention may further include a memory 304, configured to store the legal script sent by the saving unit. The method has the advantages that the legal script is convenient to store, and unnecessary loss caused by loss of the legal script is prevented.
The field in the data structure is not limited in the embodiment of the present invention, and preferably, the field in the data structure may further include an html control identifier and script content.
The script type is not limited in the embodiment of the present invention, and preferably, the script type includes Groovy, Python, and Ruby. When the script type is Groovy, the executor called in step S1013 and step S1024 is a Groovy executor.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. Although the present invention has been described to a certain extent, it is apparent that appropriate changes in the respective conditions may be made without departing from the spirit and scope of the present invention. It is to be understood that the invention is not limited to the described embodiments, but is to be accorded the scope consistent with the claims, including equivalents of each element described.

Claims (10)

1. A method for implementing advanced controls of dynamic forms is characterized by comprising the following steps:
a script storage step:
setting a data structure for storing scripts; fields in the data structure include script type;
receiving a script input into the dynamic form by a user as an input script;
calling an actuator corresponding to the script type to execute the input script according to the script type, verifying the legality of the input script and acquiring a verification result; the verification result comprises legal and illegal;
when the verification result is legal, storing the input script as a legal script;
the script executing step:
writing an html page to realize an input control;
realizing ajax according to the input control, and acquiring a script execution request;
calling the server side to judge whether the script execution request is configured with the dynamic script or not, and acquiring a judgment result; the judgment result comprises configured and unconfigured;
when the judgment result is configured, calling an actuator corresponding to the script type to execute the legal script according to the script type, and acquiring a script execution result; the script execution result comprises a return structure;
and adjusting the page data of the dynamic form through javascript according to the return structure.
2. The method of claim 1, wherein the fields in the data structure further comprise html control id and script content.
3. The method for implementing advanced controls for dynamic forms of claim 1 or 2 wherein the script types include Groovy, Python, and Ruby.
4. An advanced control implementation apparatus for a dynamic form, comprising:
the script storage module includes:
the setting unit is used for setting a data structure stored by the script; fields in the data structure include script type;
the input unit is used for receiving a script input to the dynamic form by a user as an input script;
the verification unit is used for calling an actuator corresponding to the script type to execute the input script according to the script type, verifying the legality of the input script and acquiring a verification result; the verification result comprises legal and illegal;
the storage unit is used for storing the input script as a legal script when the verification result is legal;
the script execution module comprises:
the compiling unit is used for compiling the html page and realizing the input control;
the request unit is used for realizing ajax according to the input control and acquiring a script execution request;
the judging unit is used for calling the server side to judge whether the script execution request is configured with the dynamic script or not and acquiring a judging result; the judgment result comprises configured and unconfigured;
the execution unit is used for calling an actuator corresponding to the script type to execute the legal script according to the script type to acquire a script execution result when the judgment result is configured; the script execution result comprises a return structure;
and the adjusting unit is used for adjusting the page data of the dynamic form through javascript according to the return structure.
5. The advanced control implementation apparatus for dynamic forms of claim 4 wherein the fields in the data structure further comprise html control identification and script content.
6. The advanced control implementation apparatus for dynamic forms of claim 4 or 5, wherein the script types comprise Groovy, Python, and Ruby.
7. An advanced control implementation system for a dynamic form, comprising:
the advanced control implementation of a dynamic form of any of claims 4-6;
the server is used for being called by the judging unit, judging whether the script execution request is configured with the dynamic script or not, acquiring a judging result and sending the judging result to the judging unit;
the executor is called by the verification unit, executes the input script, verifies the legality of the input script, acquires a verification result and sends the verification result to the verification unit; and the legal script is called by the execution unit, the legal script is executed, the script execution result is obtained, and the script execution result is sent to the execution unit.
8. The advanced control implementation system of dynamic forms of claim 7, further comprising:
and the memory is used for storing the legal script sent by the storage unit.
9. The advanced control implementation system of dynamic forms of claim 7 or 8 wherein the fields in the data structure further include html control identification and script content.
10. The advanced control implementation system of dynamic forms of claim 7 or 8 wherein the script types include Groovy, Python, and Ruby.
CN201611191396.8A 2016-12-21 2016-12-21 Advanced control implementation method, device and system of dynamic form Active CN106843836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611191396.8A CN106843836B (en) 2016-12-21 2016-12-21 Advanced control implementation method, device and system of dynamic form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611191396.8A CN106843836B (en) 2016-12-21 2016-12-21 Advanced control implementation method, device and system of dynamic form

Publications (2)

Publication Number Publication Date
CN106843836A CN106843836A (en) 2017-06-13
CN106843836B true CN106843836B (en) 2020-02-07

Family

ID=59135138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611191396.8A Active CN106843836B (en) 2016-12-21 2016-12-21 Advanced control implementation method, device and system of dynamic form

Country Status (1)

Country Link
CN (1) CN106843836B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977243A (en) * 2017-11-27 2018-05-01 海尔优家智能科技(北京)有限公司 A kind of third party's interface call method and device
CN109375914B (en) * 2018-09-27 2021-04-30 中国气象科学研究院 Information remote interaction method and system
CN111897470A (en) * 2020-07-06 2020-11-06 上海泛微网络科技股份有限公司 Method and device for dynamically setting form calculation logic

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013039593A2 (en) * 2011-09-15 2013-03-21 Citicorp Development Center, Inc. Methods and systems for dynamically generating and reusing dynamic web content
CN105335153A (en) * 2015-10-12 2016-02-17 杭州古北电子科技有限公司 Dynamic script automatic-generating method
CN106796525A (en) * 2015-02-23 2017-05-31 华为技术有限公司 On-demand loading dynamic script language codes are used with reducing internal memory

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924845B2 (en) * 2008-02-20 2014-12-30 Lsi Corporation Web application code decoupling and user interaction performance
CN103377038B (en) * 2012-04-11 2016-12-28 怡丰联合(北京)科技有限责任公司 The description of customizing form and list analytic method
CN104461519B (en) * 2014-11-23 2018-01-09 国云科技股份有限公司 A kind of flow chart dynamic generation and the method for control of authority
CN105373523A (en) * 2015-10-14 2016-03-02 浪潮软件集团有限公司 Workflow solution method based on user-defined form and Activiti
CN105573765A (en) * 2015-12-29 2016-05-11 武汉传神信息技术有限公司 Implementation method for dynamic form, client and server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013039593A2 (en) * 2011-09-15 2013-03-21 Citicorp Development Center, Inc. Methods and systems for dynamically generating and reusing dynamic web content
CN106796525A (en) * 2015-02-23 2017-05-31 华为技术有限公司 On-demand loading dynamic script language codes are used with reducing internal memory
CN105335153A (en) * 2015-10-12 2016-02-17 杭州古北电子科技有限公司 Dynamic script automatic-generating method

Also Published As

Publication number Publication date
CN106843836A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106843836B (en) Advanced control implementation method, device and system of dynamic form
CN108306877B (en) NODE JS-based user identity information verification method and device and storage medium
JP2017511542A5 (en)
US20170185678A1 (en) Crawler system and method
CN110784450A (en) Single sign-on method and device based on browser
CN107508720B (en) Automatic testing method and device
JP2015167014A (en) Method, apparatus, sever and system for implementing web application
US20130339485A1 (en) Multi-Threaded Asynchronous Download of a Set of Script files Used in a Web Application
WO2019019646A1 (en) Method and apparatus for platform to login to website, computer device, and readable storage medium
US9219800B2 (en) Method and system for a web server transmitting a response to an access request
CN104301443A (en) Method and system for calling end capacity ports on web page
CN107450928B (en) Hybrid development method based on cache technology
CN103761474B (en) A kind of method and device for monitoring the execution time of a monitoring method
WO2019127904A1 (en) Application program running method, apparatus, computer device and storage medium
US9264507B2 (en) Cross domain communication channel
WO2016082696A1 (en) Ua recognition method and device
CN105991518B (en) Network access verifying method and device
EP2821931A3 (en) Verification application, method, electronic device and computer program
CN104767614A (en) Information authentication method and device
CN107943690A (en) A kind of platform and method for disposing compatibility test environment
IL267551B2 (en) Information transmission method, network device and terminal device
CN106843975B (en) Method and device for extending HTML5 application function
CN106161082A (en) The method to set up of server UUID, system and baseboard management controller
US20140324368A1 (en) Test method, test system and electronic device employing the same
CN104104969B (en) Video interception method and device

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
GR01 Patent grant
GR01 Patent grant