Creating array of hidden inputs - APEX 2.2

Hi, all.
Thanks for all of your help with questions I've had so far.
I want to create an array of hidden inputs and put them into a collection on page submit. My intention is to create this array in JavaScript.
I realize I can probably just create a a bunch of inputs with names like "f01" and that they'll automagically end up in the corresponding collection. I wonder if there's a more elegant way, or at least some sort of way to declare that I want to use f01 for that purpose.
My concern is that I happen to be getting the values into the collection by fluke, or that if I were to add a form on a table that my inputs would get clobbered or crossed.
Thanks!

georgemc wrote:
you still have to fill it with Vector instances yourselfMy God! I got it up
Vector x[]=new Vector[3];
for(int i=0;i<=2;i++)
x=new Vector();
x[0].addElement("1");
x[0].addElement("2");
x[0].addElement("3");
x[1].addElement("4");
x[1].addElement("5");
x[2].addElement("6");
x[2].addElement("7");
x[2].addElement("8");
x[2].addElement("9");
for(int i=0;i<=2;i++)
System.out.println(x[i]);

Similar Messages

  • Grabbing Array Value and setting a hidden input

    Not sure if anyone can help but I am having an issue grabbing a certain value from an array and setting a hidden input inside a loop that then is grabbed outside the loop using a document.getElementById.
    Example to what I am trying to do.
    I have a Oracle Package that returns an array for a shopping cart. Each line has its on value and the value can either be 'N', 'P', or 'Y'. Depending on if any of the lines return an 'N' or a 'P' then something else needs to happen.
    So say I have a cart that has 5 lines in it.
    Line 0 = 'Y'
    Line 1 = 'N'
    Line 2 = 'N'
    Line 3 = 'Y'
    Line 4 = 'Y'
    Since one of the lines returns an 'N' I now want to set a hidden input with a value of 'N'. (Right now I have it setting that value in the cart display loop, which maybe be wrong.)
    <input type="hidden" id="AllowCheckOut" name="AllowCheckOut" value="N">
    Once the hidden input is set then outside the loop I am doing the following to determine if the 'Checkout' button should be displayed or not.
    if (document.getElementById('AllowCheckOut').value == "N") {
    isDisabled = true;
    The reason I am having to do it this way is because the 'Checkout' button is at the parent .jsp page and this is being determined in the child .jsp page.
    The problem I am having is even though I am doing an if else logic in the loop to look for an 'N' value which it does find, but it looks like it is always setting the hidden input value to whatever the last line value is which is 'Y' instead of setting it to 'N' since one of the lines had an 'N' in it.
    If anyone understands what I am trying to do can you please explain what I may be doing wrong or need to do.
    Thanks

    Also you have strings there delimited by single quotes, which is invalid in Java.
    Are you sure this is Java and not Javascript?
    Though a cart implemented in Javascript seems problematical to me.

  • Need help with ouput of a list or array of numbers input from user

    I'm only a few weeks into learning java, so this may seem simple to some, but...
    I am trying to write a program that will receive numbers from a user,
    and then list, add, average those numbers. I've got the program to
    work except for listing the numbers that were input.
    Can someone help guide me????
    i've left the code I've tried in as comments.
    Enter an integer value, the program exits if the input is 0:
    20
    Enter an integer value, the program exits if the input is 0:
    40
    Enter an integer value, the program exits if the input is 0:
    60
    Enter an integer value, the program exits if the input is 0:
    80
    Enter an integer value, the program exits if the input is 0:
    0
    Total numbers entered: 4
    The array of numbers is: 0 0 0 0
    The sum is 200
    The average is 50
    The maximum number is 0
    The minimum is 0
    Here is my code:
    * Title:        Reads integers and finds the total, average, maximum of the input values
    * Description:
    * Copyright:    Copyright (c) 2002
    * Company:      Duke Court.
    * @author Mary Davenport
    * @version 1.0
    public class part3page6
      public static void main(String[] args)
      int data = 0;
      int sum = 0;
      int countnum = -1;
      int maximum = 0;
      int minimum = 0;
      int average = (countnum - 1);
      do
          System.out.println("Enter an integer value, " +
            " the program exits if the input is 0:  ");
          data = MyInput.readInt();
          sum += data;
          countnum++;
        } while (data != 0);
          //in order to figure the max & the min it appears that the
        //program will need to utilize arrays to store the individual numbers
        //that are input from the user.
        //create an array of the input data
        int[] number = new int[countnum];
        //creat a list of the input data
        int []myList = {data};
        //lists how many numbers entered
        System.out.println("Total numbers entered:  " + number.length);
        //list array of numbers -- this is giving me [I@3179c3,
        //instead of 20, 40, 60, 80 when I use "new int[countnum]"
    //     System.out.print("The array of numbers is: "
    //      + new int[countnum]);
        //list array of numbers:  this is giving me " 0 0 0 0 "
           //instead of 20, 40, 60, 80  with the following for statement
           // (number[i] + " ")
        System.out.print("The array of numbers is: ");
          for(int i=0; i<number.length; i++)
            System.out.print(number[i] + "  ");
      //list mylist of numbers from input, 20, 40, 60, 80
      //output is The list of numbers is: [I@3179c3
    //  System.out.print("The list of numbers is: " + myList);
        System.out.println();
        System.out.println("The sum is " +  sum);
        average = sum/countnum;
        System.out.println("The average is " + average);
        System.out.println("The maximum number is " +  maximum);
        System.out.println("The minimum is " +  minimum);

    When you input the data you need to save it to the array. Currently you are not saving the value you are just adding it
    ArrayList nums = new ArrayList();
       do
           System.out.println("Enter an integer value, " +
             " the program exits if the input is 0:  ");
           data = MyInput.readInt();
    nums.add(new Integer(data));
           sum += data;
           countnum++;
         } while (data != 0);

  • Unable to create "filename.cdr". (Input/output error)

    I am trying to create an ISO from a CD. I've tried using Disk Utility, with all different settings, and Terminal. Additionally, I attempted to make the ISO using an array of third party CD-rippers on a PC. Every platform and method has yielded this error message:
    Unable to create "filename.cdr". (Input/output error) after several seconds of processing.
    I am stuck. The only thing I can think of is that the CD is read-only, though I don't know how to modify my approach in response to this. Can it still be done with a read-only disk? If so, any help in this would be appreciated.
    Beyond that, the disk's format is ISO 9660 (Rockridge). I don't know of any other details to provide, but gladly will if anyone can come up with any.

    Use Toast:
    http://www.roxio.com/enu/products/toast/titanium/overview.html
    or this (dd and/or compile cdrtools):
    http://www.slashdotdash.net/2006/08/14/create-iso-cd-dvd-image-with-mac-os-x-tig er-10-4/
    http://cdrecord.berlios.de/private/cdrecord.html
    (easiest to compile using mac ports)

  • How do I dynamically name and create arrays?

    I need to create arrays dynamically based on user's input. For example, if user enters 5, I have to create 5 arrays. Can anyone please tell me how to name and create them?

    So, if you don't know how many arrays to create when you're writing the code, you wouldn't name them. You'd create an ArrayList (or some other collective data structure) and name that, and then put the 5 arrays into that structure.

  • Dynamically create arrays

    I need to create arrays dynamically based on user input. I did try using ArrayList. For example if user enters 4 I did the following:
    ArrayList names=new ArrayList();
    for( i=0;i<4;i++)
       String str="array" + i;
       names.add(str);
    }The ArrayList will contain 4 names.......... but how do I create arrays with those names?
    String t = (String) names.get(i);
    String[] t = new String[10];I tried this code but it creates an array named t instead of whats stored in the ArrayList.
    Please help.........what should I do?

    Please help.........what should I do?You can use an associate data structure such as a HashMap. It stores pairs of values - key and item. The access on key is very fast and it will provide the corresponding item. In your case the key can be the array "name" in the form of a String, and the item can be the associated array.

  • Is there any way to create a style sheet in APEX?

    Hi experts,
    I am in I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
    Is there any way to create a style sheet in APEX any version?
    I want to create a style sheet and use APEX report column link to it.
    Thanks.
    Cow

    Well, if that is the case, then you'll need to do some PL/SQL programming to write a package to create all of that for you, then execute the package when the 'link' column is clicked.
    After your package is written, change the attributes on your link column to be a URL instead of page in your application and call it like:
    javascript:{MypopUp2('http://your.server.name/print/owner.package_name.sub_procedure?key=#COL01#',800,600);}
    On my system, I created a new DAD and user just for this one purpose, to read an select the information in my report, generate the HTML to display the data, etc. without leaving a loophole someone could exploit to get direct data manipulation access. My report though is a form-type report of all the data from about 40 tables for that one 'master' record, with css formatting included. I'm not directly generating a css file based upon data within the database, but simply adding the css formatting into the HTML file my package generates.
    Does this help your problem?
    Bill Ferguson

  • How to create a session variable in Apex?

    Hello colleagues,
    Is there someone do know how to create a session variable in Apex?
    How to get them?
    Thanks
    Best Regards

    Hello,
    What do you mean by 'session variable'? You mean something that stores the value int he users session state?
    I really recommend reading the 2-Day Developer guide documentation, there is a complete section on session state -
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/concept.htm#CIHCFHBD
    Hope this helps,
    John
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd

  • How to use list of data in an array as an input?

    Hi,
    I had an array with quite a number of complex data in it. I wanted to use it as an input to a function and plot it. I want the data in the array to be input one by one start from the top of the array till the bottom and feed it to the function accordingly. I'm having problem to do this. I tried 'for loop' but it will only output it after the loop finish running which not really desirable as the output from the function are to be use in other function and this introduce lagging. Any other method?

    Yeap.. thats the problem. I used this for loop before but it only update the value within the loop.. To use the transfer function I need to use another loop called Control and Simulation Loop. Attached is the modified file. I tried using global or local variable but it wont update until the for loop finish all the iteration which only gives out the final value in the array to the transfer function.
    Attachments:
    chart[1].vi ‏57 KB

  • How to create a moving text in APEX forms?

    Hi
    Can anyone help me with the procedure and the code for creating a moving text in APEX.
    Thanks in advance.

    marquee was introduced with IE (Internet Explorer) and certain versions of Firefox, Opera, Chrome and Safari web browsers support it.
    tell me how do you want the text to work. the easiest way will be to create an HTML region and put the marquee tag code in it
    if you fear about the compatibility of marquee with browsers or have a browser version with which marquee does not work then use JQuery
    check the following
    http://plugins.jquery.com/marquee/
    let me know if this answers your query in the current thread
    Regards,
    Vishal
    Oracle APEX 4.2 Reporting | Packt Publishing
    Vishal's blog

  • Creating an image gallery in apex....

    Hi,
    Im using Apex version 4.2.6... I followed the instructions in a blog to create an image gallery in apex applications....
    http://apex-notes.blogspot.com/2008/12/build-image-gallery-using-apex.html
    I have created all process by following that blog... But the pikachoose plugin is not available to download....
    Is there is any other plugin or any other alternate way to create an image gallery in apex???
    Thanks
    Infant raj

    HI,
    Is there is any example for creating an image gallery... Went through on your link, i want to use the images that are stored in the table.....
    Please advise me on application where i need to use this scripts...
    jQuery plugin setup
    The blueimp Gallery jQuery plugin registers a global click handler to open links with data-gallery attribute in the Gallery lightbox.
    To use it, follow the lightbox setup guide, but replace the minified Gallery script with the jQuery plugin version and include it after including jQuery:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="js/jquery.blueimp-gallery.min.js"></script>
    Next, add the attribute data-gallery to your Gallery links:
    <div id="links"> <a href="images/banana.jpg" title="Banana" data-gallery> <img src="images/thumbnails/banana.jpg" alt="Banana"> </a> <a href="images/apple.jpg" title="Apple" data-gallery> <img src="images/thumbnails/apple.jpg" alt="Apple"> </a> <a href="images/orange.jpg" title="Orange" data-gallery> <img src="images/thumbnails/orange.jpg" alt="Orange"> </a> </div>
    Thanks...
    INFANT

  • How to create a Shuttle box in Apex with simple copy and move option..

    I want to create a shuttle box in Apex with simple copy option. the demo application I downloaded from oracle had a two level selection query option which I dont need and was not even compatible with my version. All I need is a way to shuttle single query values between two multiple select lists. I could not find any demo.
    My Apex version 2.1 with XE
    query : select distinct fieldid d, fieldid r from field order by 1
    What kind of buttons do I need.. ? submitting or url redirecting ?

    Hello,
    >>
    The demo is not working in my apex 2.1 as I mentioned in the post.
    >>
    Not working is not enough of a description to help you out. I assume that what you mean is it won't install into XE since the demo was built in 2.2 and uses some 2.2 specific technology for the install.
    The way to get around that issue like I said was to get a free workspace on apex.oracle.com install the demo application there and then using some cutting and pasting recreate the demo app in your XE instance.
    Carl

  • Java.lang.ClassCastException while creating array descriptor

    ( This post was moved from SQL / PLSQL forum to here )
    Hi everyone, i used to pass string array from java to plsql. I wrote a java source, then i load db with loadjava. And i wrote java spec. Then i run the function but i am getting this error :
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    My Java Source is :
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    public class SplitterOracle3 {
    public static oracle.sql.ARRAY tokens2(String str,String delim)
    try
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Connection conn = new OracleDriver().defaultConnection( );
    OracleDriver ora = new OracleDriver();
    OracleConnection conn = (OracleConnection) ora.defaultConnection();
    //ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("MY_ARRAY", ((conn).getRealConnection());
    //Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    //Connection conn = ((DelegatingConnection) getDataSource().getConnection()).getInnermostDelegate();
    // get an initial context
    //OracleConnection oracleConnection = (OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection) wsConn);
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);
    String strarr[] = new String[47];
    strarr[0]="ahmet";
    strarr[1]="mehmet";
    int curIndex = 0;
    int nextIndex = 0;
    boolean nextIsLastToken = false;
    int i=0;
    while (true)
    nextIndex = str.indexOf(delim, curIndex);
    if (nextIsLastToken)
    //return false;
    break;
    if (nextIndex == -1)
    nextIsLastToken=true;
    nextIndex = str.length();
    strarr[i] = str.substring(curIndex, nextIndex);
    curIndex = nextIndex + 1;
    i++;
    ARRAY dirArray = new ARRAY(arraydesc, conn, strarr);
    return dirArray;*/
    catch(Exception ex)
    System.err.println(ex.getMessage());
    ex.printStackTrace();
    return null;
    public static void main(String[] args)
    String str="2000,2,123553168,1,10,64895,65535,27662,64860,64895,65535,27662,64860,0,,,,,,0,0,2491039806,,,,,,,,,0,0,1,,2491039106,,,,,,,,,,,,";
    String strarr[] = new String[47];
    long l1,l2;
    int j=0;
    l1 = System.currentTimeMillis();
    for ( int i=0; i<20000000; i++)
    strarr = tokens2(str,",");
    l2 = System.currentTimeMillis();
    System.out.println("Fark :"+ (l2-l1));
    The line has "ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);" causes this error.
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    But i could not find the solution. Can you help me?
    Thanks for responses.

    Hi,
    Did you try my suggestion from Re: java.lang.ClassCastException while create array descriptor
    Try replacing
    oracle.jdbc.driver.OracleConnectionwith
    oracle.jdbc.OracleConnectionRegards
    Peter

  • How to create a system  parameter in Apex

    Hi friends,
    I am new to Oracle Apex and need to know how to create a System Parameter in Apex. Kindly let me know how to add one.
    Regards,
    Pradeep

    bluerose wrote:
    I am new to Oracle Apex and need to know how to create a System Parameter in Apex. Kindly let me know how to add one.
    using the privileges we can achieve this.Although I am not new to APEX I have no idea what you are talking about.
    What is "a System Parameter in Apex"? What "privileges" are used to create one?
    You'll find it easier to get help if you use terminology that is familiar to everyone...

  • Create array varible in TestStand 4.0

    Hi  gurus,
           I have a doubt that how can we create Array of string in TestStand 4.0 using C#.NET environment.
    I used following method, but failed to create array:
    objPropertyObj.SetValStringByOffset(10,PropertyOpt​ions.PropOption_InsertIfMissing,"SRU"); // exception here....
    The other following method creates array with empty size:
    objPropertyObj.NewSubProperty("SUBSTITUTE.SRU", PropertyValueTypes.PropValType_String, true, "Arrayw",10 );
    Please let me know how to set the length of the array at second method.
    Thank you,
    regards
    RKK

    You should post to the TS board.
    Try to take over the world!

Maybe you are looking for

  • What about the 50% extra data for new customers?

    I signed up for Verizon HomeFusion 17 days ago.  I copied the following straight off your webpage for new HomeFusion customers: "New customers to the service will  receive 50% more data allowance for their first 2 full billing cycles.  Requires new 2

  • Question about blazeds turnkey, tomcat and directory structure

    hi. this question is pretty basic...been reading sujit reddy g's blog on installing/setting up blazeds. in one article he creates a samplewebapps directory in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\samplewebapps and copies the

  • Automatically generated Date/Time in subject line

    Hi there, I'm just wondering is it possible to have the date and or time automatically added to the subject line if I create a new e-mail message or if I receive or reply to an e-mail from someone? Any help appreciated! Regards, Bonemister

  • Full screen in safari

    The listing says full screen for iPad 2 in safari, I haven't found out how, is it just for video or surfing?

  • Problem: Changing print quality iMac + Canon Printer MG6220

    If I want to print a web page in Firefox from my iMac to a Canon MG6220 printer, I cannot change the print quality. I can only choose "Standard" and not "Fast". All other options for print quality are "grayed-out". This happens in both Firefox and Au