詳細テーブル(AstAssetReturnsVO)に新しい行を挿入し、その参照キーをマスターテーブルのID(AstAssetsVO)に設定できる、 。このコードは、JSFF呼び出しを取得する直前にメソッド呼び出しアクティビティの一部として実行されます。adfでgetCurrentRowを使用しているときにnullPointerExceptionが発生しました
何らかの理由で、以下のタグ付き行に到達するとNullPointerExceptionが発生し、getCurrentRowがnullポインタを返す理由がわかりません。私は文書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()'がそこでヌルを返すかどうかを確認します。 –
既にチェック...事件ではありません。 –