Pass array of value to Oracle Java Beans (for forms)

Hi,
How I can pass a array value from oracle Form to Java bean.
With regards
Satheesh Kumar

Hi,
Thanks for your immediate response.
I have one more doubt. I am trying to create a Hirachical tree for form using Jtree. For dynmically populating tree data I want to pass array records from oracle forms.
In my understanding, Java importer array will work if we do importing the java beans component to oracle forms, otherwise no.
Is it possible I can pass array variable with out importing my javacomponent.
With regards

Similar Messages

  • I tried Oracle Java Bean for getting client IP but keep getting 127.0.0.1

    We implemented Oracle Java Bean demo that reads client
    information as we need to know the IP address of the client.
    Everything works fine except that we keep getting the loopback
    address (127.0.0.1) instead of the client IP address.
    Any advice?

    I figured out what was happening and thought I should post the resolution in case it helps someone else.
    I have both the original ToyStore app and my new app running against the same schema. Fine so far, since they don't use the same table names and this is just for early development.
    The problem comes because they also use the same schema for maintaining the "Stateful" release mode. So they were both accessing the PS_TXN table to maintain state. For some reason, this worked for a while, but started failing yesterday. Clearing out the PS_TXN table when switching apps solved the problem.
    Clearly the admonition to use a separate schema for the internal connection used by the state management logic is a wise one! :-)
    Dennis

  • How to read the current value of hyperlink java bean in multiple record,

    I have used a java bean for a multi-record block item. On When-new form-instance I m using fbean package as follows
    FBean.Register_Bean(hHyperlink,1,'oracle.forms.demos.beans.Hyperlink');
    FBean.Invoke(hHyperlink,1,'setURL','Abc_Entry');
    FBean.Invoke(hHyperlink,1,'setLabel','Abc Document');
    FBean.Enable_Event(hHyperlink,1,'actionListener',true);
    You can see that I am using the number 1 which is hardcoded,for which I will replace with a incremental loop and remove it. Now when I m using the When-Custom-Item-Event, I want to read the URL for the current instance.
    I m using
    vcEventData := Fbean.Invoke_Char('CONTROL.HYPERLINK',2,'getURL');
    to get the second record value , where in I want to avoid the hardcoded 2 or 1
    Thank you

    I recommend you these forums for your question:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » JVM
    Java in the Oracle Database
    Forums Home » Oracle Technology Network (OTN) » Technologies » Java » Java Server Pages (JSP)
    Java Server Pages (JSP)
    Forums Home » Oracle Technology Network (OTN) » Technologies » Java
    http://forums.oracle.com/forums/index.jsp?cat=24
    Joel Pérez

  • Embedding Java bean in Forms 6i

    Hi,
    Can anybody guide me to embed java bean in forms 6i . I need steps to embed. I tried the steps given in oracle site for KnobBean steps are confusing. Can anybody pls help me
    thanks in advance
    Ilam

    Hi
    Following is the result of Jinitiator Java Consol.......
    Oracle JInitiator version 1.1.8.19
    Using JRE version 1.1.8.19
    User home directory = C:\Documents and Settings\Administrator
    JAR caching enabled.
    Cache directory: C:\Program Files\Oracle\JInitiator 1.1.8.19\jcache
    Maximum cache size: 50000000 bytes
    Opening http://202.163.88.194:6777/forms60java/f60all_jinit.jar no proxy
    Loading http://202.163.88.194:6777/forms60java/f60all_jinit.jar from JAR cache.
    Opening http://202.163.88.194:6777/forms60java/java/awt/KeyboardFocusManager.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/forms/engine/MainBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/sun/beans/infos/MainBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/ewt/swing/JBufferedAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/sun/beans/infos/JBufferedAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/ewt/lwAWT/BufferedAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/sun/beans/infos/BufferedAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/ewt/popup/PopupAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/sun/beans/infos/PopupAppletBeanInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/forms/registry/Registry.dat no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/forms/registry/default.dat no proxy
    proxyHost=null
    proxyPort=0
    connectMode=HTTP
    Forms Applet version is : 60821
    Opening http://202.163.88.194:6777/forms60java/oracle/forms/demos/GetClientInfo.class no proxy
    Opening http://202.163.88.194:6777/forms60java/oracle/forms/demos/Utils.class no proxy
    Regards
    Laila Mac

  • Java Bean for Marquee or scrolling text

    Can anybody help to make the simple java bean for scrolling a text in ORacle forms 10g?
    Regards
    Omama Khurshid

    Please help me and send it to my mail.
    [email protected]

  • Printing Java Bean through Forms

    I want to be able to print the contents of a Java bean through forms. Preferably through a popup on right click. Does anyone know how i can do this?
    It is the BI Graph example given through oracle.
    Thanks

    Hi,
    I'd like to be able to do the same thing ... did you find a solution?
    Steve

  • Create Java bean for a http session

    how can i create a java bean for an http session. also is it possible to access it from another java class within that session

    Try the following forum (about JSP technology)
    http://forum.java.sun.com/forum.jspa?forumID=45

  • Java beans for calendar utility

    Hii Javaities
    I need to have calendar in my jsp for choosing dates
    Earlier i was uisng javascript for calendar but now i want to use Java beans .
    Can i use Java beans for calendar ?
    Are there any tag libraries for tht ?

    PDAs ? hmm...sounds interesting
    what technology have u thought of using for your application ?
    java microedition ...[certainly not c++ or .net] ?
    Is it going to be a stand alone application on a PDA .
    OR
    Are you thinking of wireless internet connectivity to the PDA? In this case your application might have to be designed strickly so that it fits the screen size.
    How about a tablet PC? It good for mobile computing and is handy too.
    See this link for tablet PC
    http://www.motioncomputing.com/

  • Image not displayed in pdf generated using Java API for Forms service

    Hi,
    I am creating a pdf document using Java API for Forms Service.
    I am able to generate the pdf but the images are not visible in the generated pdf.
    The image relative path is coming in the xml as defined below. The images are stored dynamically in the Livecycle repository each time a request is fired with unique name before the xml is generated.
    <imageURI xfa:contentType="image/png" href="../Images/logo.png"></imageURI>
    Not sure if I need to specify specify specific URI values that are required to render a form with image.
    The same thing is working when I generate pdf document using Java API for Output Service.
    As, I need to generate interactive form, I have to use Forms service to generate pdfs.
    Any help will be highly appreciated.
    Thanks.

    Below is the code snippet:
                //Create a FormsServiceClient object
                FormsServiceClient formsClient = new FormsServiceClient(myFactory);
                //Specify URI values that are required to render a form
                URLSpec uriValues = new URLSpec();
                                  // Template location contains the whole rpository path for the form
                uriValues.setContentRootURI(templateLocation);
               // The base URL where form resources such as images and scripts are located.  Whole Image path is passed in BaseUrl in the http format.
                      String baseLocation = repositoryPath.concat(serviceName).concat(imagesPath);   
                                  uriValues.setBaseURL(baseLocation);                                        
                // Set run-time options using a PDFFormRenderSpec instance
                PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
                pdfFormRenderSpec.setCacheEnabled(new Boolean(true));           
                pdfFormRenderSpec.setAcrobatVersion(com.adobe.livecycle.formsservice.client.AcrobatVersio n.Acrobat_8);
                                  //Invoke the renderPDFForm method and write the
                //results to a client web browser
                String tempTemplateName =templateName;
                FormsResult formOut = formsClient.renderPDFForm(tempTemplateName,
                                              inXMDataTransformed,pdfFormRenderSpec,uriValues,null);
                //Create a Document object that stores form data
                Document outputDocument = formOut.getOutputContent();
                InputStream inputStream = outputDocument.getInputStream();

  • Passing array of timestamps into oracle stored proc

    Hey there,
    I have an interesting problem. I need to pass an array of java.sql.Timestamp into a stored proc.
    I see that the PreparedStatement provides a setArray() method which takes as arguments an int, java.sql.Array
    Anybody know how I can use the java.sql.Array to my advantage here ? Basically, I don't see how I can create a java.sql.Array of Timestamps
    thanks in advance for all your help.
    Manish Mandelia

    The java.sql.Array implementation is provided by your jdbc driver.
    For exemple using Oracle you can obtain an sql.Array with something like this :
    Connection con=getConnection() // get a connection to the DB
    //first declare what type of array you will use in the DB
    // you probably want to replace CHAR(7) by Timestamp here
    PreparedStatement createArray=
    con.prepareStatement("CREATE OR REPLACE TYPE MYARRAY AS VARRAY(100) OF CHAR(7)");
    createArray.execute();          
    //then get an java instance of this Array
    oracle.sql.ArrayDescriptor arrayDescriptor = oracle.sql.ArrayDescriptor.createDescriptor("MYARRAY",con);
    // content is used to fill the Array
    String[] content= {"string0", "string1"};
    java.sql.Array sqlArray=new oracle.sql.ARRAY(arrayDescriptor, con, content);               
    // then call your stored procedure
    java.sql.CallableStatement callStmt=con.prepareCall("call MyStoredProcedure(?)");
    // passing the array as an argument
    callStmt.setArray(1,sqlArray);
    callStmt.execute();
    As you can see the code is quite database specific.
    hope that helps.

  • Can we Return values from Java Bean to Form

    Hi All,
    I have a Bean area defined on a Form. The Bean Area consists of a Text field which gets populated by path of a file selected using Browse button.
    Can I return this path as a parameter from the Java Bean to the form? Is there any function for this?
    Regards,
    Prathima.

    If you designed your bean to offer the ability to exact info/data from it, then yes you can get a value from the bean into the form (pl/sql) - using Get_Custom_Property
    Refer to the following which is a good example of how to build a bean. Specifically look at page 12 where is shows how to use Get_Custom_Property.
    This is NOT an Oracle supported or provided document or web site, but it is a very good example.
    http://forms.pjc.bean.over-blog.com/ext/http://sheikyerbouti.developpez.com/forms-pjc-bean/first-bean/first_bean.pdf

  • Passing array of values from front panel to menu

    I am working with a group programming a multichannel current stimulation device and we are currently having trouble setting up the run time menu. The burning question that we have is trying to figure out how to pass an array of values from the front panel to the menu that we are setting up in the block diagram, any advice?
    Thank you

    Take a look at this. Its just a simple menu update using a for loop. Uses whatever your values are as the item tag and item names. Remember, item tags need to be unique. This specifically goes under the sub menu of channel, which has to be created before.
    Attachments:
    menu.vi ‏12 KB

  • Passing radio button values to the backing bean

    Hi all,
    I need help with passing group of radio button values to a backing bean. I have page which has a dataTable to display a list of alerts. For each alert there are two radio buttons (YES & No) to indicate whether the email option for each alert is set or not. Now when i change the radio buttons and click on a submit button i should be able to pass these radio button values into action method in which i need to update the alerts. This is my code
    <h:form>
    <t:dataTable id="sub"
                       var = "alert"
                       value =#{subscriberBean.alertsList}">
    <t:column>
    <h:outputText value="#{alert.name}" />
    </t:column>
    <t:column>
    <h:selectOneRadio id="subscriptions" value="#{alert.sendEmail}">
      <f:selectItem id="item1" itemLabel="Yes" itemValue="0" />
      <f:selectItem id="item2" itemLabel="No" itemValue="1" />
    </h:selectOneRadio>
    </t:column>
    <t:dataTable>
    <h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" />
    </h:form>
    {code}
    I tried to to do something like below and get the updated list in the action event in the backing bean but it didn't work.
    {code}
    <h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" >
    <f:attribute name="alerts" value="#{subscriberBean.alertsList}"/>
    </h:commandButton>
    // Backing Bean
    public void updateAlert(ActionEvent e){
    List<Alert updateList = (List<Alert>)event.getComponent().
                    getAttributes().get("alerts");
    {code}
    Can someone advise how to get these update radio button values in my actionListener method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The value the user selected will be written to the sendEmail property of the managed bean named alert. We know this because you set the value attribute to #{alert.sendEmail}. So simply access the managed bean in your action method.

  • Implementing java beans in forms 10g [Problem]

    Hi All,
    I am trying to implement the java bean in the forms 10g
    I performed the following steps, but no luck.. Could anybody please help me in this?
    I have created a simple java class
    package mypackage1;
    public class MyClass
    public String GetString(String a)
    return a;
    Make a jar myjar.jar out of it.
    Copy this jar files in $ORACLE_HOME/forms/java directory
    and set the archive.jini parameter in formsweb.cfg to
    archive_jini=frmall_jinit.jar,Myjar.jar
    Created a simple form having one button, one textbox
    Set the implementation class property of text item to mypackage1.MyClass
    on button pressed trigger, I wrote
    set_custom_property('block2.text_item4',1,'GetString','Hello World');
    Ideally, on button pressed, it should show the text "Hello World" in the etxt box. But on button pressed nothing is happening and in java console on error is appearing.
    My java console output is
    Loading http://asst104253:8889/forms/java/frmall_jinit.jar from JAR cache
    Loading http://asst104253:8889/forms/java/Myjar.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Could anyone please tell me what I am doing wrong?? And how do I achieve this functionality??
    Please, any help appreciated !!

    Hi there
    The is plenty wrong with this code:
    1. MyClass is not extending VBean
    2. There is no public boolean setProperty(ID ID, Object args) method and no property IDs have been defined so set_custom_property('block2.text_item4',1,'GetString','Hello World'); will not execute anything
    3. If you're hoping to return values back from the bean, you need to define a custom event and associated ID.
    If you're just looking for some java code to return values in a similar manner as normal Oracle functions then you may want to consider using forms java stored procedures which are based on static java methods. Beans are really more for interaction type stuff with other applications.
    But any way if you want to do it this way (i.e. using beans) then at very least you class should look something like (Note, I have not compiled is so there may be a few errors):
    package mypackage1;
    import oracle.forms.handler.IHandler;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    import oracle.forms.engine.Main;
    import oracle.forms.engine.*;
    import oracle.forms.handler.*;
    public class MyClass extends VBean
    // initiating event id
    protected static final ID pgetString = ID.registerProperty("GetString");
    // return value id
    private static final ID preturnValue = ID.registerProperty("returnValue");
    // return event id
    protected static final ID preturn = ID.registerProperty("returnEvent");
    static IHandler mHandler;
    public String GetString(String a)
    // may do some string manipulation here.
    return a;
    public boolean setProperty(ID ID, Object args)
    if (_ID== pgetString)
    if (_args instanceof String)
    String myArg = (String)_args;
    mHandler.setProperty(preturnValue,getString(myArg));
    CustomEvent ce = new CustomEvent(mHandler, preturn);
    dispatchCustomEvent(ce);
    Keep your button as is and then to return the value back into forms place a WHEN-CUSTOM-ITEM-EVENT trigger on the bean area with something like this:
    DECLARE
         BeanValListHd1 PARAMLIST;
         ParamType NUMBER;
         EvenName     Varchar2(20);
         CurrentValue Varchar2(2000);
    BEGIN
         BeanValListHd1 := get_parameter_list(:SYSTEM.CUSTOM_ITEM_EVENT_PARAMETERS);
         IF :SYSTEM.Custom_Item_Event = 'returnEvent' THEN
              IF iD_NULL(BeanValListHd1) THEN
              MESSAGE('NO PARAMETER FOUND FOUND');     
              ELSE
              GET_PARAMETER_ATTR(BeanValListHd1,'returnValue',ParamType,CurrentValue);
              MESSAGE('IN CUSTOM EVENT THE STRING RETURNED IS '|| CurrentValue);
              END IF;
         ELSE
              MESSAGE('no value');
         END IF;          
    END;
    hope this helps
    Q

  • Help required in building up the Java Bean for an XML data

    Hi ,
    I want to build a Java bean which will actually represent an xml data . The class will be named as User and it will typically represent the data in the follwing xml:
    <user>
    <cwsId>barbete</cwsId>
    <firstName>William</firstName>
    <lastName>Barber</lastName>
    <status>true</status>
    <role>
    <roleCode>1000000177</roleCode>
    <roleName>Customer Administrator</roleName>
    </role>
    <language>en</language>
    <country>US</country>
    <preferences>
    <equipmentGroup>2717</equipmentGroup>
    <dateFormat>MON-dd-yyyy</dateFormat>
    <timeFormat>HH:MI AM</timeFormat>
    <timeZone>-12:00</timeZone>
    <daylightSavings>Y</daylightSavings>
    <location>NC</location>
    <recordsPerPage>10</recordsPerPage>
    <historyPeriod>3</historyPeriod>
    <distanceUnit>MILE</distanceUnit>
    <fuelUnit>G</fuelUnit>
    <unitIdDisplay>E</unitIdDisplay>
    <smuUpdate>W</smuUpdate>
    <countries>
    <country>
    <countryCode>GB</countryCode>
    <countryName>UNITED KINGDOM</countryName>
    </country>
    <country>
    <countryCode>US</countryCode>
    <countryName>UNITED STATES</countryName>
    </country></countries>
    </preferences>
    </user>
    Now for single child nodes like cwsId of the main user node i have kept properties like
    private String cwsId;
    But i am not sure as to how to represent the nodes which contain subnodes like "preferences"node. Any ideas?What is the standard practice?

    One thing you could do is create an object model first, which will contain all the data for your user.
    then all you need in the bean is a Hashtable with the name of the user as a key, and the user-object (which is actually the complete object model) as a value.
    with the XML stated by you, you would get an object model something like this:
    Class User
        String cwsid;
        String firstName;
        ArrayList<Role> roles = new ArrayList<Role>(); //I'm assuming a user can have more then one role.
        ArrayList<Country> countries = new ArrayList<Country>();
    class Role {
        String code;
        String name;
    class Country {
        String code;
        String name;
    }And so on for all the varioous elemets of your XML.

Maybe you are looking for

  • How to FIT media on DVD--time vs, compresion ratio.

    I have a huge wedding video that is gonna end up being 2+ hours. my part1 rendered out a QT at 9g........no wonder it kept stopping from burning a DVD. So how to we choose what format [MPEG 4 - AVI - QT] etc. ???? i tried an MPEG4 just guessing and i

  • Rendering Error! Please help

    I just recently purchased Final Cut Express 4 for a school project and it's giving me some rendering issues! When I am working on a project and try to render what I've done I receive this error: +"Error: The specified file is open and in use by this

  • Solve problem with activation my iphone 5 with server

    i can't activate my iphone 5 after install ios7 for the first time it give me message that is porblem with server many times

  • Can I create "variable array"?

    Is it possible to create an array of variables? Eg. if I have to 10 boolean control, called Switch1, Switch2... Switch10, and I need to switch one of them to ON, but which one to switch on depends on different situation. Say, at situation A, I need t

  • I can't locate an "advanced" tab in my Keynote to insert hyperlinks - any ideas onwhat might be wrong?

    The instructions said to click on the "wrench" looking tab, and click on "advanced" tools to insert hyperlinks into my presentations - there is no "advanced" tab showing up - any ideas of what might be wrong, or how to get to it?