Before your program can begin working with a form, you must load it into memory. CalculateAge does this by defining a loadForm method to handle these tasks.
private static void loadForm() throws Exception
- Before you can load the form, declare the XFDL object:
- Use IFSSingleton.getXFDL to assign the XFDL object to theXFDL. This allows you to access the root node of the form.
theXFDL = IFSSingleton.getXFDL();
if(theXFDL == null)
throw new Exception("Could not find interface");
- The loadForm method uses the Form Library method readForm to load the form into memory. Before you can use readForm> you must retrieve the XFDL object.
- Call the API method readForm to load the form into memory. The method returns a reference to the root node of the form.
theForm = theXFDL.readForm("calculateAge.xfd", 0);
- The argument "calculateAge.xfd" is the name of the form to read from the local drive.
Parent topic: Developing an application in Java