1.比方说,一个outputNode下有一个subnode:O_Downpr_Request,O_Downpr_Request下有attribute:actionType等等。做完一系列的操作,最终从页面拿值返还给inputNode时,势必要把所有的outputNode节点值copy给inputNode,[color=blue]之前要做的操作都在output节点下做,[/color][color=brown]input只要copyCorresponding就可以[/color],[color=violet]如若要对copy以后的节点做操作,只需更改相应的tab内容就可。[/color]for example:
[color=red]Zzpeczf_I01_T02_Input input = new Zzpeczf_I01_T02_Input();
input.setAction_Type(actionType);
Zzpeczf_Tab01 req = new Zzpeczf_Tab01();
IO_Downpr_RequestElement ore = wdContext.currentO_Downpr_RequestElement();[/color]
[color=blue]if(ore.getDownpaytype().equals("QJ")||ore.getDownpaytype().equals("ZJ")){
ore.setZdydj(wdContext.currentContextElement().getFieldType());
}[/color]
[color=brown]WDCopyService.copyCorresponding(ore,req);[/color]
[color=red] input.setDownpr_Request(req);[/color][color=green] // 对form的通常做法[/color]
ISearchHelpElement el =
wdContext.nodeSearchHelp().currentSearchHelpElement();
String description = el.getDescription();
[color=violet]req.setZlsch(el.getZlsch());[/color]
List descList = DescriptionUtils.setDescription(description);
for (int i = 0; i < descList.size(); i++) {
Zzpeczf_Tab00 comment = new Zzpeczf_Tab00();
comment.setTextline(descList.get(i).toString());
input.addDownpr_Comment(comment); [color=green]// 对表操作的通常做法add[/color]
}
[color=green]// 下面是input的执行[/color]
StringBuffer buf = new StringBuffer();
try {
input.execute();
Zzpeczf_I01_T02_Output output = input.getOutput();
List list = output.getReturn();
boolean res = MessageUtils.checkReturn(list, buf);
//wdContext.nodeZzpeczf_I01_T02_Output().bind(output);
if (res) {
reporter.getMessages(buf.toString());
wdThis.wdFirePlugToMain();
} else{
reporter.error(buf.toString());
}
} catch (WDDynamicRFCExecuteException e) {
reporter.error(e.toString());
}
}
[color=red]Zzpeczf_I01_T02_Input input = new Zzpeczf_I01_T02_Input();
input.setAction_Type(actionType);
Zzpeczf_Tab01 req = new Zzpeczf_Tab01();
IO_Downpr_RequestElement ore = wdContext.currentO_Downpr_RequestElement();[/color]
[color=blue]if(ore.getDownpaytype().equals("QJ")||ore.getDownpaytype().equals("ZJ")){
ore.setZdydj(wdContext.currentContextElement().getFieldType());
}[/color]
[color=brown]WDCopyService.copyCorresponding(ore,req);[/color]
[color=red] input.setDownpr_Request(req);[/color][color=green] // 对form的通常做法[/color]
ISearchHelpElement el =
wdContext.nodeSearchHelp().currentSearchHelpElement();
String description = el.getDescription();
[color=violet]req.setZlsch(el.getZlsch());[/color]
List descList = DescriptionUtils.setDescription(description);
for (int i = 0; i < descList.size(); i++) {
Zzpeczf_Tab00 comment = new Zzpeczf_Tab00();
comment.setTextline(descList.get(i).toString());
input.addDownpr_Comment(comment); [color=green]// 对表操作的通常做法add[/color]
}
[color=green]// 下面是input的执行[/color]
StringBuffer buf = new StringBuffer();
try {
input.execute();
Zzpeczf_I01_T02_Output output = input.getOutput();
List list = output.getReturn();
boolean res = MessageUtils.checkReturn(list, buf);
//wdContext.nodeZzpeczf_I01_T02_Output().bind(output);
if (res) {
reporter.getMessages(buf.toString());
wdThis.wdFirePlugToMain();
} else{
reporter.error(buf.toString());
}
} catch (WDDynamicRFCExecuteException e) {
reporter.error(e.toString());
}
}