This discussion is archived
3 Replies Latest reply: Jan 31, 2013 3:19 AM by Mohammad Jabr RSS

call stored procedure from VOImpl

grodno Newbie
Currently Being Moderated

in VOImpl i have a method getSelectedRows()
which gets me rows selected in table by user.
then, i need to call stored procedure for each row.

so , the parameters for my procedure is stored in VOImpl
and the only way to call procedure is from BB only:

ApplicationModule am = this.getApplicationModule();
OracleCallableStatement st = (OracleCallableStatement)am.getDBTransaction().createCallableStatement("...some pl/sql code"); end;",0);

please advice me how to deal with it:
1. how to make use of OracleCallableStatement from VOImpl pass parameters (a list ) to my BB
  • 1. Re: call stored procedure from VOImpl or backing bean
    Frank Nimphius Employee ACE
    Currently Being Moderated

    1. on the ApplicationModuleImpl file (Java file you create using the AM Java option) you expose a method like

    public void processSelectedRows(List primaryKeys){


    2. In the AM Java dialog, you then create a client interface, select the public method so it is exposed on the Data Control
    3. Refresh the data control to see the AM method
    4. In the Pagedef file (or if you want a command button directly added to your page, by drag and drop from the DC) create a new method binding and select the AM to choose the method you want to invoke programmatically from e.g.a managed bean (OperationBinding ....)
    5. The method binding is created with an argument item that you can either point to a managed bean that exposes setter/getter for the list of arguments (use EL), or provide programmaticaly a value to by calling operationBinding.getParamsMap().put("argument name", list);

    For the rest of how to invoke a callable statement, read the product documentation:

  • 2. Re: call stored procedure from VOImpl
    grodno Newbie
    Currently Being Moderated
    thank you for reply.

    1.Can't DBTransaction be accessed from VOImpl?
    2.well, my problem is all about passing list of parameters
    i can see list of input paarmeters printed out, but don't know how to pass it to AMImpl
    could you please comment on #5?
  • 3. Re: call stored procedure from VOImpl
    Mohammad Jabr Guru
    Currently Being Moderated
    Hello grodno,
    check this {message:id=9952600}
    it is slightly different case, but the idea is the same.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points