? ? ? java webdynpro 中对于表格有时需要复制一行同时粘贴到下一行,官方文档中没有具体说明,但是类似node节点下新增一条element道理相同,只不过用到了一个WDCopyService方法,具体实现代码如下:
?
? ??
IReceiptsNode node = wdContext.nodeReceipts(); IReceiptsElement currEle = wdContext.currentReceiptsElement(); ZReceipts ele = new ZReceipts(); IPrivateCreateView.IReceiptsElement createEle = node.createReceiptsElement(ele); //将当前行字段值copy到新建行中 WDCopyService.copyCorresponding(currEle,createEle); node.addElement(createEle);
?ZReceipts ele = new ZReceipts(); 是新建element时需要的,根据node节点不同而不同。
?
原文:http://loky.iteye.com/blog/2277254