How to implement a java class in my form .

Hi All ,
I'm trying to create a Button or a Bean Area Item and Implement a class to it on the ( IMPLEMENTATION CLASS ) property such as ( oracle.forms.demos.RoundedButton ) class . but it doesn't work ... please tell me how to implement such a class to my button .
Thanx a lot for your help.
AIN
null

hi [email protected]
tell me my friend .. how can i extend
the standard Forms button in Java ? ... what is the tool for that ... can you explain more please .. or can you give me a full example ... i don't have any expereience on that .. i'm waiting for your reply .
Thanx a lot for your cooperation .
Ali
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
Henrik, the Java importer lets you call Java classes on the app server side - I think what Ali is trying to do is integrate on the client side.
If you want to add your own button then if you extend the standard Forms button in Java and then use this class name in the implementation class property then the Java for your button will be used instead of the standard Forms button. And since it has extended the basic Forms button it has all the standard button functionality.
There is a white paper on OTN about this and we have created a new white paper which will be out in a couple of months (I think).
Regards
Grant Ronald<HR></BLOCKQUOTE>
null

Similar Messages

  • How to implement a java class

    dear friends
    i use forms6i server and oracle 9i server edition,under windows 2000 server
    i try to implement a java class for a bean area. i do the following :
    from the property palette i write the class name in implementaion class property . the class name is 'arc.class' and it is located in <oracle_home>/forms60/java
    but the fellowing error appears
    frm-13008 cannot find javabean with name 'arc.class'
    would any one help please

    Dear Grant Ronald
    thank you very much for helping me . now i undersatand how to implement a class. but i have another question ,and i wish you ccould help me .
    i try to import a java class, i do the following:
    From the program menue i choose Import Java Class
    but the following error appears
    (pde-uji001 faild to create JVM)
    by the way i use forms6i server and oracle 9i server under windows 2000 server
    thanks in advance
    tarek

  • How to implement a java class in javafx?

    public interface WarningEvent {
        public void warningHandler ();
    function test ():Void {
            var warningEvent:WarningEvent = new WarningEvent() {
                public void warnHandler(){
        }I am trying to implement java method inside javafx, but without luck. I also tried override with javafx syntax, but still cannot get it. Any one could help on this?
    Thanks.

    1) Get rid of the keyword new
    2) Get rid of braces ()
    3) For the function declaration, use the JavaFX syntax, not the Java syntax!
    function test ():Void {
            var warningEvent:WarningEvent = WarningEvent {
                override public warnHandler():Void {
    }Your class need to have a default constructor (the one without any argument) to be able to do this (and in this case it works because you have an interface instead).

  • How to invoke a Java class constructor in Forms

    I want to Run this ( http://persiancalendar.sourceforge.net/) Persian calendar in forms. I am using Forms 10g Rel 2 (Forms [32 Bit] Version 10.1.2.0.2 (Production))
    I did this:
    (1.) Downloaded the 2 Jar files persiancalendar.jar and icu4j_3_2_calendar.jar
    (2.) Deployed jar files in forms\java
    (3.) Added entries in FORMS_BUILDER_CLASSPATH and formsweb.cfg
    (4.) The 2 jar files get loaded to the JAR cache when form runs.
    Now, in order to invoke the Persian calendar according the documentation you have to invoke the constructor in class PersianCalendar.
    PersianCalendar() Constructs a Persian calendar with the default time zone and locale.
    In Forms the FBean package can invoke only methods. I tried combinations of inputs but without any success.
    According to the documentation this is the only class to create a calendar. All other classes are either utilities or get/set methods.
    How can I do this?

    PersianCalendar() is the constructor of the class; it will be invoked when you instantiate the class. This happens when you register your bean at runtime (assuming you are talking about the FBean Package):
    http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=3&vtTopicFile=enhancedjavabean/enjbs_registerjavabean.html&vtTopicId=
    But I'd opt for a wrapper; you might even want your own class extending PersianCalendar to make some customizing of the calendar.
    cheers

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • How to use a java class in difference project under a same workspace!

    Hi, there:
    I have a problem. I want to reuse a java class which is located in another project of the same workspace. I do not know how to set the two project setting or how to import the java class. I deeply appreciate.
    Sheng-He

    include it as a library
    open project settings goto libraries and simply add your class

  • How to implement the spell check in oracle forms 10g or 6i...

    How to implement the spell check in oracle forms.
    Is there any different method is there.
    Please help me....
    Praveen.K

    Here is one different from Jspell..
    In 6i client/server you can call MS Word spell checker using OLE. Below sample code for 6i.
    For 10g you will need webutil to use same code. install webutil and just replace "OLE2." with "CLIENT_OLE2."
    PROCEDURE spell_check (item_name IN VARCHAR2)
    IS
       my_application   ole2.obj_type;
       my_documents     ole2.obj_type;
       my_document      ole2.obj_type;
       my_selection     ole2.obj_type;
       get_spell        ole2.obj_type;
       my_spell         ole2.obj_type;
       args             ole2.list_type;
       spell_checked    VARCHAR2 (4000);
       orig_text        VARCHAR2 (4000);
    BEGIN
       orig_text := NAME_IN (item_name);
       my_application := ole2.create_obj ('WORD.APPLICATION');
       ole2.set_property (my_application, 'VISIBLE', FALSE);
       my_documents := ole2.get_obj_property (my_application, 'DOCUMENTS');
       my_document := ole2.invoke_obj (my_documents, 'ADD');
       my_selection := ole2.get_obj_property (my_application, 'SELECTION');
       ole2.set_property (my_selection, 'TEXT', orig_text);
       get_spell :=ole2.get_obj_property (my_application, 'ACTIVEDOCUMENT');
       ole2.invoke (get_spell, 'CHECKSPELLING');
       ole2.invoke (my_selection, 'WholeStory');
       ole2.invoke (my_selection, 'Copy');
       spell_checked := ole2.get_char_property (my_selection, 'TEXT');
       spell_checked :=SUBSTR (REPLACE (spell_checked, CHR (13), CHR (10)),1,LENGTH (spell_checked));
       COPY (spell_checked, item_name);
       args := ole2.create_arglist;
       ole2.add_arg (args, 0);
       ole2.invoke (my_document, 'CLOSE', args);
       ole2.destroy_arglist (args);
       ole2.RELEASE_OBJ (my_selection);
       ole2.RELEASE_OBJ (get_spell);
       ole2.RELEASE_OBJ (my_document);
       ole2.RELEASE_OBJ (my_documents);
       ole2.invoke (my_application, 'QUIT');
       ole2.RELEASE_OBJ (my_application);
    END;Call it like this: SPELL_CHECK ('BLOCK.MY_TEXT_ITEM' );

  • How can i call java class implemented as service from ExtJS after successfull activation of a page ?

    Hi ,
    I want to call a java class implemented as a service in felix . This should be called after succesfull activation of the page .
    I want to use ExtJs implemented in /libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js file CQ.wcm.SiteAdmin.activatePage method.
    Please suggest something on this .

    Hi Sham ,
    i tried this ,
    var response = CQ.HTTP.post(
            CQ.shared.HTTP.externalize("/bin/replicate.json"),
            callback,
            { "_charset_":"utf-8", "path":paths, "cmd":"Activate" }
    if (CQ.HTTP.isOk(response)) {
         CQ.HTTP.post("/bin/sample.json",
                  null,
                  {"_charset_":"utf-8","path":paths});
    It is giving an alert messege on siteadmin screen as "Unspecified Error" .
    What can be the problem , am i missing something here?

  • How to load a java class at server start-up

    Hi,
    I have one custome java class that is being referenced by all the applications deployed in OC4J container. How can I load that class automatically and be evailable in the path at server start-up time. Is there an option available to give the class name that also gets loaded automatically.
    Thanks

    To me, you have two mixed issues.
    1. OC4J supports a startup/shutdown model where a named class will be invoked when the container is started (or stopped).
    This is described in the doc here:
    http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28952/startclas.htm#CIHECEIB
    Note that this specifically calls the methods that are implemented from the respective OC4JShutdown and OC4JStartup interfaces -- the class that is instantiated and called here is not available to all other applications by default. This is more to suit the need where something needs to be done when the container is started/stopped.
    2 The next option is where you just want to make a class available to all applications deployed to the container. For this we provide the shared-library mechanism. Using this you can either make use of the implicit global.libraries shared-lib in which you simply drop JAR files into the j2ee/home/applib directory whereupon the classes will become available by default to all applications. Or you can choose to install a shared-library that contains your specific classes (in a JAR file) and then import that into the default application whereupon the configuration will be inherited by all deployed applications.
    cheers
    -steve-

  • How to implement custom Model Class in Oracle ADF?

    I am using Oracle ADF for one of my project and i am using Query component of ADF. For given tables the query component creates view objects and maps the relations. ADF uses its own custom model class for this component and it should understand the DB tables. But for my project i have no access to database. All i can do is pass a string or object/query to the existing (custom) Java class/object, and this model class formulates query and queries the database and returns the value to my Java class. I have to display these results using ADF to the front end. Is There a way to achieve this? Can i replace/override the existing Model class of ADF. If so how?
    Thanks in advance for your help.

    Hi, there:
    Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
    You can also see all the framework JS files and CSS files that way as well.
    We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
    Thanks,
    Joe Huang

  • How to import a java class

    Hi
    I want to know how can i import some java classes to my application.
    I'm trying to write a little class as:
    package paco.view;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    public class ClobConverter implements Converter {
    public ClobConverter() {
    public Object getAsObject(FacesContext context,
    UIComponent component,
    String value) {
    if (context == null || component == null) {
    throw new NullPointerException("FacesContext and UIComponent can not be null");
    if (value == null) {
    return null;
    try {
    return new ClobDomain(value);
    } catch (Exception ex) {
    final String message =
    String.format("Unable to convert boolean value \"%s\" into a oracle.jbo.domain.Number",
    value);
    throw new ConverterException(message, ex);
    public String getAsString(FacesContext context,
    UIComponent component,
    Object value) {
    if (context == null || component == null) {
    throw new NullPointerException("FacesContext and UIComponent can not be null");
    return value.toString();
    but I'got this message:
    Error(3,8): class javax.faces.component.UIComponent not found
    Error(4,8): class javax.faces.context.FacesContext not found
    Error(5,8): class javax.faces.convert.Converter not found
    Error(6,8): class javax.faces.convert.ConverterException not found
    What should I do?
    Thanks in advance
    FRANCISCO

    You need to add the faces library to you project. To do this, select the project properties, go to libraries and class path and select the faces library.
    Using JDev you can also choose one or more project technologies (project properties->technology scope) which will add the needed libraries to the project.
    Timo

  • How to read the java class file to convert it in java.

    hello all,
    i m developing the java application which generated the java code from the java 'class file' .
    Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
    I know the application javad, jad, javap which is doing the same thing.
    thanks for reply,
    - Jayd

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • How to load a java class when application is at first time browsed.

    Hi
    How can i load a simple java class on application startup.
    For servlet it could be done using "load on startup" tag in web.xml
    but how could the same be achieved for a simple java class.
    Thanks

    Hi
    Code is given below....
    package com;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Test {
    Test()
         HttpServletRequest request=null;
         HttpServletResponse response=null;
         RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
         try {
              requestDispatcher.forward(request,response);
         } catch (ServletException e) {
              System.out.println("success");
              e.printStackTrace();
         } catch (IOException e) {
              System.out.println("success 1");
              e.printStackTrace();
         finally
              System.out.println("success 2");
         System.out.println("success 3");
    }Web.xml :
    <servlet>
            <servlet-name>simple</servlet-name>
            <servlet-class>com.Test</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
      <servlet-mapping>
          <servlet-name>simple</servlet-name>
          <url-pattern>/init.do</url-pattern>
        </servlet-mapping>Error Trace :
    org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /DispatcherTest threw load() exception
    java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class com.Test with modifiers ""
         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
         at java.lang.Class.newInstance0(Class.java:344)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
         at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1069)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1162)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
         at java.lang.Thread.run(Thread.java:595)

  • How to import a java class in a JSP

    Hi All,
    I have a java class file called myTest.class (i made after compilation of myTest.java). I have a JSP page that uses this java class file.
    These 2 files are in same folder called c:/test
    and iam importing this java class file into my jsp file and that too at the start of this jsp file:
    <%@page import="myTest" %>
    BUt iam getting an error ..............when iam running this JSP page:
    /opt/bea81sp2/user_projects/domains/wliDomain/./Managed2/.wlnotdelete/extract/Managed2_myTest_myTest/jsp_servlet/__test.java:20: '.' expected
    probably occurred due to an error in /test.jsp line 5:
    <%@page import="myTest" %>
    Please advise how to solve this problem
    -sangita

    Don't bother with the import
    when iam not importing this class file into my JSP, then on my JSP, the class file is not found.
    Here is my code: and these 2 class file are in c:/test
    import org.apache.tools.ant.taskdefs.Ant;
    import org.apache.tools.ant.taskdefs.Property;
    import org.apache.tools.ant.types.*;
    import org.apache.tools.ant.*;
    import org.apache.tools.ant.taskdefs.ExecTask;
    import org.apache.tools.ant.types.Commandline;
    import java.io.File;
    * Creates an Ant project to run an Ant build
    * @author myself
    * @version 1.0
    public class RunTest extends Ant {
        String applicationName;
        String buttonClicked;
        String boxName;
        String targetName;
        public void applicationName(String applicationName){
         this.applicationName = applicationName;
        public void boxName(String boxName){
         this.boxName = boxName;
        public void buttonClicked(String buttonClicked){
         this.buttonClicked = buttonClicked;
      public RunTest() {
    public void goTest() {
         if(this.buttonClicked.equalsIgnoreCase("deploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "deploy-scsmail-testnet";
         if(this.buttonClicked.equalsIgnoreCase("undeploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "undeploy-scsmail-testnet";
        Project project = new Project();
        project.init();
        System.out.println("printing 1 ....");
        ExecTask exec = new ExecTask();
        exec.setProject(project);
        exec.setExecutable("/opt/bea/weblogic81/server/bin/ant.bat");
         exec.setDir(new java.io.File("/export/home/beamon/bin"));
         Commandline.Argument arg = exec.createArg();
         // arg.setLine("-f scsmail.xml test -listener org.apache.tools.ant.XmlLogger -logfile D:/antProject/src/log.xml");
         arg.setLine("-f build.xml "+ targetName + " -listener org.apache.tools.ant.XmlLogger -logfile /export/home/beamon/bin/log.xml");
         System.out.println("printing 2....");
        //exec.setOutput(new File("D:/antProject/logs/prob.txt"));
        exec.execute();
        System.out.println("printing 3....");
    -----------------------the JSP page is called as test.jsp
    <%@page contentType="text/html" %>
    <%@page import="java.io.*" %>
    <%@page import="java.util.*" %>
    <%@page import="java.net.*" %>
    <%@page import="RunTest" %>
    <HTML>
    <TITLE>TESTING ANT GUI</TITLE>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="3000" >
    <meta http-equiv="Cache-Control" content="no-cache">
    </HEAD>
    <BODY BGCOLOR="silver" TEXT="333333">
    <table border=0>
    <tr align="left"><td align="left"><FONT SIZE="-1"><B>  Test Page <FONT SIZE="-1"><B></td></tr>
    </table>
    <hr></center>
    <form action="./test.jsp" method="POST" name="testForm">
    <table>
    <tr>
    <td>
    <select name="appName" size=1>
    <option value="">Select Application Name
    <option value="scsmail">scsMail
    <option value="clientmanager">ClientManager
    </select>
    </td>
    <td>
    <select name="boxName" size=1>
    <option value="">Select Box Name
    <option value="testnet">TestNet
    <option value="production">Production
    </select>
    </td>
    </table>
    <table>
    <input type="submit" name="deploy" value="deploy">
    <input type="submit" name="undeploy" value="undeploy">
    </table>
    <%
       RunTest rt = new RunTest();
       rt.applicationName(request.getParameter("appName"));
        String deployButton = "";
        deployButton=request.getParameter("deploy");
        String undeployButton = "";
        undeployButton=request.getParameter("undeploy");
        if(!deployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("deployButton"));
        if(!undeployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("undeployButton"));
       rt.boxName(request.getParameter("boxName"));
        rt.goTest();
    %>
    </form>
    </table>
    </BODY>
    </HTML>

Maybe you are looking for

  • Encoding Problem: non-Unicode Data to Unicode format of XI

    Hi SDN, I have a JDBC sender to SAP BW scenario. The database is MS SQL server.  The code page of db CP1CIAS Description:SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data Some fields with values like <b>ZAK&#x0;ADY TWORZYW SZTUCZNYCH</b

  • Error while connecting to oracle 10g data base

    Following is the code we used to connect to oracle 10g data base using symbian 7.1 series 80 SDK int CTest_S80AppUi::SetupODBC(void) RETCODE rc; char *DataSource = OD_DATA_SOURCE; char UserId = "system", Password = "manager"; rc=SQLAllocEnv(&Henv); /

  • Electronic Confirmation won't go into Production.

    We're using SRM 4.0 in the extended Classic setup.  The problem we are having is described below: Electronic confirmation from vendor came in from DO vendor with the cost distribution matching the cost distribution on the PO which is setup using perc

  • Park Items, Noted Items

    Hello All, I need to understand the logic behind the Park items, Customer items and Noted items on the selection criteria of FBL1N report. From which tables data is coming for these? We are in process of making a customized report based on this repor

  • APEX Downloadable Reports

    I am working with the reports (you define under shared components) and I have run into a bit of a snag. I have 3 queries for my report however 2 of the three must be joined to the first. How do you go about joining the queries together where the key