【发布时间】:2017-01-03 02:15:19
【问题描述】:
我正在开发一个主明细页面,我可以在其中将新行插入明细表 (AstAssetReturnsVO) 并将其引用键设置为主表的 ID (AstAssetsVO)。在我进行 JSFF 调用之前,代码作为方法调用活动的一部分运行。
由于某种原因,当它到达下面的标记行时,我得到了 NullPointerException,我不知道为什么 getCurrentRow 返回一个空指针。我检查了文档here,它应该返回与数据控件的当前行相对应的迭代器的当前行。
请让我知道我可能做错了什么。
最好的问候,
public void assetReturnInitialization(){
getAstAssetReturnsVO().clearCache();
getAstAssetReturnsVO().executeEmptyRowSet();
Row row = getAstAssetReturnsVO().createRow();
row.setAttribute("Stat", 99);
row.setAttribute("AsrtDate", "1396/12/31");
getAstAssetsVO().executeQuery();
Row assetRow = getAstAssetsVO().getCurrentRow(); <<<<<<< ERROR OCCURS HERE
row.setAttribute("AsetId", assetRow.getAttribute("Id"));
getAstAssetsVO().getCurrentRow().setAttribute("Status", "Returned".toUpperCase());
getAstAssetReturnsVO().insertRow(row);
getAstAssetReturnsVO().setCurrentRow(row);
return ;
}
【问题讨论】:
-
检查
getAstAssetsVO()是否在那里返回null。 -
已经检查...不是这样。
标签: oracle-adf