Passing array from JS to method of applet

There is unable in IE pass array of values from javascript to method of applet, but in Mozilla it's working fine. In IE i have got exception:
Exception:
java.lang.Exception: setTest{0} :no such method exists
     at sun.plugin.com.JavaClass.getMethod1(Unknown Source)
     at sun.plugin.com.JavaClass.getDispatcher(Unknown Source)
     at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
     at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
java.lang.Exception: java.lang.Exception: setTest{0} :no such method exists
     at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
     at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
JavaScript code:
var testArr=[];
    testArr[0]=1;
    testArr[1]=2;
    testArr[2]=3;
    document.sync.setTest(testArr);
Applet method:
public void setTest(Object[] test){
        System.out.println("Test "+test.length);
        for (Object o: test){
            System.out.println(o.toString());
    }How do passing in IE?

yes, MAYSCRIPT just allow to call methods. but as i know it's unable to pass simply array from js to applet and from applet to js. so i convert array of values to String and in applet i use StringTokenizer to parsing. Thanks. ;)

Similar Messages

  • URGENT: Passing Array from JSP to a Stored Procedure

    Hi,
    Can some one please help me understanding how can I pass array from JSP page to a stored procedure in database.
    Thanks in advance.
    Jatinder

    Thanks.
    I tried ArrayExampla.java and was successful in passing array values to the stored database procedure.
    How can I use this class in JSP? Like I have first JSP where in I will collect input from the user and then submit it to the second JSP - that needs to call the ArrayExample.java to pass the values as array to the database.
    How should I call this java code in my second JSP?
    Thanks in advance.

  • Pass arrays from Java to PL/SQL procedure.

    Hi All,
    Can some body give an example, where an array of strings is passed from java to a PL/SQL procedure.
    Any help in this regard is appreciated.
    Thanks,
    Prashant

    Kiran Kumar Gunda wrote:
    I would want to use Oracle provided (Oracle Extensions) API to pass arrays to PL/SQL
    procedure from Java. I am using weblogic connection pool, but the 'createDescriptor'
    method donot allow Pooled connection. So I have taken Physical Connection by casting
    to 'WLConnection'. Now, weblogic strongly suggest NOT to use this,as pooling capabilities
    will be disabled.
    But by setting RemoveInfectedConnectionsEnabled to false, we can ask weblogic
    to return the Physical Connection to Pool. I have tested this with the attached
    code. I DON'T find any issue.Good. The only real risk to obtaining the physical connection is retaining and
    using it beyond the current thread execution. Your code looks OK. The only thing
    I'd suggest is to add to the finally block. I would put a separate try-catch-ignore
    block around every action in the finally, so if one fails, the others are still
    done.
    As long as you're writing good JDBC like that, there is no risk to telling the
    pool to trust the code, by setting RemoveInfectedConnectionsEnabled to false.
    That way you'll retain all the performance of the pools.
    Joe
    >
    I want your opinion in this, so that I will be confident in using this feature
    in our application.
    Note : Please look at the sample code that I am using. I AM NOT GOING TO USE PHYSICAL
    CONNECTIONS for normal operations. I will use Physical Connection only when I
    want to pass Arrays to Oracle.
    Thanks
    Kiran

  • Passing Array from Class to JSP

    Hoi all,
    I am using MyEclipse Tomcat 4.1 and MySql
    I am trying to pass a 2D array from my struts framework action class to the forwarding action JSP.
    the Array is filled correctly, I check that by printing the values of the array as they are filled by my ResultSet into my console.
    but when I pass the Array to my JSP the value is null.
    I did the following in the class:
    request.setAttribute("Aray",aray);     and in the JSP i request the Attrebute as follows:
    String[][] ary =  request.getParameter("Aray"); Any help will be appreciated thx .

    request.setAttribute("Aray",aray);
    String[][] ary = request.getParameter("Aray");
    See the difference?

  • ORA-00932 when trying to pass ARRAY from Java SP to PL/SQL

    Hi all
    I am trying to pass ARRAYs back and forth between PL/SQL and Java stored procedures. But I keep getting:
    ORA-00932: inconsistent datatypes: expected a return value that is an instance of a user defined Java class convertible to an Oracle type got an object that could not be converted
    Here's my PL/SQL:
    create or replace type CONTENTP.sentences_array as VARRAY(1000) of CLOB
    -- I've also tried .. as TABLE of CLOB and varray/table of VARCHAR2
    declare
    proc_clob CLOB;
    arr SENTENCES_ARRAY;
    begin
    SELECT document_body
    into proc_clob
    from documents
    where document_id = 618784;
    arr := processdocument.sentencesplit (proc_clob);
    end;
    PROCESSDOCUMENT package definition:
    CREATE OR REPLACE PACKAGE CONTENTP.PROCESSDOCUMENT AS
    FUNCTION sentenceSplit(Param1 CLOB)
    return SENTENCES_ARRAY
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.sentenceSplit(oracle.sql.CLOB) return oracle.sql.ARRAY';
    FUNCTION removeHTML(Param1 CLOB)
    return CLOB
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.removeHTML(oracle.sql.CLOB) return oracle.sql.CLOB';
    end;
    Java sentenceSplit code:
    public static oracle.sql.ARRAY sentenceSplit ( CLOB text) throws IOException, SQLException
    Connection conn = new OracleDriver().defaultConnection();
    String[] arrSentences = sent.getsentences ( CLOBtoString (text) );
    ArrayDescriptor arrayDesc =
    ArrayDescriptor.createDescriptor ("SENTENCES_ARRAY", conn);
    ARRAY ARRSentences = new ARRAY (arrayDesc, conn, arrSentences);
    return ARRSentences;
    I have confirmed that the String[] arrSentences contains a valid string array. So the problem seems to be the creation and passing of ARRSentences.
    I have looked at pages and pages of documents and example code, and can't see anything wrong with my declaration of ARRSentences. I'm at a loss to explain what's wrong.
    Thanks in advance - any help is much appreciated!

    I am trying to do something similar but seems like getting stuck at registerOutParameter for this.
    Type definition:
    CREATE OR REPLACE
    type APL_CCAM9.VARCHARARRAY as table of VARCHAR2(100)
    Java Stored Function code:
    public static ARRAY fetchData (ARRAY originAreaCds, ARRAY serviceCds, ARRAY vvpcs) {
    Connection connection = null;
         ARRAY array = null;
         try {
         connection = new OracleDriver ().defaultConnection();
         connection.setAutoCommit(false);
    ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", connection);
    String[] result = new String [2];
    result[0] = "Foo";
    result[1] = "Foo1";
    array = new ARRAY (adString, connection, result);
    connection.commit ();
    return array;
    } catch (SQLException sqlexp) {
    try {
    connection.rollback();
    } catch (SQLException exp) {
    return array;
    Oracle Stored Function:
    function FETCH_TRADE_DYN_DATA (AREA_CDS IN VARCHARARRAY, SERVICE_CDS IN VARCHARARRAY,VV_CDS IN VARCHARARRAY) return VARCHARARRAY AS LANGUAGE JAVA NAME 'com.apl.ccam.oracle.js.dalc.TDynAllocation.fetchData (oracle.sql.ARRAY, oracle.sql.ARRAY, oracle.sql.ARRAY) return oracle.sql.ARRAY';
    Java Code calling Oracle Stored Procedure:
    ocs = (OracleCallableStatement) oraconn.prepareCall(queryBuf.toString());
                   ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", oraconn);
                   String[] originAreaCds = sTDynAllocationVO.getGeogAreaCds();
                   ARRAY areaCdArray = new ARRAY (adString, oraconn, originAreaCds);
                   ocs.registerOutParameter(1, OracleTypes.ARRAY);
                   ocs.setArray (2, areaCdArray);
                   String[] serviceCds = sTDynAllocationVO.getServiceCds();
                   ARRAY serviceCdsArray = new ARRAY (adString, oraconn, serviceCds );
                   ocs.setArray (3, serviceCdsArray);
                   String[] vvpcs = sTDynAllocationVO.getVesselVoyagePortCdCallNbrs();
                   ARRAY vvpcsArray = new ARRAY (adString, oraconn, vvpcs);
                   ocs.setArray (4, vvpcsArray);
    ocs.execute();
    ARRAY results = ocs.getARRAY(1);
    Error I get:
    Parameter Type Conflict: sqlType=2003
    Thanks for help in advance.

  • Passing Array From Subreport to Main Report then Summing

    Hi,
    I am having troble passing an array from a sub report to the main repport.  I have managed to create the array, pass it and display it in the main report, however the first value of the array is displayed twice.  Here is the  formulae I have used:
    In the sub report:
    whileprintingrecords;
    shared stringvar str;
    str:=str{@value}","
    In the main report:
    whileprintingrecords;
    shared stringvar str;
    stringvar array arr;
    arr:=split(str,",");
    join(arr,",")
    Also, when I have managed to resolve the problem of the first value printing twice, I hope to change the array back to a number array and sum all of the values together.  I'm not too sure how to do this either.
    I hope you can help.
    Julie

    Ummm... Isn't Join(Split(str,","), ",") = str?  Why bother with the two extra lines of code?  Also, are you sure the subreport isn't creating the "duplicate first value"?  (I.e.  The data has the same value on two records, so it's being added twice?)
    Also if you're looking for the sum, why not create another shared variable and sum the value in the subreport as you're building the array (assuming you need the array for other purposes)?
    HTH,
    Carl

  • Help with passing parameters from a servlet to an applet

    dear all
    i m working on a application which will check weather a file is present in a server (webserver) if it is present then it will take the file name and put it into a drop down list and there is a button on click of which i m taking the call to an applet and then on that i need the file name if it is there then i use it to draw a graph
    i m struck on how to take parameter from Servlet -> Applet
    thanks
    Nakul

    hi,
    I understood your question,The context "servlet" cannot communicate to
    an applet becoz applet runs at clients browswer, rather you can communicate from an applet to servlet(HTTPURLCONNECTION class).
    Well coming to the problem, this is how i have understood your problem,
    basically uou get the list of files from the server using normal servelt programing and you will display in an html LIst box and then click the button to view the graph or chart ,
    then you just want to pass the filename which is there in the listbox to an applet and applet will display some image.
    As we know all that using <PARAM NAME=XX VALUE=YY> WE CAN GET THE VALUE IN APPLET BY USING GETPARAMTER() METHOD. and Im very sure that you are not asking that question. your question is like " both the applets and
    the listboxes will be loaded at once and when he selects one of the file from the list box then without refreshing the page , how to display the graph.
    Im i right?
    If so i guess you have to use javascript to do that stuff, and i think its like gave an id for the tag shown <applet id="yes">
    then in the javascript , you can call the Java applet methods (I have never tried before but seen some demos(i dont have that links- google it for inf))
    but i can give clue like.. trying the <PARAM VALUE=""> IF POSSIBLE
    CHAING THE HTML CONTENT IS POSSIBLE IN IE which is again through javascript by calling yes.innerHTML="<PARAM><PARAM><PARAM><PARAM>..."
    Im sure that you can call Java methods from javascript but i never tried and even you can pass an arguments to it.. Let me check out like
    becoz even im interested to know abt it
    bye
    with Regars
    Lokesh T.C

  • Passing array to ActiveX object method

    I need to pass the array by pointer as a parameter into method of an ActiveX object. More detailed - to ActiveX/COM object which represents the arbitrary waveform generator hardware.
    How it is possible to do in LabView?
    Thank you!

    There is declaration of COM method I need to use:
    [id(15), helpstring("method SetData")]
    HRESULT SetData([in] DOUBLE* newVal, [in] ULONG length, [in] USHORT MBIndex, VARIANT_BOOL bUpdate).
    The main important psrsmeters is newVal and length.
    Unfortunately I can not wire an array to NewVal.
    There is a screenshot from LabView in the attachement...
    Attachments:
    array_to_COM.jpg ‏17 KB

  • Passing array from java stored procedure to plsql

    I have a java store procedure that is parsing an xml document and returning element values to my plsql application(8.1.7). I'm mapping a java.lang.String return type to VARCHAR2. However I'm running into the 4k limit when trying to return a string from java that is over 4k. Truncation of varchar returning over 4k is a known issue in 8i.
    So my next idea was to split that value of the element into 2000char and put in an array then pass that back to the plsql procedure. I know that oracle.sql.ARRAY can be converted into a plsql TABLE. But I believe you can only use the oracle.sql.ARRAY type when you are doing jdbc programming and are working with a connection.
    SO FINALLY MY QUESTION IS...
    Can anyone think of a solution that will allow me to pass over 4k of character data from my java stored procedure (not jdbc), back to my plsql app?
    Thanks.

    My understanding is that oracle 8 has a 4k limitation on any plsql function return data. A varchar can hold 32k within a function/package, but it cannot return more than 4k outside it's scope.
    Do you have an example you could share where you use the clob as a return type?
    Thanks!

  • Passing array from one servlet to other

    I got values from jsp to servlet and i am storing them to
    String[] test = req.getParameterValues("testOne");
    Now i need to use redirect
    req.sendRedirect("/servlet/myapp?test="+test);
    Not working. Why?

    String[] test = req.getParameterValues("testOne");This code creates a String array with 0 or more entries depending on the number of "testOne=" parameters in the request.
    req.sendRedirect("/servlet/myapp?test="+test);The +test results in test.toString() on an array which will be some sort of class description, not the values in test.
    What are you trying to do here? Do you want the servlet to process the same request, in which case why not use forward instead of reDirect?
    If you must use reDirect and want to pass the test array to the servlet, you could add it as a session attribute. If you really insist on using the param string, try:
    String s = "/servlet/myapp?";
    for (int k = 0; k < test.length; k++) {
        s += "test=" + test[k];
    }This will pass as many "test" parameters as there were "testOne" parameters.

  • Passing arrays from matlab to vi-controls by activex

    Dear specialists,
    I am trying to set an array of doubles that is defined as a control in my VI by using:
    invoke(VIhandle, 'SetControlValue', mlarray)
    where mlarray is defined in Matlab as an 1xn array of doubles.
    error: ??? Dispatch : Exception occurred
    in routine: actxcli
    Reading an indicator array in the VI by 'GetcontrolValue' works fine.
    Also passing non-array variables works fine.
    How should I define my array in Matlab/Labview to make it work ?

    I do not have a copy of Matlab but I can help you search the web. Is your error from windows, matlab, or labview? I could find nothing on NI's site for actxcli. Is this the exact error message?

  • Passing Parameters from JavaScript to method in backingbean

    Hi,
    I use JDev 11.1.1.2.0
    I want when I press a button I call a javaScript function, This function get IP Address and Mac Address of the client machine and send it to the method in backingbean.
    How can I get the IP Address and Mac Address and send it to the method in backingbean?
    Thank You...
    Sameh Nassar

    Thank you Arunkumar.
    I get the Mac Address by this method
    function call(event) {
    var source = event.getSource();
    var obj = new ActiveXObject("WbemScripting.SWbemLocator");
         var s = obj.ConnectServer(".");
         var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
         var e = new Enumerator (properties);
            var mac;
         while(!e.atEnd())
              e.moveNext();
              var p = e.item();
              if(!p) continue;
              if(p.Caption == "[00000008] Intel(R) PRO/100 VE Network Connection"){
                                        alert(p.MACAddress);
                                        mac=p.MACAddress;
                                        break;
    AdfCustomEvent.queue(source,"callServer",{sa:mac},false);
    }and the passing the parameters working fine.
    Thank You...
    Sameh Nassar

  • How to pass value from EXIT to method

    Hi friends
    1)  My requirement is that when the person change the amount field in TRIP t-code i need to send a mail to the manager. So i found a exit FIT0002 here when ever the traveler change the amount i am setting the flag as x when he change and y when no amount is changed in exit. I did export to memory id and in my method i did import from memory id. But this is not performing gud. If at a time many users apply the trip and changes the advance the flag is not getting set. I checked in the log. No flag is set its empty no x nor y. After clearing the buffer SWU_OBUF. Again all the users applied the trip then the flag is set and every manager got the mail. But why this is happening?. Is there any other way to achieve it. I want to get the flag value to my method. Is there any other work around.
    2)  I tried with SAP_WAPI_WRITE_CONTAINER directly getting the value and writing to the workflow container its not correct way since i need to write commit work. But the exit itself does commit.
    3) I tried with SET/GET parameter but i don't no how to divert my flow from my method to exit when i use SET/GET parameters.
    Can any one throw some light on this issue.
    Regards
    vijay

    If you are able to get the workitem ID then try to use the below code snippet and check because even Iam setting some value back to the workitem container
    DATA :
          w_wiid      TYPE             sww_wiid     VALUE   'XXXX',
          w_ref       TYPE REF TO      if_swf_run_wim_internal,
          w_ref_cnt   TYPE REF TO      if_wapi_workitem_context,
          w_wi_ref    TYPE REF TO      if_swf_ifs_parameter_container,
          ls_agent    TYPE             swr_wihdr.
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = w_wiid
          RECEIVING
            re_instance = w_ref.
      CATCH cx_swf_run_wim_enq_failed .
      CATCH cx_swf_run_wim_read_failed .
      CATCH cx_swf_run_wim .
    ENDTRY.
    CALL METHOD w_ref->get_workitem_context
      RECEIVING
        re_ctx = w_ref_cnt.
    CALL METHOD w_ref_cnt->get_wi_container
      RECEIVING
        re_container = w_wi_ref.
    TRY.
        CALL METHOD w_wi_ref->set             " Setting the Value Back to WORKITEM CONTAINER
          EXPORTING
            name       = lc_result
            value      = lv_value       
          IMPORTING
            returncode = lv_return.
      CATCH cx_swf_cnt_cont_access_denied .
      CATCH cx_swf_cnt_elem_access_denied .
      CATCH cx_swf_cnt_elem_not_found .
      CATCH cx_swf_cnt_elem_type_conflict .
      CATCH cx_swf_cnt_unit_type_conflict .
      CATCH cx_swf_cnt_elem_def_invalid .
      CATCH cx_swf_cnt_container .
    ENDTRY.

  • How to Pass array from one form to another

    Hello Everyone,
    I have an array defined like this ....
    type array_type IS table of varchar2(4000) index by binary_integer;
    v_arr array_type;
    When I pass it next form I accept it like this...
    eEmail          IN owa_util.vc_arr     
    that works fine, as fas as user picked something......If user didn't pick anything....the form explodes....
    How can I do error handling by doing this....
    courses          IN owa_util.vc_arr          DEFAULT NULL
    as DEFAULT NULL doesnt work in case of an array....
    Thanks,
    Harsimrat

    and there is a fourth way in the database.
    Create a package with those variables in the package-spec you wish to transfer. Then create set- and get-functions on this structure.
    With this technique you can pass not only scalar-values - you can pass complex structures and a full set of data through an array for example

  • PASSING PARAMETRE FROM REPORT TO METHOD

    Hi frnds ,
    I want to pass 2 things from my report to the bus obj .
    1 is the key field which i a using but i dont know how to pass another parametre as date to the business object .
    Plz Help
    Thansl

    HI FRNDS,
    Actualy i want the selection screen date which the user is gng to entre and i am already using a fm to trigger the event like this
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          OBJTYPE           = 'BUS2000113'
          OBJKEY            = P_G_OBJKEY
          EVENT             = P_0550
        IMPORTING
          EVENT_ID          = G_EVENT_ID
        EXCEPTIONS
          OBJTYPE_NOT_FOUND = 1
          OTHERS            = 2.
    Edited by: ROHIT GUPTA on Mar 14, 2008 4:08 PM

Maybe you are looking for

  • Strange stiching white lines in placed images...

    Hi, I'm having some problems with Illustrator CS2. When i place a .PSD file (1 layer, photo, transparent background) with 300 dpi / CMYK 8bit into my main page, i get these strange stitching white lines over the image. Not only that, but after workin

  • Email Server Set up

    Ok, I'm not new to Macs but I am new to setting up the emai service.  I just took the Server Essentials course and learned how to set up an email server using OS X but I am unable to take what I've learned and use it in our environment.  A little bac

  • Areca 1680 SAS Raid

    Hello all In my previous post i clarified much of doubts i have on mac pro raid capabilities thanks to this forum. I still have a question: if i buy the Areca 1680 sas raid controller, that is bootable via firmware upgrade, how can i install macosx o

  • HI Please help on specific IDOC for VK13

    Hi When executing the VK13 transaction there is a step where there is a pop-up specifying the MESSAGE TYPE = COND_A logical message type By default it is COND_A.  has anyone been able to to use other message type example a ZCOND_A message type. so as

  • Unload an SWF?

    I'm trying to unload an SWF that has been loaded by the following code, but can't get it to work. This code loads the SWF and works fine: btn1.onRelease=function(){ myContainer.loadMovie("LibraryBooks.swf"); gotoAndStop("35b"); This is the code I'm t