Bean problem

Forum sobre a ferramenta Oracle JDeveloper, ADF, OAF, etc. (Não é destinado ao aprendeziado da Linguagem Java em geral)
Post Reply
danissoares
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 2
Joined: Tue, 24 Jun 2008 3:56 pm
Location: Rio de Janeiro

Galera, I need to put a mini-browser to view an HTML page inside the Forms. For this, I spoke to the bean area with codes that I have already found ready on the net, but I will need to make some modifications so that it works the way I want and then they started my problems. I took a tutorial on the net that taught how to build a java bean http://forms.pjc.bean-blog.com). iz all as he taught, put the files and everything else in the indicated sites, but nothing works. I followed the step by step tutorial, I rescued things that are a bit different in the 9i, because the tutorial is 10g, but it says it also works for 9i (my version). I will post here the code I did for the jdeveloper (I generated the jar right and I even did another step that is not in the tutorial that is to sign the jar file).
I need to know this urgently, please help me. Abbax follows the source code of the class that I only used to test (it is not the web browser yet).

Select all

package oracle.forms.demo; 
 
import java.awt.Color; 
 
import oracle.forms.handler.IHandler; 
import oracle.forms.ui.CustomEvent; 
import oracle.forms.properties.ID; 
import oracle.forms.ui.VBean; 
 
public class GetCanvasProp extends VBean 
 
{ 
    static IHandler mHandler; 
    // properties you can set 
    protected static final ID SETHIDDEN   = ID.registerProperty("SETHIDDEN");     
    // properties you can be get 
    protected static final ID GETBGCOLOR   = ID.registerProperty("GETBGCOLOR"); 
    // events you can raise 
    protected static final ID EVT_01   = ID.registerProperty("EVT_01");     
     
    // default constructor 
    public GetCanvasProp() 
    { 
      super(); 
    } 
 
    public void init(IHandler handler) 
    { 
      super.init(handler); 
      mHandler = handler; 
      // put your initialisation instructions here 
    }       
  
 /** 
   * Set the properties to the bean 
   **/     
  public boolean setProperty(ID property, Object value) 
  { 
    if(property == SETHIDDEN) 
    { 
       String sParam = (String)value; 
       if(sParam.equals("true")){ 
        setVisible(false); 
       } 
       else { 
          setVisible(true); 
       } 
       return true; 
      }     
    else // default behaviour 
       { 
          return super.setProperty(property, value); 
       }       
  } 
 
 /** 
   * Get the properties of the bean 
   **/ 
  public Object getProperty(ID property) 
  { 
    if (property == GETBGCOLOR) 
    { 
      String sColor = ""; 
      Color color = this.getParent().getBackground(); 
      sColor = "r"+color.getRed()+"g"+color.getGreen()+"b"+color.getBlue(); 
      return color;       
    } 
    else // default behaviour 
    { 
      return super.getProperty(property); 
    } 
  } 
 
 /** 
   * Send a message to the Forms module 
   **/ 
  public void dispatch_event( ID id ) 
  { 
      CustomEvent ce = new CustomEvent(mHandler, id); 
      dispatchCustomEvent(ce); 
  } 
}
Inside the forms I put in the JavaBean Property Implementation Class: oracle.forms.demo.GetCanvasProp

does not give any Error, only the execution of the forms is locked as if the path was incorrect. Can someone help me????

Thanks from now on !!!!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests