I'm extremely new to extending Forms using JavaBeans, and clearly am doing something wrong. I've created a fairly simple class that exposes a single method. The class performs as expected, when run from my IDE, but I've had no luck extending a form with it. Here it is:
package test;
import oracle.forms.ui.VBean;
import com.jacob.activeX.ActiveXComponent;
public class MailMerge extends VBean {
ActiveXComponent word;
public MailMerge() {
}
public void launchWord() {
word = new ActiveXComponent("Word.Application");
word.setProperty("Visible", true);
}
}
I have created a JAR containing this class, signed it, and placed it in <ORA10G_HOME>\forms\java. I created a simple form, with a single button and a bean area. Here is my code:
WHEN_NEW_FORM_INSTANCE
FBEAN.REGISTER_BEAN('MERGE_BEAN', 1, 'test.MailMerge');
WHEN_BUTTON_PRESSED
BEGIN
FBEAN.INVOKE('MERGE_BEAN', 1, 'launchWord');
END;
The form loads without errors, but when I press the button, nothing happens. Part of my confusion is owing to the fact that my bean is intended to present no graphic output. For this reason, I did not implement the IView interface -- I've merely extended VBean (which implements IView, albeit presumably with stubs.)
I've appended the JAR to the CLASSPATH entry in DEFAULT.ENV, and also tried appending MailMerge.jar to the ARCHIVE_JINI entry in FORMSWEB.CFG. I am left to conclude that I'm missing something more fundamental, despite having read what's available in Form Builder's Online Help. Most of the other relevant instructional information I've found is locked up in viewlets that seem always to crash (if they run at all.)
Could anyone spare a clue, because I'm obviously clueless on this occasion!
Eric Adamson
Lansing, Michigan