この場合、jDev を使用して DB に null/空の値を挿入し、アプリケーション モジュールを使用します。
これは bean のコードです:
public void insertM_LLOYDAGENT(ActionEvent actionEvent) {
// Add event code here...
UnderwritingAppModuleImpl am = (UnderwritingAppModuleImpl)ADFUtil.getApplicationModule("UnderwritingAppModuleDataControl");
try{
address = noteAddress.getValue().toString();
city = noteCity.getValue().toString();
contact = noteContact.getValue().toString();
country = noteCountry.getValue().toString();
name = noteName.getValue().toString();
type = typeOfLloyd.getValue().toString();
am.insertMLLOYDAGENT(address, city, contact, country, name, type);
}
catch(Exception ex){
am.insertMLLOYDAGENT(address, city, contact, country, name, type);
}
}
および AppModuleImpl のコード:
public void insertMLLOYDAGENT(String noteAddress, String noteCity, String noteContact, String noteCountry, String noteName, String noteType){
try {
System.out.println("tes ------- address = "+noteAddress+" city = "+noteCity+" contact = "+noteContact+" country = "+noteCountry+" name = "+noteName+" type = "+noteType);
MLloydagentViewImpl vo=(MLloydagentViewImpl)getMLloydagentView1();
MLloydagentViewRowImpl row=(MLloydagentViewRowImpl)vo.getCurrentRow();
row.setLloydName(noteName);
row.setLloydAddress(noteAddress);
row.setLloydCity(noteCity);
row.setLloydContact(noteContact);
row.setLloydCountry(noteCountry);
row.setTypeOfLloyd(noteType);
row.getDBTransaction().commit();
vo.executeQuery();
} catch (JboException ex) {
throw ex;
}
}
新しい行がコミットされないのはなぜですか? 私を助けてください。ありがとう !