Creating the Extension class

When the Forms System is initialized, the API checks for existing extensions and calls the initialization method (extensionInit) for each extension. Your first step in creating a function call is to create an Extension class that generates a new FunctionCall object. Follow the procedure to create the Extension class called FCIExtension:

  1. Create a new Java™ source file called FCIExtension.java.
  2. Define the Java package. For example:
       com.yourcompany.samples;
    
  3. Import the following files and any other required files to any Java files that call FCI methods. These lines must be placed before any class or interface definitions:
       import com.ibm.form.api.ifx.IFX;
       import com.ibm.form.api.ifx.ExtensionImplBase;
       import com.ibm.form.api.ifx.Extension;
       import com.ibm.form.api.xfdl.FunctionCall;
       import com.ibm.form.api.xfdl.FunctionCallManager;
       import com.ibm.form.api.xfdl.FormNodeP;
       import com.ibm.form.api.IFSUserDataHolder;
       import com.ibm.form.api.error.UWIException;
    
Note: If you are using methods from the Form Library, you must import the necessary packages. For more information, refer to Setting Up Your Application.