A script-enabled browser is required for this page to function properly.

Defining Method Arguments as a List

FBean provides an FBean.ArgList data type which you can use to define an argument list. This list can be populated and then passed to the Invoke methods. The syntax of the ArgList commands follows:

Creating an argument list:


FBEAN.CREATE_ARGLIST return FBEAN.ArgList;

Clearing an argument list:


FBEAN.CLEAR_ARGLIST(
   ARGUMENT_LIST  IN OUT FBEAN.ARGLIST);

Adding values to an argument list:


FBEAN.ADD_ARG( 
   ARGUMENT_LIST  IN OUT FBEAN.ARGLIST, 
   ARGUMENT_VALUE IN     VARCHAR2);

FBEAN.ADD_ARG(
   ARGUMENT_LIST  IN OUT FBEAN.ARGLIST, 
   ARGUMENT_VALUE IN     NUMBER);

FBEAN.ADD_ARG( 
   ARGUMENT_LIST  IN OUT FBEAN.ARGLIST, 
   ARGUMENT_VALUE IN     BOOLEAN);

Creating and Populating an Argument List

To create and populate an argument list:

  1. Define a variable in your program unit of type FBean.ArgList.
  2. Initialize the variable by calling FBean.Create_Arglist.
  3. Use FBean.Add_Arg to add each argument to the list in the correct order. FBean.Add_Arg is overloaded to handle Strings, numbers and Boolean types. In each case, you pass the argument list that you created as the first parameter to FBean.Add_Arg.
  4. When you are finished with the argument list, you can clear it for reinitialization by using FBean.Clear_Arglist.

Example

To define the arguments for a Java method which takes: float, String, Boolean, and double arguments, you would create an argument string as follows:


declare 
   hArgList FBean.ArgList; 
begin 
   hArgList := FBean.Create_ArgList; 
   FBean.Add_Arg(hArgList, 2.5); 
   FBean.Add_Arg(hArgList, 'A string value'); 
   FBean.Add_Arg(hArgList, false);  
   FBean.Add_Arg(hArgList, 100);  
   FBean.Add_Arg(hArgList, 'Another String'); 
   FBean.Add_Arg(hArgList, true);
   .... 

You can now use the Arglist in a call to a method. For an example, see Calling Arguments as an Argument List


Accessing JavaBean Methods

Defining Method Arguments as a Delimited String

Invoking JavaBean Methods

Working with Overloaded Methods