In general, the expression way at Web interface is by instrument (Wizard), allows user's " next step ", " next step " carry out, some contents of input on an interface, by clicking the Next button, enter into the another one interface, import some contents again, so repeatedly, click at last " finishing ", use this scheme user not have the overall situation to see, can only walk length by length, interactivity is poor.Second method be with the ejection dialog box of similar traditional GUI inquire about, the supplementary mode of selection, backfill, this method can not guides user be imported, the relevance between a plurality of lists unit is beyond expression inconvenient operation.
Another method is to show to allow the user fill in lot of data on the interface by a form on the Web interface, and unified at last submission the to is by the unified check of server end, the rationality of specified data.Make in this way the user when input, can't obtain relevant information, can only carry out the text input or from combobox, select a value; Text when input, can't guarantee the accuracy imported, and when selecting, if data volume is very big, selecting one from hundreds and thousands of data is the thing that bothers very much from combobox.
Summary of the invention
The technical problem to be solved in the present invention provides that a kind of the data enquire method interactivity that overcomes prior art is poor based on the correlation inquiry of webpage and the method for backfill page object, can not guarantee that the accuracy of text input and data select loaded down with trivial details shortcoming.
For solveing the technical problem, the present invention adopts following technical scheme:
A kind of based on the correlation inquiry of webpage and the method for backfill page object, may further comprise the steps:
A1 first web interface is accepted the query argument of user's input, and sets up the query argument object according to described query argument;
A2 generates second web interface by first web interface;
A3 second web interface is carried out inquiry according to described query argument object, and Query Result is presented on second web interface;
A4 second web interface is accepted the value structure return results object that the user chooses from described Query Result;
A5 first web interface is according to described return results object and backfill mapping table, the related pages object of backfill first web interface;
The property value of the described return results object of a6 shows on first web interface.
The further optimization of described technical scheme is that described query argument object is delivered to second web interface by first web interface.
The further optimization of described technical scheme is that second web interface is closed after described return results object returns first web interface.
Described query argument object is set to array, and it comprises parameter field: whether parameter name, parameter value, sign must have the Boolean type constant of parameter value.
Described return results object comprises codomain: attribute-name, property value have a plurality of attributes in the described return results object.
Described backfill mapping table comprises codomain: the form name of first web interface, return attribute name.
Use the constant parameter value in the described query argument object of symbol " # " sign.
Adopt technical scheme of the present invention, can avoid loaded down with trivial details data to select during user input data, improved the interactivity at interface and the accuracy of associated data input.
Embodiment
Below in conjunction with drawings and Examples the present invention is described in further detail:
As shown in Figure 1, the process of correlation inquiry and backfill page object is: the user imports some values (optional) on interface A, when needs are filled in an affiliated partner, carry out query function, in the interface A the inside according to the query argument object, according to interface A each the input list value, the generated query parameter generates interface B, and query argument is delivered to interface B, carry out inquiry by interface B, and show that Query Result is on the interface.The user chooses a suitable object (affiliated partner) from interface B, interface B organizes this to choose the attribute of object, and formation return results object, and turn back to interface A, simultaneously, interface B closes, and interface A is according to return results object and backfill mapping table, correlation table on the backfill interface A is unit only, and the result is shown to the user.
When the parameter on the interface A is delivered to interface B, because in general the title of the parameter of interface A and interface B is not one to one, so must shine upon, therefore define the query argument object so that the parameter on the interface A is delivered to interface B, input parameter comprises: interface B goes up the title of query argument, the value of parameter.The value of parameter has two sources: the input domain on quiescent value, the interface A (form item).Simultaneously, the partial query parameter is necessary, and other is nonessential parameter.So the entire parameter territory comprises three parts: parameter name, parameter value, must not have value not.Parameter name is a character string, it is not the value of a Boolean type that value must be arranged, have only parameter value complicated slightly, must use a special mark to be confirmed to be quiescent value or dynamic value, be that quiescent value is exactly this value, and dynamic value is used the title of form item, in the Web list, " # " be not generally as the form item title, so can use " # " to identify.Simultaneously, parameter can have a plurality of, so parameter object is designed to an array, the final argument object designs becomes:
The var query argument=[[" parameter name ", " # constant parameter value ", true],
[" parameter name 2 ", " form item title ", false] ...];
After the user imported desired value and is delivered to query window (interface B), the processing on the B of interface was professional special, and the user can define different inquiry modes, and the most qualified result is presented on the B of interface, and the user therefrom chooses a suitable value.
After the user chose suitable value, system need generate the suitable object that returns.Returning object part comprises: attribute-name, property value, returning in the object to have a plurality of attributes.
Returning definition of object is:
Var result={ " attribute-name ": " property value ",
" attribute-name 2 ": " property value 2 " };
The backfill of Query Result relates to two objects: the mapping of the rreturn value of query object, the list of current interface and Query Result attribute must have the mapping that " backfill mapping table " defines return attribute and list.
Having of this mapping: the form name of return attribute name, current interface, and support the backfill of the item of a plurality of lists.
So mapping definition is:
Var resultMaps={ " form item title ": " return attribute name " " form item title 2 ": " return attribute name 2 " };
After user's (application developer) of this function defines above-mentioned several data structures (query argument object, return results object, backfill mapping table), use Java Script,, just can realize this function than being easier to:
The first step: the user is the input inquiry parameter on first web interface;
Second step: first web interface is set up the query argument object;
The 3rd step: generate second web interface by first web interface;
The 4th step: first web interface is delivered to second web interface with described query argument object;
The 5th step: carry out inquiry by second web interface, Query Result is presented on second webpage circle;
The 6th step: the user chooses required value from described Query Result on second web interface;
The 7th step: by second web interface structure return results object;
The 8th step: described return results object returns first web interface, and second web interface is closed;
The 9th step: first web interface is according to described return results object and backfill mapping table, the related pages object of backfill first web interface;
The tenth step: the property value of described return results object shows on first web interface.