Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Problems using Enhanced JavaBean Support

495335Aug 21 2006 — edited Aug 28 2006

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

Comments

495335
I've found some information that looks helpful, in the form of a blog entry found at:

http://forms.pjc.bean.over-blog.com/article-3234108.html

The entry mentions that the bean cannot be registered immediately within the WHEN_NEW_FORM_INSTANCE trigger, and shows how to delay this slightly using a timer.

Special thanks to Francois Degrelle for the blog entry linked above, and to Frank Nimphius, for the blog entry that pointed me there! :)

Eric Adamson
Lansing, Michigan
495335
I've discovered what my problem was, and it was silly. I had updated the archive_jini entry that appears in my webutil config, but in this case, I was not specifying that config when calling frmservlet, so the JAR was not being downloaded. (DOH!)

Eric
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 22 2006
Added on Aug 21 2006
2 comments
349 views