Interaction between Writer and JavaBeans with Oracle Forms

Hi, guys,
I've been facing some difficulties trying to integrate Writer and Oracle Forms Web (10g). I'm able to open a Writer Document by using a JavaBean executed from Eclipse, but I cannot get the same operation working from forms web. Has anyone ever tried to do somenting like that? Is there a solution to communication between Forms 10G and OpenOffice Writer and how to do it?
Thanks in advance.

Hi, François!
Thanks for your prompt answer. But I still have some questions. The Bean I'm using is the OOoBean, provided by OpenOffice and there isn't much documentation around. I have to control the Writer text editor from forms 10G, but I haven't been successful in my goal.
I'll show the code I'm using in eclipse. I need to adapt it to work in Forms 10G.
$RCSfile: OOoBeanViewer.java,v $
* $Revision: 1.3 $
* last change: $Author: vg $ $Date: 2005/02/16 16:22:52 $
* The Contents of this file are made available subject to the terms of
* the BSD license.
* Copyright (c) 2003 by Sun Microsystems, Inc.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Sun Microsystems, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import javax.swing.filechooser.*;
import javax.swing.*;
import com.sun.star.comp.beans.*;
import java.io.*;
/** A simple Applet that contains the SimpleBean.
* This applet is a sample implementation of the
* OpenOffice.org bean.
* When initally loaded the applet has two buttons
* one for opening an existant file and one to open
* a blank document of a given type supported by
* OpenOffice.org eg. Writer, Calc, Impress, .....
public class OOoBeanViewer extends java.applet.Applet
* Private variables declaration - GUI components
private java.awt.Panel rightPanel;
private java.awt.Panel bottomPanel;
private javax.swing.JButton closeButton;
private javax.swing.JButton terminateButton;
private javax.swing.JButton newDocumentButton;
private javax.swing.JPopupMenu documentTypePopUp;
private javax.swing.JCheckBox menuBarButton;
private javax.swing.JCheckBox mainBarButton;
private javax.swing.JCheckBox toolBarButton;
private javax.swing.JCheckBox statusBarButton;
private javax.swing.JButton storeDocumentButton;
private javax.swing.JButton loadDocumentButton;
private javax.swing.JButton syswinButton;
private JTextField documentURLTextField;
private JMenuItem item;
private JFileChooser fileChooser;
private byte buffer[];
* Private variables declaration - SimpleBean variables
private OOoBean aBean;
* Initialize the Appplet
public void init()
          //The aBean needs to be initialized to add it to the applet
          aBean = new OOoBean();
//Initialize GUI components
rightPanel = new java.awt.Panel();
bottomPanel = new java.awt.Panel();
closeButton = new javax.swing.JButton("close");
terminateButton = new javax.swing.JButton("terminate");
newDocumentButton = new javax.swing.JButton("new document...");
documentTypePopUp = new javax.swing.JPopupMenu();
storeDocumentButton = new javax.swing.JButton("store to buffer");
loadDocumentButton = new javax.swing.JButton("load from buffer");
syswinButton = new javax.swing.JButton("release/aquire");
menuBarButton = new javax.swing.JCheckBox("MenuBar");
          menuBarButton.setSelected( aBean.isMenuBarVisible() );
mainBarButton = new javax.swing.JCheckBox("MainBar");
          mainBarButton.setSelected( aBean.isStandardBarVisible() );
toolBarButton = new javax.swing.JCheckBox("ToolBar");
          toolBarButton.setSelected( aBean.isToolBarVisible() );
statusBarButton = new javax.swing.JCheckBox("StatusBar");
          statusBarButton.setSelected( aBean.isStatusBarVisible() );
documentURLTextField = new javax.swing.JTextField();
//Set up the Popup Menu to create a blank document
documentTypePopUp.setToolTipText("Create an empty document");
item = documentTypePopUp.add("Text Document");
item.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
createBlankDoc("private:factory/swriter",
"New text document");
item = documentTypePopUp.add("Presentation Document");
item.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
createBlankDoc("private:factory/simpress",
"New presentation document");
item = documentTypePopUp.add("Drawing Document");
item.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
createBlankDoc("private:factory/sdraw",
"New drawing document");
item = documentTypePopUp.add("Formula Document");
item.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
createBlankDoc("private:factory/smath",
"New formula document");
item = documentTypePopUp.add("Spreadsheet Document");
item.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
createBlankDoc("private:factory/scalc",
"New spreadsheet document");
syswinButton.addActionListener(
                    new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    try
                         aBean.releaseSystemWindow();
                         aBean.aquireSystemWindow();
                    catch ( com.sun.star.comp.beans.NoConnectionException aExc )
                    catch ( com.sun.star.comp.beans.SystemWindowException aExc )
storeDocumentButton.addActionListener(
                    new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    try
                         buffer = aBean.storeToByteArray( null, null );
                    catch ( Throwable aExc )
                         System.err.println( "storeToBuffer failed: " + aExc );
                         aExc.printStackTrace( System.err );
loadDocumentButton.addActionListener(
                    new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    try
                         aBean.loadFromByteArray( buffer, null );
                    catch ( Throwable aExc )
                         System.err.println( "loadFromBuffer failed: " + aExc );
                         aExc.printStackTrace( System.err );
closeButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
close();
terminateButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
terminate();
newDocumentButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
documentTypePopUp.show((java.awt.Component)evt.getSource(), 0,0);
menuBarButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    aBean.setMenuBarVisible( !aBean.isMenuBarVisible() );
mainBarButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    aBean.setStandardBarVisible( !aBean.isStandardBarVisible() );
toolBarButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    aBean.setToolBarVisible( !aBean.isToolBarVisible() );
statusBarButton.addActionListener(new java.awt.event.ActionListener()
public void actionPerformed(java.awt.event.ActionEvent evt)
                    aBean.setStatusBarVisible( !aBean.isStatusBarVisible() );
documentURLTextField.setEditable(false);
documentURLTextField.setPreferredSize(new java.awt.Dimension(200, 30));
rightPanel.setLayout( new java.awt.GridLayout(10,1) );
rightPanel.add(closeButton);
rightPanel.add(terminateButton);
rightPanel.add(newDocumentButton);
rightPanel.add(storeDocumentButton);
rightPanel.add(loadDocumentButton);
rightPanel.add(syswinButton);
rightPanel.add(menuBarButton);
rightPanel.add(mainBarButton);
rightPanel.add(toolBarButton);
rightPanel.add(statusBarButton);
//bottomPanel.setLayout( new java.awt.GridLayout(1,1) );
bottomPanel.setLayout( new java.awt.BorderLayout() );
bottomPanel.add(documentURLTextField);
setLayout(new java.awt.BorderLayout());
add(aBean, java.awt.BorderLayout.CENTER);
add(rightPanel, java.awt.BorderLayout.EAST);
add(bottomPanel, java.awt.BorderLayout.SOUTH);
* Create a blank document of type <code>desc</code>
* @param url The private internal URL of the OpenOffice.org
* document describing the document
* @param desc A description of the document to be created
private void createBlankDoc(String url, String desc)
          //Create a blank document
          try
documentURLTextField.setText(desc);
//Get the office process to load the URL
aBean.loadFromURL( url, null );
               aBean.aquireSystemWindow();
          catch ( com.sun.star.comp.beans.SystemWindowException aExc )
               System.err.println( "OOoBeanViewer.1:" );
               aExc.printStackTrace();
          catch ( com.sun.star.comp.beans.NoConnectionException aExc )
               System.err.println( "OOoBeanViewer.2:" );
               aExc.printStackTrace();
          catch ( Exception aExc )
               System.err.println( "OOoBeanViewer.3:" );
               aExc.printStackTrace();
               //return;
     /** closes the bean viewer, leaves OOo running.
private void close()
               setVisible(false);
               aBean.stopOOoConnection();
               stop();
               System.exit(0);
     /** closes the bean viewer and tries to terminate OOo.
private void terminate()
               setVisible(false);
               com.sun.star.frame.XDesktop xDesktop = null;
               try {
                    xDesktop = aBean.getOOoDesktop();
               catch ( com.sun.star.comp.beans.NoConnectionException aExc ) {} // ignore
               aBean.stopOOoConnection();
               stop();
               if ( xDesktop != null )
                    xDesktop.terminate();
               System.exit(0);
* An ExitListener listening for windowClosing events
class ExitListener extends java.awt.event.WindowAdapter
* windowClosed
* @param e A WindowEvent for a closed Window event
public void windowClosed( java.awt.event.WindowEvent e)
               close();
* windowClosing for a closing window event
* @param e A WindowEvent for a closing window event
public void windowClosing( java.awt.event.WindowEvent e)
((java.awt.Window)e.getSource()).dispose();
public static void main(String args[])
java.awt.Frame frame = new java.awt.Frame("OpenOffice.org Demo");
OOoBeanViewer aViewer = new OOoBeanViewer();
frame.setLayout(new java.awt.BorderLayout());
frame.addWindowListener( aViewer.new ExitListener() );
aViewer.init();
aViewer.start();
frame.add(aViewer);
frame.setLocation( 200, 200 );
frame.setSize( 800, 480 );
frame.show();
}

Similar Messages

  • JavaBean with Oracle Forms

    How can I JavaBean with Oracle Forms 10g. I attempting to use graphics (Aircraft Image created using SVG) interactively with Oracle forms. Any sample code to lead me in the right direction would be helpful.

    How can I JavaBean with Oracle Forms 10g. I attempting to use graphics (Aircraft Image created using SVG) interactively with Oracle forms. Any sample code to lead me in the right direction would be helpful.

  • Incompatibility with Oracle Forms and Oracle JInitiator (1.3.1.22)

    Hello,
    I've detected a problem that I don't know how to solve or if it's in my hands to solve it.
    In my company we're using a SAP EP as intranet and it is the default web page when we open the Internet Explorer.
    The problem is that since we use the SAP EP as home page, when I try to open the url of an application delveloped with Oracle Forms (It's like a ritch client developed in Java. The first time you execute it, it installs the Oracle JInitiator and then it runs the aplication locally every time you call the web) it doesn't work. It shows a connection error (FRM-92102), but it seems that there is a problem with the JVM.
    If you open the Internet Explorer (or Firefox) with other page as home page, then the application works correctly and without any problem, but if I open it after opening our SAP EP (or other link SDN, ...) it doesn't work.
    Does anyboy know how to solve it or if is it possible to solve it?
    Any help will be welcome...
    Thanks in advance and best regards,
    jc!

    Hello,
    I solved the problem applaying SAP Note 791765 (Mixed JSESSIONID Cookies from Different Servers)... I followed this steps:
    1. I opened Visual Administrator
    2. I went to servlet_jsp
    3. I changed the property JSESSIONID.CookieDomain value from SERVER to NONE.
    4. And I restarted the J2EE.
    After that, JSESSIONID cookie is stored for the fully qualified name of the J2EE and it doesn't interferes in other domains...
    Thanks anyway and regards.

  • Interaction between BSP and SAP GUI

    Hello all,
    I am having trouble with interaction between BSP and dynpros:
    I have a dynpro with a container where a BSP is shown.
    I would like to be able to return a value from the BSP to the control program of the dynpro.
    Any ideas of how to do it?
    Thanks a lot!
    Helpful answers will be regarded.

    Hello both,
    thank you for your replies, but I am still not able of performing this.
    I have tried using GET/SET parameters but it is not working, I get no parameter (perhaps I am not using the sentences correctly or in the correct place).
    I have also tried the code of demo program SAPHTML_EVENTS_DEMO and I think I cannot do it, I explain it a bit more:
    I have a button on my  BSP with some code programmed on event OnInputProcessing to be executed, and at the end I would like to return one value to the control program of the dynpro.
    But if I set the html form of the BSP as action:SAPEVENT, the bsp code is not executed...
    Am I doing something wrong?
    Thanks!!

  • Integrate Sharepoint 2007 with Oracle Forms

    Hi,
    Is it possible to integrate Microsoft Sharepoint 2007 with Oracle forms 10g and above ? If so, is it the same way we integrate Word/Excel?
    Please give some tips.
    Regds,
    noneda

    Yes it is possible.
    It's different than Word/Excel, it's more like integrating a website into your form, theoretically you can also exchange data between the sharepoint and Forms/Oracle database.
    Tony

  • How to define the tab space in the PL/SQL editor with Oracle Forms 4.5?

    When I use the PL/SQL editor with Oracle Form Builder, I found the tab space is very long that affects my programs readability quite a lot. Then, I tried to use Textpad to type my program. It looks fine with Textpad. However, when i tried to 'cut and paste' my code back to the PL/SQL editor, all tab spaces (approx. 8-character) are detected and the program looks awful again ~~ Would any one help me to solve my mentioned problem?
    Thanks for any advices!

    In 4.5 you cannot change this. In Forms 5.0 and above there is a registry value DE_PREFS_TABSIZE which allows you to set a value for the tabsize.

  • Integrate Business Activity Monitoring (BAM) with Oracle Forms Recognition

    Hi All,
    As per project requirement, I have to integrate Business Activity Monitoring (BAM) with Oracle Forms Recognition.
    Does anyone have an idea how can this be achievable from OFR Verifier?
    Thanks,
    Moumi.

    Hi All,
    Apart from my previous queries, I found that there is an sample reporting program - Oracle Application Express application has been developed and tested using version 4.1 of AppExpress.
    To access OFR tables I run the below script in below sequence in my local IPM environment as found in this link- http://workplacedba.blogspot.in/2012/11/ofr-odc-installation.html
    Seq 1 - 01-OFR-AP-Tables_Oracle.sql
    Seq 2 - 02-OFR-AP-Reporting_Oracle.sql
    Seq 3 - 03-XX_ROUND_IT.fnc
    Seq 4 - 04-XX_ROUNDDOWN.fnc
    Seq 5 - 05-XX_ROUNDUP.fnc
    Seq 6 - 06-OFR-AP-EBS-Views.sql
    Seq 7 - 07-INVOICE_NUMBER_FORMATS_INS.sql
    Seq 8 - 08-Insert Into Company.sql
    I couldn't found the below queries in my installables -
    Seq 3 - 03-XX_ROUND_IT.fnc
    Seq 4 - 04-XX_ROUNDDOWN.fnc
    Seq 5 - 05-XX_ROUNDUP.fnc
    Seq 7 - 07-INVOICE_NUMBER_FORMATS_INS.sql
    Seq 8 - 08-Insert Into Company.sql
    can anyone provide me these sql scripts?
    Thanks,
    Moumi

  • Using jfreechart with oracle forms 11g

    Hi everybody,
    I'm using jfreechart with oracle forms 11g to continue having graphs in my application since i'm migrating from forms 6i. I've already got it working and it's great. Just have one problem left. I don't know how to change the axis labels. In Bar charts, it comes with "Values" in y axis and "Category" in x axis by default. I wanted to change that or make it dissapear. Anyone knows how to?

    I've never used the jFreeChart, but according to their website you can use the "setLabel" method to set the label for an axis. Check out Axis (JFreeChart Class Library) for more information.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to connect to SQL server 2000 with Oracle Form

    Hi,
    I'm looking for the document of how to connect "SQL Server 2000" with Oracle Form 6i. Anyone knows that?

    Shay or other knowledgeable folks,
    Is there a way to utilize the wizard for "Business Tier > ADF Business Components > Business Components from Tables" for SQL Server 2000, 2005 or 2008. I can successfully execute sql via java programmatically or import a table from SQL Server with "Business Tier > ADF Business Components > Entity Object" wizard, but the Business Components from Tables simply doesn't see any tables under any schema. Without the "Business Components from Tables", i don't get the referential constraints imported into the application and to code all those from scratch is just not as elegant. So far i have only utilized the sql server jdbc driver from Microsoft (versions, 1.1, 1.2 and 2.0). Is there an alternative client that i need to use to enable selecting tables from that "Business Components from Tables" wizard. Is this a limitation of SQL Server, the jdbc driver or the wizard itself? Did anybody else experience the same issues? I am using Jdeveloper 11.1.1.0.1 against SQL Server 2005 (currently)
    Thanks,
    Andy

  • Display blob file with oracle forms

    I need to display an image file with oracle forms.
    can any body tell me how to do this ?
    Thanks

    How to do this is dependent on which version of Oracle Forms you are using. Please let us know what version (eg; 10.1.3.x.x not 10g) of Oracle Forms you are using and how your application is deployed (Client/Server or web). If web, what is your Java version?
    Craig...

  • Diff between Integer and Number in Oracle

    Hi,
    What's the differet between integer and number in Oracle?

    u can say integer is a subset of number.
    integer provided by oracle for compatability with ANSI/ISO
    u can use number with scale=0 to represent integer values.

  • Rightfax Integration with Oracle forms

    We have Rightfax 9.3 integrated with our application running on Oracle forms 6i.
    We are plaaning to upgrade to Oracle forms 10g.
    We need to understand that if RightFax 9.3 can be configured with Oracle Forms 10g
    Also, is the invocation for RightFax dependent only on Oracle Forms and not dependent on the Windows Operating system installed on the server?
    Please help

    Thanks for the replies..
    I would need some more information.
    1 Right fax is already installed on windows server.
    Will we need upgraded drivers to configure right fax 9.3 with oracle 10g
    2. Will this require any kind of customization in rightfax configuration.
    3. Will this be a one to one fullfilment
    Request you all to help us on this.

  • Connectivity Oracle Lite DB with oracle forms

    Hi,
    Can we connect oracle lite db with oracle forms and report? If possible then ,please tell us how to..
    Thanks

    hi
    please try to provide full informations what is your forms version and OS?
    sarah

  • Can we use WebUtil with Oracle Forms 6i

    Can any one tell me if we can use WebUtil with Oracle Forms 6i..I have 11.5.9 instance of oracle apps and i want to use some features of WebUtil to customize one of seeded Oracle Form.
    Any pointers in this regard are quiet welcome.
    Thanks,

    Strictly speaking no...however you could "backport" the webutil code and in theory you could get some of the functionality to work - this is not supported in the context of oracleForms although Oracle Applications may have their own specific solution/certification of this.
    Regards
    Grant Ronald

  • Another Problem with Oracle Forms 10G

    Hi Experts;
    Previously I posted here a problem was having with Oracle Form, when I tried to execute it (Internet Explorer has closed this webpage to help protect your computer. A malfunctioning or malicious add-on has caused Internet Explorer to close this webpage) .
    However, with the help of a good Buddy of this forum, I could solved the problem and my forms were running properly. But today, i don't know how it's giving me a new problem. When I choose Run Form, I get this error (website restore error. Internet Explorer has stopped trying to restore this website. It appears that the website continues to have a problem.)
    Any suggestion to solve this problem?
    Thanks for your help.
    Regards
    Al

    Hi Aamir;
    I didn't upate file, but I don't know how, but last sunday the google toolbar was installed. I removed it already yesterday, but now I got this problem, I don't know if the installation and then, removing this toolbar, updated any important file.
    The thing is, now I can not execute my forms.
    Regards;
    Al

Maybe you are looking for