/** * @author GJ */ urule.MethodAction=function(rule){ this.parameters=[]; this.rule=rule; this.init(); }; urule.MethodAction.prototype.init=function(){ this.container=$(""); this.nameContainer=$(""); this.container.append(this.nameContainer); this.nameContainer.css({ "color":"darkblue" }); }; urule.MethodAction.prototype.initData=function(data){ if(!data){ return; } this.bean=data["beanId"]; this.name=data["beanLabel"]; this.method=data["methodName"]; this.methodLabel=data["methodLabel"]; var parameters=data["parameters"]; this.parameterCount=0; if(parameters){ this.parameterCount=parameters.length; } if(this.parameterCount===0){ URule.setDomContent(this.nameContainer,this.methodLabel); var parameterLabel=$("(无参数)"); this.container.append(parameterLabel); }else{ URule.setDomContent(this.nameContainer,this.methodLabel+"("); } if(this.parameterCount==0){ return; } for(var i=0;i0){ var comma=$(";"); this.container.append(comma); } if(this.parameterCount>0){ var seqLabel=$(" "+p["name"]+":"); this.container.append(seqLabel); } var parameter=new urule.MethodParameter(this.rule); this.parameters.push(parameter); this.container.append(parameter.getContainer()); parameter.initData(p); } this.container.append(")"); }; urule.MethodAction.prototype.toXml=function(){ if(!this.name || this.name==""){ throw "请选择要执行的方法!"; } var xml=""; for(var i=0;i