Hello,
I need to do the following :
after input of a value , I need to call a pl/sql function . If that function returns true , the value input is valid.
If that function returns false, the value is invalid and the user is shown an alert.
I have done the following :
1) Bind that inputText .
2) Created a *bean.java
3) The valueChangeListener of that input text calls a method.
My question is how to call a pl/sql function in that method ??I have written the following code:
public void validateformula(ValueChangeEvent valueChangeEvent)
{
System.out.println("TEST!");
CallableStatement cs2=null;
try{
System.out.println("inside 2nd try ");
cs2=getDBTransaction().createCallableStatement("begin ? := funcionName(?); end;",0);
System.out.println("after ");
cs2.registerOutParameter(1, Types.BOOLEAN);
System.out.println("here ");
cs2.setString(2, it4);
cs2.executeUpdate();
boolean retvalue2 = cs2.getBoolean(1);
if(retvalue2)
{
throw new JboException("Invalid Value !");
}
else {
System.out.println("Valid Value");
}
}catch(SQLException f){
throw new JboException(f);
}
}
I get the following errors :
Error(321,16): cannot find method getDBTransaction()
Error(325,15): cannot find method setString(int,oracle.adf.view.rich.component.rich.input.RichInputText)
Any help please ?