Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Problem with Java bean Implementation on Oracle Forms 6

Problem with Java bean Implementation on Oracle Forms 6

From: Madhu <madhuhs_hire_at_rediffmail.com>
Date: 22 Aug 2002 05:00:35 -0700
Message-ID: <2ba29b7.0208220400.4583e4d5@posting.google.com>


Hi,
I am trying to implement a customized java bean on Forms 6. I am finding problem in doing it.
Can anyone help me in doing this.

The Code of the Bean is :

------------------START--------------------

package oracle.forms.beans;

import java.awt.*;
import java.io.*;
import java.beans.*;

import oracle.forms.ui.*;
import oracle.forms.properties.*;

import oracle.forms.handler.*;
import oracle.ewt.lwAWT.*;

public class TestBean extends VBean
{
 public static final ID SETMESSAGE=ID.registerProperty("setMessage");  public static final ID GETMESSAGE=ID.registerProperty("getMessage");

 private String msg=" ";

 public String newMessage()
 {
  return msg;
 }

 public Object getProperty(ID id)
 {
  try
{

   if (id==GETMESSAGE)
   {
    return newMessage();
   }
   return super.getProperty(id);
  }
  catch(Exception e)
{

   e.printStackTrace();    

  }
 return super.getProperty(id);
 }

 public boolean setProperty(ID id,Object value)  {
  try
{

   if (id==SETMESSAGE)
   {
    msg=(String)value;
   }
   return super.setProperty(id,value);
  }
  catch(Exception e)
{

   e.printStackTrace();
  }
  return false;
 }
}

-------------END------------------


My forms60_javadir registry path is set to d:\dev6i\forms60. (this means that when i use in forms my java files will be always picked from here.)(Correct me if i wrong)

TestBean.class file is in d:\dev6i\forms60 (not the javabean) and also in the same folder where .jar file is there. Now in Forms application i create a Bean Area and there is property of Implementation Class that i need to set to the Bean, i need to use...so i give there TestBean but the moment i give i get an error ....FRM-13008:Cannot find the Java Bean with name 'TestBean' ...

Can anyone please help me!!!

Thanks,
Madhu Received on Thu Aug 22 2002 - 07:00:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US