modify the function loadMethodParams in plugin-new.js and
MethodParamModel in pluginModel.js
This commit is contained in:
parent
78647af647
commit
4406579532
|
@ -106,7 +106,7 @@ public class PluginActionController {
|
|||
} catch (JAXBException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
if (pluginResponseModel.isSuccess()) {
|
||||
System.out.println("pluginResponseModel has been used");
|
||||
List<String> methodList = pluginResponseModel.getMethodList();
|
||||
|
@ -141,6 +141,12 @@ public class PluginActionController {
|
|||
PluginResponseModel pluginResponseModel = (PluginResponseModel) this
|
||||
.getCommunicateWithMaster().getResponseModel(accessToken, url,
|
||||
PluginResponseModel.class, params, caller);
|
||||
|
||||
try {
|
||||
Logger.getLogger(PluginActionController.class).info(MarshalHelper.marshal(PluginResponseModel.class, pluginResponseModel));
|
||||
} catch (JAXBException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (pluginResponseModel.isSuccess()) {
|
||||
System.out.println("pluginResponseModel has been used");
|
||||
|
|
|
@ -212,7 +212,6 @@ function loadMethodParams(behaviorData, behaviorIndex) {
|
|||
for (var i = 0; i < data.length; i++) {
|
||||
methodParams.push(data[i]);
|
||||
}
|
||||
|
||||
for (var j = 0; j < methodParams.length; j++) {
|
||||
var methodParamModel = new MethodParamModel(
|
||||
methodParams[j].name,
|
||||
|
@ -220,12 +219,16 @@ function loadMethodParams(behaviorData, behaviorIndex) {
|
|||
methodParams[j].valueSeperator,
|
||||
methodParams[j].fieldSeperator,
|
||||
methodParams[j].paramType,
|
||||
methodParams[j].methodParamPropertyModelSet);
|
||||
var methodParamPropertyModelSet = methodParamModel.methodParamPropertyModelSet;
|
||||
methodParams[j].methodParamProperties);
|
||||
var methodParamProperties=new Array();
|
||||
for(var q=0;q<methodParamModel.methodParamProperties.length;q++){
|
||||
var methodParamPropertyModel=new MethodParamPropertyModel(methodParamModel.methodParamProperties[q].key,methodParamModel.methodParamProperties[q].value);
|
||||
methodParamProperties.push(methodParamPropertyModel);
|
||||
}
|
||||
var type = methodParamModel.paramType;
|
||||
var size = 0, cols = "", rows = "";
|
||||
for (var p = 0; p < methodParamPropertyModelSet.length; p++) {
|
||||
var methodParamProertyModel = methodParamPropertyModelSet[p];
|
||||
for (var p = 0; p < methodParamProperties.length; p++) {
|
||||
var methodParamProertyModel = methodParamProperties[p];
|
||||
if (methodParamProertyModel.key == "size") {
|
||||
size = methodParamProertyModel.value;
|
||||
} else if (methodParamProertyModel.key == "cols") {
|
||||
|
@ -433,7 +436,7 @@ function createTable(methodParamModel, cols, behaviorIndex) {
|
|||
|
||||
td.appendChild(text);
|
||||
th.appendChild(td);
|
||||
td.appendChild(text_content);
|
||||
td_content.appendChild(text_content);
|
||||
tr_content.appendChild(td_content);
|
||||
}
|
||||
|
||||
|
@ -447,7 +450,7 @@ function createTable(methodParamModel, cols, behaviorIndex) {
|
|||
+ "</p><div class='sample_sub_frame'>"
|
||||
+ name
|
||||
+ ":<br><button type='submit'onClick='addCol(this);'>addCol</button><button type='submit' "
|
||||
+ "onClick='removeCol(this);'>removeCol</button><br><table class='operateTableCols'>"
|
||||
+ "onClick='removeCol(this);'>removeCol</button><br><table class='"+behaviorIndex+"_operateTableCols'>"
|
||||
+ tableHead + "</table></div></div>";
|
||||
/*
|
||||
* // divNode.setAttribute("class","sample_frame");
|
||||
|
@ -465,7 +468,7 @@ function createTable(methodParamModel, cols, behaviorIndex) {
|
|||
* div.appendChild(tableNode); divNode.appendChild(p);
|
||||
* divNode.appendChild(div);
|
||||
*
|
||||
* return divNode;
|
||||
* return $(divNode).html();
|
||||
*/
|
||||
return tableHtml;
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
var ParamTypeEnum=['Field', 'MultiField', 'CheckBox', 'Table'];
|
||||
// 创建一个MethodParamModel对象
|
||||
function MethodParamModel(name, lable, valueSeperator,fieldSeperator,paramType, methodParamPropertyModelSet) {
|
||||
function MethodParamModel(name, lable, valueSeperator,fieldSeperator,paramType, methodParamProperties) {
|
||||
this.name = name;
|
||||
this.lable = lable;
|
||||
this.valueSeperator=valueSeperator;
|
||||
this.fieldSeperator=fieldSeperator;
|
||||
this.paramType=paramType;
|
||||
this.methodParamPropertyModelSet=methodParamPropertyModelSet;
|
||||
this.methodParamProperties=methodParamProperties;
|
||||
}
|
||||
//创建一个MethodParamPropertyModel对象
|
||||
function MethodParamPropertyModel(key,value){
|
||||
|
|
Loading…
Reference in New Issue