Professional Documents
Culture Documents
-- Function
createorreplacefunctionget_emp_fullname(empidinnumber)returnvarchar2
as
v_full_namevarchar2(120);
begin
selectfirst_name||''||last_name
intov_full_name
fromemployees
whereemployee_id=empid;
returnv_full_name;
exception
whenno_data_foundthen
returnnull;
endget_emp_fullname;
Now open the Application Module.java file and paste the below code.
return st.getObject(1);
} catch (SQLException e) {
throw new JboException(e);
} finally {
if (st != null) {
try {
// 7. Close the statement
st.close();
} catch (SQLException e) {
Number a ;
}
}
}
}
Go to again Application Module and below Java class and click Client Interface
to Expose methods on Client interface. Shuttle the methods to selected area
and Click OK
Now create a JSF page and drag and drop the Logprocedure as a ADF Button
and test it.
Drag the getEmpFullname function to the page and choose ADF parameter form (it is a function
so we have to bind the input and return values)
Output