嗨,我正在使用Jdeveloper的oracle-adf。我试图用valuechangelisteroracle adf Valuechangelistener空指针异常
<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返回空指针异常。
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。
任何人都可以提供一些见解吗?
谢谢:)