Displaying a JCombo Box in a Java bean with Forms9i

I am including a java bean in my 9i form which uses some swing component such as combo box. The problem is that when I show the popup menu of the combo box, I cannot see the list items available in the box. Is that of L&F problem or is it a Form rendering problem

Hi,
This sounds like a Swing issue that can be cause by the Forms ewt classes.
See: http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
Frank

Similar Messages

  • Using java bean with jsp

    hello friends,
    i'm new to jsp. i want to create an html form that accepts username and a value from four radio buttons and display back the entered name and checked radio button's value using java bean.
    i use the <jsp:setProperty id="" property="*"> method. i don't know how to access the radio buttons value from the html.
    also when i use an additional field other than username the jsp page is showing error.
    Please give me the correct method to use java bean with jsp in this circumstance.
    thank you.

    thank you, but i have a problem left. the case is like this.
    i got the jsp and bean worked fine when i have a sinle input text field.
    but when i added a second text field i recieved the following error.
    javax.servlet.ServletException: basket.newbean.getUserPass()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.newform.process_jsp._jspService(process_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    where userPass is the new form element. I have made the subsequent chanes in my bean program and jsp file.
    pls hlp.

  • Can we use an overloaded constructor of a Java Bean with Session Tracking

    Hi Friends,
    If any one can solve my query.... It would be helpful.
    Query:
    I have a Java Bean with an overloaded constructor in it. I want to use the overloaded constructor in my JSP.
    1. One way of doing that is to use it directly in the "Scriptlets" (<% %>). But then I am not sure of the way to do session tracking. I think I can use the implicit objects like "session", "request" etc. but not sure of the approach or of the implementation method.
    2. Another way is through the directive <jsp: useBean>. But I cannot call an overloaded constructor with <jsp: useBean>. The only alternative way is to use the directive <jsp: useBean> where I have to write getter and setter methods in the Java Bean and use the <jsp: setProperty> and <jsp: getProperty> standard actions. Then with this approach I cannot use the overloaded constructor.
    Can any one suggest me the best approach to solve this problem ?
    Thanks and Regards,
    Gaive.

    My first reaction is that you can refactor your overloaded constructor into an init(arguments...) method. Instead of overloaded constructor, you can call that init method. This is the ideal solution if possible.
    As to the two choices you listed:
    1. This is OK, I believe. You can use scriplet to define the bean and put it into session scope of the pageContext. I am not sure exactly what you meant by session tracking; whatever you meant, it should be doable using HttpSessionAttributeListener and/or HttpSessionBindingListener.
    2. Agreed. There is no way that <jsp:useBean> can call a constructor that has non-empty arguments.
    Please tell me how it works for you.

  • JAVA BEAN in forms9i

    What are the steps for calling a java bean in forms9i?
    I have to use find_item('java_bean_name)?
    thanks,
    Lionel

    There is a bunch of information about it in the Java spotlight section on the Forms Upgrade Center at:
    http://otn.oracle.com/formsupgrade

  • Running java bean from forms9i on win xp

    hi all,
    I have a form that uses java bean to write txt file on client computer. java bean connects to database and uses it's data to create txt file. everything runs fine on client with win2000, but with windows xp (professional, sp2, ie6.0) there seems to be some problem with connecting to db (returned connection is null). my win xp firewall is turned off, security settings (including java and activeX) are low, forms version is 9.0.4.0.19. java code seems to be ok, i think it has something to do with forms/xp compatibility. has anyone had similar problem?
    Thanks for any response,
    Albert

    Thanks for your response. First version of our program was running on webutil, but as it turned out it was lacking performance. New version, with our custom java bean is much faster.
    As I wrote it works on Windows 2000. It also works on WinXP as a standalone application. Only when deployed to Oracle Forms with XP client it fails. Error occures during retreiving connection to db when calling DriverManager.getConnection method. No exception is thrown, retreived connection is null.
    Thanks for any help
    Albert

  • JSP and Java Beans with Database Problem

    hellow, this is my first posting and i hope to help me as fast as you can...
    my problem is simplly i cant get any data from the database (whatever the database it is, i test it with MS Access and MySQL server) when i use a bean, But if i put my connection statement in the JSP file thair is no problem... ???? !!!!
    for example i have a class "Authentication" that have a method to test if the username and password is correct or not and return 1 if true, 0 if false, -1 if thair are some problem in connecting DB.
    now if i create a normal java application that uses this method, it's work and no problems, BUT if i used a JSP page to use this method it's return allways -1

    T1 class:
    package VX;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    public class T1
    //public MBJDBConnection(String driver,String url)
    public T1()
    JDBC_DRIVER = "com.mysql.jdbc.Driver";//driver;
    DATABASE_URL = "jdbc:mysql://localhost:3306/rawafed?user=root;password=0000";//url;
    //=======DB CONNECTION===========================================
    private static String JDBC_DRIVER;
    private static String DATABASE_URL;
    protected Connection connection;
    protected Statement statement;
    //===========End DBC==============================================
    public int update(String sqlUpdate)
         int i=0;
              //connectDB();
              try{
                   i=statement.executeUpdate(""+sqlUpdate);
                   catch(Exception e)
                        System.out.println("Error Inserting Statement Or Connection Not Opened");
              //disconnectDB();
         return i;
    public ResultSet select(String sqlQuery)
              //connectDB();
              ResultSet rs;
              try
              {//open try
              rs=statement.executeQuery(""+sqlQuery);
                   return rs;
              }//end try
              catch(Exception e2)
                   //System.out.println("Error Selecting Statement Or Connection Not Opened");
              }//end catch
              //add to array list
         //return resultList;
         return null;
    //------Methods-------
    public void connectDB()
    //===========================Connection===================
    try
    Class.forName(JDBC_DRIVER);
    catch(Exception e)
    System.out.println("Error : FOR NAME");
    try
    connection = DriverManager.getConnection(DATABASE_URL, "root", "0000");
    catch(Exception e)
    System.out.println("Error : DB URL");
    try
    statement = connection.createStatement();
    catch(Exception e)
    System.out.println("Error : CREATE STATEMENT ERROR");
    public void disconnectDB()
    try
    statement.close();
    connection.close();
    catch(Exception e2)
    System.out.println("Error : CAN'T CLOSE DB");
    T2 Class
    package VX;
    // class Person.
    //Required Class : EDC.EDCDB
    import java.sql.*;
    public class T2
         public T2()
              //initialization
         //........................ Attributes .........................
         private String user;
         private String password;
         private T1 db=new T1();
         private ResultSet rs;
         //......................... Methods .........................
         public String getAdmin(String u,String p)// 0: Failure, 1:Success and he is Administrator, 2: success and he is a regular employee 3: SUCCESS AND HE IS agent
              try
              user=u;
              password=p;
              rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=1");
              if(rs.next())
                   return ""+1;
              else
                   rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=2");
                   if(rs.next())
                        return ""+2;
                   else
                        rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=3");
                        if(rs.next())
                             return ""+3;
                        else return ""+0;
              catch(Exception e){System.out.println("Error \n"+e.getMessage());return ""+e.getMessage()+"\n"+(-1);}
         public int getCard(String u,String p)// 0: Failure, 1:Success and he is Administrator, 2: success
              user=u;
              password=p;
              try
              db.connectDB();
              rs=db.select("SELECT Card_ID,password FROM Card WHERE Card_ID='"+user+"' AND password='"+password+"'");
              if(rs.next())
                   return 1;
              return 0;
              catch(Exception w)
                   return -1;
              finally
                   //System.out.println("Done");
                   db.disconnectDB();
         public int getAny()
              return 1;
    }//end class
    This is a tested class and it's work OK
    import VX.T2;
    public class T3
         public static void main(String [] args)
              System.out.println("System Started...");
              try
                   T2 t2=new T2();
                   System.out.println(t2.getCard("1","a"));
              catch(Exception e)
                   System.out.println("Opsssss ...");
    Now this is the JSP Code that OK and Run without any problems
    <%@ page contentType="text/html; charset=windows-1256" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
    <title>test</title>
    </head>
    <body>
    <%
    //Mazin B. Jabarin 20210464
    //Testing JSP - MySQL Server Driver
    String connectionURL = "jdbc:mysql://localhost:3306/EDCDB?user=root;password=0000";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    %>
    <%
    try{
    Class.forName("com.mysql.jdbc.Driver");
    connection = DriverManager.getConnection(connectionURL, "root", "0000");
    statement = connection.createStatement();
    rs = statement.executeQuery("SELECT * FROM a");
    while (rs.next()) {
    out.println(rs.getString("id")+"<br>");
    rs.close();
    catch(Exception e)
    out.print("Error : "+e.getMessage());
    %>
    </body>
    </html>
    Now this JSP File always returns (-1) ???? !!!!!!!
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" import="VX.T2" import="java.util.*" errorPage="" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%
    try
    T2 t2=new T2();
    out.println("Result Still : "+t2.getCard("1","a"));
    catch(Exception w)
    out.println("<BR> Error In Execution ??? "+w.getMessage());
    %>
    </body>
    </html>
    ++++++++++++++++++++++++++++
    any one can help me please :(
    i use tomcat as web-application
    and i install jdk 1.5
    also JBulder 7
    (now i supposed that the JBulder make some conflict, so i uninstalled it but still Not Working) ...
    before one year i was working just like this way and it was working
    but now i dont know what is the problem
    i am really need help.

  • Problem in using java bean with jsp

    Hi,
    This is my code and i get this error. Not able to trace the mistake.
    bean.html
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Fname</title>
    </head>
    <body>
    <form method="POST" action="http://localhost:8080/beanjsp.jsp">
         <p>Fname: <input type="text" name="T1" size="20"></p>
         <p>Lname: <input type="text" name="T2" size="20"></p>
         <p> </p>
         <p> </p>
         <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    </body>
    </html>
    beanjsp.jsp
    <jsp:useBean id="bean" class="beans.FirstBean" scope="application" />
    <jsp:setProperty name="bean" property="fname" param="T1" />
    <jsp:setProperty name="bean" property="lname" param="T2" />
    THE FIRST NAME IS <%=bean.getFname() %>
    THE LAST NAME IS <%=bean.getLname() %>
    FirstBean.java
    //CREATING A BEAN
    package beans;
    import java.io.*;
    public class FirstBean
         private String fname;
         private String lname;
         FirstBean()
              fname="";
              lname="";
         public void setFname(String fn)
              fname=fn;
         public void setLname(String ln)
              lname=ln;
         public String getFname()
              return fname;
    public String getLname()
              return lname;
    error report
    org.apache.jasper.JasperException: /beanjsp.jsp(2,0) The value for the useBean class attribute beans.FirstBean is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I have placed the beans package folder containing FirstBean.class inside classes folder of ROOT directory.
    I don't know what s wrong with my code :( ... Plz help asap.
    Thanks,
    Akshatha

    I have placed the beans package folder containing FirstBean.class >inside classes folder of ROOT directory.Place it in the WEB-INF/classes folder
    ram.

  • Lync 2013, text does not display in chat box. Windows 7 pc with dual monitors.

    Has anyone experienced an issue with Lync 2013 where when someone sends a chat the text doesn't display in the chat box. Or on occasion when initiating a chat, the text typed in doesn't display? The person experiencing this
    behavior has dual monitors and often times when she is working on a document - then goes to Lync and initiates a chat and types, the words do not display in the chat box. Her graphics drivers are current, (8.15.10.2869). At one point she was able to drag the
    chat box over to the monitor on the left and then the text displayed. Since then she has received a brand new laptop, windows 7 and the Lync behavior continues but now her dragging the chat box to other monitor no longer resolve text display issue. Ideas?

    Hi,
    Did the issue happen if only use single monitor?
    Please update to the latest version for Lync client 2013 and then test again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Using FormsGraph Bean with Forms9i

    Is it possible to get two different types of graphs( like Bar type, Line type) in the same graph with FormsGraph bean in Oracle Forms9i builder.
    Thanks in Advance

    Hi,
    this functionality is not exposed through the BI Graph Bean sample for Forms9i. We have this feature on our list of required functionality for the native integration of the BI Graph Bean in the next major release of Forms (a release after Forms10g).
    Frank

  • Java Bean does not display in Forms 9i

    Hi,
    I created a Java bean taht would not display in a Forms 9i application. I do not get any error messages, just nothing seem to happen. I did the following:
    1. Created a Java Bean with az Init() public function, packed it into a jar file and put it into <9iASHome>\forms90\java
    2. Added the jar file to the formsweb.cfg file's archive_jini.
    3. Created a Form with a Java Bean item on a canvas.
    4. Set the implementation property of the bean item to the full java 'direcotry' path of the class.
    5. Created the WHEN-NEW-FORM-INSTANCE trigger and put this code into it:
    fbean.register_bean('BLOCK3.BEAN_AREA4',1,'geoifsweb.ifsframe');
    After deploying the form to 9iAS and running it nothing seems to happen, only the place of the Java Bean appears on the Form. Teh Java Bean class extend a JFrame class, so I would expect it to appear on the screen.
    What am I missing? Thank you for any help or hint in advance.
    Regards,
    Tamas Szecsy

    Tamas
    When using fbean.register_bean you don't need to set the implementation class of the bean at design time.
    You must however supply the full package and class name in the register_bean call.
    Do you get any exceptions in the Java console?
    I'd also switch logging on (see FBEAN.Set_Logging_Mode)

  • Navigation Panel using Java Bean Base API

    Hi,
    I would like to know how do I add the standar navigation panel to my map using the oracle.lbs.mapclient.MapViewer object. I have try different forms which include adding a tile theme layer but its not working. I'm not using the JS API since I want to have an applet.
    Thanks in advance.
    Susana

    Hi,
    in MapViewer's web page there is a link to some demos. There you can find a few examples of how to use the Java bean with jsp pages.
    If you want to implement a simple java (desktop) application, the following code contains the basic information that you need to start the MapViewer object, set the display parameters, and then add some information to generate a map image. In this example, a base map is used to generate the map.
        String url = "http://localhost:7001/mapviewer/omserver";
        try
          MapViewer mapViewer = new MapViewer(url);     // creates MapViewer object
          mapViewer.setDataSourceName("mvdemo");       // sets the data source (must exist in Mapviewer server)
          mapViewer.setMapTitle("MVDEMO base map");           
          mapViewer.setAntiAliasing(true);    
          mapViewer.setImageFormat(MapViewer.FORMAT_RAW_COMPRESSED);
          mapViewer.setDeviceSize(new Dimension(600,475));
          mapViewer.setCenterAndSize(-116.65,38.92,19.2);         // sets the map area
          mapViewer.setBaseMapName("DEMO_MAP");
          System.out.println(mapViewer.getMapRequestString());    // this prints the current map request to be issued
          boolean response = mapViewer.run();      // executes the request
          if (response)
              Image img = mapViewer.getGeneratedMapImage();
             // do something with the image in your Java application
        }catch(Exception ex)
           ex.printStackTrace(System.err);
        }The API java doc (see APIs link in MapViewer's web page) contains a more detailed description of the methods that can be used with the Java bean API.

  • Problems with a java bean in Weblogic 5.1

    Hello,
              I am having a problem deploying a java bean in Weblogic 5.1:
              I have been given a .class and a .jar file for a java bean (not an EJB). I
              placed the .class file into e:\temp\WEB-INF\classes and added the following
              line to my weblogic.properties file:
              weblogic.httpd.webApp.testApp=e:/temp/
              I have also updated the web.xml file in the WEB-INF directory as follows:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <servlet>
              <servlet-name>EdIface</servlet-name>
              <jsp-file>test.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name>EdIface</servlet-name>
              <url-pattern>EdIface</url-pattern>
              </servlet-mapping>
              </web-app>
              When I try to access my http:\\server:port\testApp\test I get an "Error
              500 - internal server error".
              Has anyone had experice with deploying a java bean with jsut the .class and
              .jar file? Where should I put the .jar file?
              I appreciate any advice!
              

    Bump

  • How to embed excel in java bean area on oracle forms 9i?

    Hi,
    I am trying to embed excel in oracle forms 9i using java bean. I want to open excel sheet in the bean area not as seprate application. Means i donot want to excel running separately from forms on the machine.
    If any body knows the solution please reply.
    Best regrads,
    Shiraz

    Hi
    Is it possible to create a java bean, with a click event which populates data from database table to an excel sheet.
    The data(can be obtained in a string format with delimiters, but can anyone help me in exporting this into an excel sheet). and also to provide user to take prints of the data in the excel sheet.
    If Print of the JTable could be done(by settin printable as this), but this involves unwanted buttons to be printed, and entire table is not available in the spread sheet format.
    Thanks in Advance
    Deepa

  • Best approach for building dialogs based on Java Beans

    I have a large amount of Java Beans with several properties each. These represent all the "data" in our system. We will now build a new GUI for the system and I intend to reuse the beans as far as possible. My idea is to automatically generate the configuration dialogs for each bean using the java.beans package.
    What is the best approach for achieving this? Should I use PropertyEditors or should I make my own dialog-generator using the Introspetor class or are there any other suitable solutions?
    All suggestions and tips are very welcome.
    Thanks!
    Erik

    Definitely, it is better for you to use JTable. Why not try it?

  • Writing java bean class?

    Hi All,
    In my scenario,I am getting all pagelevel details from the database.
    I mean Suppose in my web application 10 pages are there.for 10 pages, all details (like page title,button names,page header etc) based on user.per user it will vary .Some body have insert,update buttons ,some body not.
    I was created java bean with static getters and setters for all pages to get the data and store.
    I don't want to connect to the database to get the page details per every page.so,
    its working for me.what happen if more than one user access the application.The details will effect to all when new user enter into the system?
    any suggestions.....................................????
    if I write non - static getters and setters ,I need to instantiate everypage.
    its takes more memory ,In my web application I have above 75 pages.
    solution???

    1)So,I need to pass the Class object to the
    session.setAttribute()
    right?
    Well to be precise - you create an instance of the class (object) for each registered and logged in user and then yes - store the object as a session attribute
    >
    2)Suppose I change my bean to instance bean,bean have
    above 20 instance variables .I think performance
    point of view,Its not good.
    Because,if users are more than 20 what happend?
    You should probably think about 200 :). 20 users is not an issue wwhen you have sufficient hardware.
    One option would be to store the user permission/preferences in the db and associate it with the user id. Infact for large applications that hold lots of user related data per user, that would be my preferred approach.
    ram.

Maybe you are looking for

  • Envy4-1130us crashed during BIOS update

    Hello! I just killed my favorite laptop Envy4-1130us. I decided to update BIOS from v.13 to v.25 During update process, OS (Win8.1) hangt up. No errors was shown. After few hours laptop restarted, and now it's not works. Power led is on, system fan w

  • Probelm-issue

    < MODERATOR:  Per the forum [rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement], please use an appropriate subject in your message.  Message locked. > Experts:-   when the user is posting fb60 at that time he is not see

  • Dear Oracle: PLEASE improve the SEARCH on these forums!!!

    Subject: Dear Oracle: PLEASE improve the SEARCH on these forums!!! I have been getting frustrated using the search on these forums. I find the content very useful (especially as I cannot seem to find any other forums for Oracle Portal) but the search

  • Simple Automated batch video transcoding

    Hi, I am very new to FCS, all I want to do is have it scan my S3 mounted drive on my desktop, if there is content present grab that video and transcode it to MPEG4-webcasting, then place it into another S3 mounted drive (using expand drive to mount S

  • Nuances of the Scanner Class

    I'm having trouble with the Scanner class... here is a snippet of code from a program I am writing. ========== 1 System.out.print("Enter the name of the new passenger-> "); 2      String passengerName = scan.nextLine(); 3      System.out.println(pass