0
在這種情況下,我會插入空/空值到我的分貝的jdev和使用的應用程序模塊..爲什麼我不能在jDeveloper adf中插入空值?
這是豆代碼:
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;
}
}
爲什麼新行沒有提交? 請幫助我。 謝謝!
感謝您的關注Timo。首先,我是jdev的新手..所以我真的與框架混淆。 但是,爲什麼我不能插入行的空值? – anombhayu 2012-07-20 02:16:45
我認爲promblem是TypeOfLloyd引用其他表的屬性,我總是嘗試在這個屬性上輸入null值。哈哈哈。這是我的錯。對不起蒂莫 – anombhayu 2012-07-20 02:51:27
那麼你的問題是回答呢? – 2012-07-20 09:59:38