【发布时间】:2014-10-30 15:36:57
【问题描述】:
您好,我正在使用 Jdeveloper 与 oracle-adf 合作。我尝试使用 valuechangelister
<af:inputText label="#{bindings.CurrentOwner.hints.label}" id="it9"
value="#{bindings.CurrentOwner.inputValue}"
required="#{bindings.CurrentOwner.hints.mandatory}"
columns="#{bindings.CurrentOwner.hints.displayWidth}"
maximumLength="#{bindings.CurrentOwner.hints.precision}"
valueChangeListener="#{bindings.createNewRow1.execute}">
<f:validator binding="#{bindings.CurrentOwner.validator}"/>
</af:inputText>
但是当我尝试读取它时,它在对象 e 上返回 Null 指针异常。
public void createNewRow(ValueChangeEvent e){
//get he EmployeeViewImpl class instance
AssetHistoryVOImpl vo=this.getAssetHistory1();
AssetsUserVOImpl assets=this.getAssetsUser1();
System.out.println("one");
// Create new row to insert data
oracle.jbo.Row r_history=vo.createRow();;
oracle.jbo.Row r_assets=assets.getCurrentRow();
System.out.println("two");
String newValue;
newValue = e.getNewValue().toString();// null pointer exception happens here
System.out.println("three");
String test = (String)r_assets.getAttribute("CurrentOwner");
System.out.println("this is test "+newValue);
我已导入 javax.faces.event.ValueChangeEvent。我在网上看了很多教程,这基本上是他们所做的,但由于某些原因,参数对象为 NULL。
谁能提供一些见解?
谢谢:)
【问题讨论】:
标签: oracle-adf java oracle-adf