Dynamically populating List box

Hello Everyone:
I need to create a JSP with two combo boxes and submit button.
Where the first combo box will be updated from database - which is simple.
but depending on the selection of the first box the second box should be populated and should be able to make multiple selections in it.
and in the same jsp page should be able to display the results, of what I added by submiting the previous form.
Please can somebody help me witha sample.
Thanks
ASB

Dear user,
If you get any response for the asked question on Dynamically populating List box from anybody please forward the reply to the following e-mail id.
[email protected]
--SUBIR                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Removing Items from Populated List-Box

    I have a drop down box populate a list box. (change: ListBox1.addItem(xfa.event.newText)) But I can add more then one of the same selection so how do I remove them from the ListBox. Upon click? somehow? I don't konw the lingo.

    There is a selectedIndex property that will give you back the index of the 1st item that is selected.
    Paul

  • Populating List Boxes

    Azadi – Thanks for your HELP on my last problem.
    – This is the Old Dog Playing a Young persons game! And
    loving It! Using CF8 and MySQL 5
    New?? List Boxes, or drop-down Combo list Boxes, could you or
    someone direct me in the proper direction for information on how to
    Populate a list box or combo box based on the input of the previous
    list box?? Example Enter From Selection - Southern Gulf Coastal
    States - All the State in the Southern Gulf Coast would populate
    the next combo box, and select a State and all the Coastal Cities
    would be of choice and next after cities is the Zip.
    I know how to do it in MS Access not sure the best way to
    attack this in cf8.
    Thanks

    There are many ways to do this:
    1. By submitting your data to cf server first and query only
    according to user selection then populate the target fields
    according to query.
    2. By querying all data and use javascript
    variables/arrays/structures to populate your combo box everytime
    user change the selected item.
    3. By incorporating Ajax to your CF application.
    The first one is the easiest one. But everytime you make
    changes to your selection, your app submits to cf server which is
    kind of slow 'cause you have to submit everytime selection changes.
    The second one is by querying all the data, which is slow at
    first 'coz even the unnecessary data are returned. That is, I don't
    think the user would try to select all the selections one by one,
    but rather maybe just select one item. Though, it will be faster
    already when the user selects another item. This way, your form
    doesn't have to be re-submitted 'coz you let a javascript
    variable/arrays/structures store the data at first query.
    The third one(kind of a mix of both 1 and 2), which is the
    most efficient way among the three to achieve your goal, needs
    learning Ajax which is going to take a few of your time. But if you
    know it already, you can let it work well with CF8.
    Anyway, a simple sample code for the first method is
    attached:

  • [b] Populating List Box from MySQL Database[/b]

    Hi all,
    I'm trying to populate a JComboBox from MySQL database, I Have an applet which send's the query to a server through sockets on the localhost, but when i try to retrieve the result set from the MySQL database, i get an index out of bounds exception, It's probably something simple, any help regarding the above problem!! I've included the code below!!
    Cheers
    Dave
    java.lang.ArrayIndexOutOfBoundsException: 1
    at dbWrapper1.Select(dbWrapper1.java:97)
    at TestUpdateDB.main(TestUpdateDB.java:29)
    Applet Code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    *     @version  04/18/05
    *     @author David Lawless
    public class cust extends JApplet implements ActionListener
    //Declare Labels for Form
    private JLabel titleLabel;
    private JLabel firstNameLabel;
    private JLabel lastNameLabel;
    private JLabel addressLabel;
    private JLabel countyLabel;
    private JLabel countryLabel;
    //Declare Input fields for user
    private JTextField firstNameText;
    private JTextField lastNameText;
    private JTextField addressLineOneText;
    private JTextField addressLineTwoText;
    private JTextField addressLineThreeText;
    //Declare list for title box
    private JComboBox titleList;
    private String[] title = {"Mr.","Mrs.","Miss","Ms","Dr."};
    //Declare list for county box
    private JComboBox countyList;
    //Called when this applet is loaded into the browser.
    public void init()
    lookAndFeel();
    //Initialise Labels
    firstNameLabel = new JLabel("First Name * ");
    lastNameLabel = new JLabel("Last Name * ");
    titleLabel = new JLabel("Title * ");
    addressLabel = new JLabel("Address *");
    countyLabel = new JLabel("County *");
    countryLabel = new JLabel("Country *");
    //Initialise title List
    titleList = new JComboBox( title );
    titleList.setActionCommand("Title");
    //Set up Text fields
    firstNameText = new JTextField(30);
    firstNameText.setToolTipText("Please enter your first name here");
    lastNameText = new JTextField(30);
    lastNameText.setToolTipText("Please enter your surname here");
    addressLineOneText = new JTextField(30);
    addressLineTwoText = new JTextField(30);
    addressLineThreeText = new JTextField(30);
    //Retrieve County List From Database
    //countyList = new JComboBox( counties );
    try
         try
              Socket mySocket = new Socket ("127.0.0.1", 1983 );
              ObjectOutputStream out = new ObjectOutputStream(mySocket.getOutputStream());
              String entry1 ="SELECT county FROM data";
              out.writeObject(new String(entry1));
              ObjectInputStream in = new ObjectInputStream(mySocket.getInputStream());
              int size = in.readInt();
              Object [] results = new Object[size];
              for (int i=0; i < size  ; i++ )
                   results[i] = in.readObject();
              countyList = new JComboBox( results );
              countyList.setActionCommand("County");
              mySocket.close ();
         catch (Exception exp)
              exp.printStackTrace();
    // detect problems interacting with the database
    catch ( Exception sqlException )
         System.exit( 1 );
    //set up command buttons
    submitButton = new JButton("Submit");
    submitButton.setToolTipText("Click here to submit your details ");
    submitButton.addActionListener(this);
    cancelButton = new JButton("Cancel");
    cancelButton.setToolTipText("Click here to cancel order");
    cancelButton.addActionListener(this);
    Container topLevelContainer = getContentPane();
    getContentPane().setBackground(Color.blue);
    //Create Layout
    JPanel contentPane = new JPanel();
    //Set transparent background instead of blue
    contentPane.setBackground(Color.white);
    contentPane.setLayout(null);
    contentPane.setOpaque(true);
    titleLabel.setBounds(37,10,75,20);
    contentPane.add(titleLabel);
    firstNameLabel.setBounds(93,10,100,20);
    contentPane.add(firstNameLabel);
    lastNameLabel.setBounds(198,10,100,20);
    contentPane.add(lastNameLabel);
    titleList.setBounds(37,35,50,20);
    contentPane.add(titleList);
    firstNameText.setBounds(93,35,100,20);
    contentPane.add(firstNameText);
    lastNameText.setBounds(198,35,100,20);
    contentPane.add(lastNameText);
    addressLabel.setBounds(37,65,100,20);
    contentPane.add(addressLabel);
    addressLineOneText.setBounds(37,90,125,20);
    contentPane.add(addressLineOneText);
    addressLineTwoText.setBounds(37,115,125,20);
    contentPane.add(addressLineTwoText);
    addressLineThreeText.setBounds(37,140,125,20);
    contentPane.add(addressLineThreeText);
    countyLabel.setBounds(37,165,100,20);
    contentPane.add(countyLabel);
    countyList.setBounds(37,190,100,20);
    contentPane.add(countyList);
    submitButton.setBounds(60,250,100,20);
    contentPane.add(submitButton);     
    cancelButton.setBounds(180,250,100,20);
    contentPane.add(cancelButton);
    topLevelContainer.add(contentPane);
    }//End init()
    static void lookAndFeel()
         try
              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         catch(Exception e)
    }//End look and feel method
    public synchronized void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JButton)
         if (actionCommand.equals("Cancel"))
                   int returnVal = JOptionPane.showConfirmDialog(null,
                        "Are you sure you want cancel and discard your order?",
                        "Cancel Order", JOptionPane.YES_NO_OPTION);
                   if(returnVal == JOptionPane.YES_OPTION)
                        System.exit(0);
         if (actionCommand.equals("Submit"))
              firstName = firstNameText.getText();
              Surname = lastNameText.getText();
         }//end action command for submit button
    }//end method actionperformed
    }//End class customerDatabase Connection Code:
    import java.sql.*;
    import java.util.*;
    class dbWrapper1
        private Statement statement;
        private Connection connection;
        private String strUserName;
        private String strPassword;
         Object [] results = null;
         static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
         static final String DATABASE_URL = "jdbc:mysql://localhost:3306/ecommerce";
        public dbWrapper1()
            // the DSN for the Db connection
            strUserName = "root";
            strPassword = "password";
        public void Open()
            try
                // Load the jdbc-odbc bridge driver
                Class.forName ( JDBC_DRIVER );
                   //                    ***** TESTING PURPOSES *****
                   //Check currently loaded drivers
                   System.out.println("Currently loaded drivers...");   
                   for
                        Enumeration enum1 = DriverManager.getDrivers() ;
                        enum1.hasMoreElements();
                   System.out.println(enum1.nextElement().getClass().getName());
                // Attempt to connect to a driver.
                connection = DriverManager.getConnection ( DATABASE_URL, strUserName, strPassword );
                // Create a Statement object so we can submit
                // SQL statements to the driver
                statement = connection.createStatement();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
            catch (java.lang.Exception ex)
                ex.printStackTrace ();
        public void Update( String strUpdate )
            try
                // Submit an update or create
                statement.executeUpdate( strUpdate );
              catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
        public Object[] Select( String strQuery )
            try
                // Submit a query, creating a ResultSet object
                ResultSet resultSet = statement.executeQuery( strQuery );
                // process query results
                   ResultSetMetaData metaData = resultSet.getMetaData();
                   int numberOfColumns = metaData.getColumnCount();
                   results = new Object[numberOfColumns];
                   while ( resultSet.next() )
                        for ( int i = 1; i <= numberOfColumns; i++ )
                             results[i] = resultSet.getObject(i);
                             System.out.print(resultSet.getString(i) + " | " );
                        System.out.println();
                   resultSet.close();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
              for (int i=0;i<results.length ;i++ )
                   System.out.println(results);
              return results;
    public void Close()
    try
    statement.close();
    connection.close();
    catch (SQLException ex)
    while (ex != null)
    System.out.println ("SQL Exception: " + ex.getMessage () );
    ex = ex.getNextException ();
    Server Code:
    import java.io.*;
    import java.net.*;
    public class TestUpdateDB
         public static void main(String[] args)
              System.out.println ( "Server is active" );
              try {
              ServerSocket sock = new ServerSocket ( 1983 );
              while ( true )
                   try
                        Socket mySock = sock.accept();
                        ObjectInputStream iStream = new ObjectInputStream(mySock.getInputStream());
                        ObjectOutputStream oStream = new ObjectOutputStream(mySock.getOutputStream());
                        Object temp = iStream.readObject();
                        String entry = (String)temp;
                        System.out.println ( entry );
                        dbWrapper1 myDB = new dbWrapper1();
                        myDB.Open();
                        Object [] query = myDB.Select(entry);
                        int size = query.length;
                        oStream.writeInt(size);
                        for (int i=1 ; i <= query.length ; i++)
                             oStream.writeObject( query );
                        myDB.Close();
                   catch ( Exception exp )
                        exp.printStackTrace ();
              catch ( Exception exp ) {
                exp.printStackTrace();

    Sir,
    The exception is probably in here.
    for ( int i = 1; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i);
      System.out.print(resultSet.getString(i) + " | " );
    }ResultSet counting begins with 1 but array indexing begins with 0 your code should look more like.
    for ( int i = 0; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i+1);
      System.out.print(resultSet.getString(i+1) + " | " );
    }Sincerely,
    Slappy

  • Flash Lite 2 component:XML List Box Lite for Dynamic Flash Lite 2 application

    XML ListBox Lite is the Flash Lite UI component lets you
    create XML driven dynamic lists for your Flash Lite 2 mobile
    applications!
    XML ListBox Lite is a Flash component for Flash Lite 2.0
    application development for mobile phones. Creating a lightweight
    dynamic list box for Flash Lite application becomes as easy as a
    snap using this component. Now no more the Flash Lite application
    developers need to be worried about creating dynamically populated
    list box that will work on nearly every symbian series 60 models
    which support Flash Lite 2.0.
    XML ListBox Lite comes handy when you plan to create a
    dynamic list which is populated with the data sourced from a simple
    XML file , such creating a play list for your Flash Lite MP3 Player
    application, creating a list for a shopping catalogue etc.
    XML ListBoxLite is a complete solutions for creating
    customized xml driven dynamic lists in Flash Lite 2 mobile
    application development.
    The basic features of the component are:
    Create Unlimited Number of Tabs: XML ListBoxLite can populate
    any number of tabs and provides proper visualization and navigation
    of these tabs.
    Fully Functional Scrollbars: The scrollbars position ratio is
    auto adjusted by the number of tabs that appear in the list, which
    gives the users whether any tabs are left in the list to scroll.
    Display Tabs as per needs: This list component allows you to
    display any number of tabs from the range of 8, 4, 2 and 1, at any
    instance. This serves the need for example when you have more text
    to display you can choose 4 or 2 tabs so that you need not
    compromise on the content side.
    Customize the Look and Feel: You can set any color as
    parameters for different elements of this list component so that it
    will fit your application seamlessly.
    Virtually zero time to implement: This component does not
    require any extra programming in FlashLite 2.0 Action script to
    display your contents. Just update the xml list and it is ready for
    use.
    Lightweight and User friendly: XMLListBoxLite offers you
    great glossy look and advanced features within just 17 KB . The
    user experience is also magnetic.
    More details at:
    http://esspl.com/flashcomponents/xmllistboxlitehome.asp

    Hello there,
    I am have a similar kind of problem. I am trying to run a video on Pocket PC (WM5) using video.play() method on FlashLite 2.1. It works fine in Device Central and my Nokia mobile (symbian OS with default FlashLite 2.1). Video is obviously embedded in FlashLite 2.1 and was originally in *.3gp format.
    Can you please help me where I am going wrong or what am I missing ?
    As ever,
    Vinayak Kadam

  • List boxes as filter

    Hi,
    I’m developing an asp page containing a form with two
    dynamically populated list boxes and a submit button. The submit
    button should open up another asp page with results filtered by
    criteria determined by the contents of the 2 list boxes. I can
    populate the list boxes OK but I am not sure about how to use the
    selected values as the filter. Can anyone point me in the right
    direction?
    Thanks,
    Chris

    Select * WHERE IDFieldName <> Variable1 && / OR
    IDFieldName <> Variable2
    You can set your variables in the advanced section of your
    recordset box.
    Check your SQL as the above is just 'pseudo' (I alway shave
    to check SQL,
    for some reaons can never remember it quite right). The
    recordset box will
    help you to find the right way to access your variables -
    URL/Form/Session,
    etc.
    HTH,
    Jon
    "Chris_HSL" <[email protected]> wrote in
    message
    news:e9o4r0$bbi$[email protected]..
    > Hi,
    >
    > I?m developing an asp page containing a form with two
    dynamically
    > populated
    > list boxes and a submit button. The submit button should
    open up another
    > asp
    > page with results filtered by criteria determined by the
    contents of the 2
    > list
    > boxes. I can populate the list boxes OK but I am not
    sure about how to use
    > the
    > selected values as the filter. Can anyone point me in
    the right direction?
    >
    > Thanks,
    >
    > Chris
    >

  • How do I enable multiple dynamic drop down boxes?

    I'm using Windows 2000, Java SDK 2 Standard, Tomcat, Apache, Microsoft Access and Macromedia Dreamweaver Ultradev 4.
    With UltraDev I'm trying to create a jsp page that has more than one dynamic drop down box or more than one dynamic select list box. I can show one dynamic object and as many static objects as I need. But when I add a second dynamic drop down box, with a second recordset, the page will only display the first dynamic object and all content following that object will not display.

    Here's the code:
    <%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%>
    <%@ include file="Connections/conn.jsp" %>
    <%
    Driver DriverRecordset1 = (Driver)Class.forName(MM_conn_DRIVER).newInstance();
    Connection ConnRecordset1 = DriverManager.getConnection(MM_conn_STRING,MM_conn_USERNAME,MM_conn_PASSWORD);
    PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT STATE_NAME, COUNTRY FROM STATE");
    ResultSet Recordset1 = StatementRecordset1.executeQuery();
    boolean Recordset1_isEmpty = !Recordset1.next();
    boolean Recordset1_hasData = !Recordset1_isEmpty;
    Object Recordset1_data;
    int Recordset1_numRows = 0;
    %>
    <%
    Driver DriverRecordset2 = (Driver)Class.forName(MM_conn_DRIVER).newInstance();
    Connection ConnRecordset2 = DriverManager.getConnection(MM_conn_STRING,MM_conn_USERNAME,MM_conn_PASSWORD);
    PreparedStatement StatementRecordset2 = ConnRecordset2.prepareStatement("SELECT FIRSTNAME, LASTNAME, AGE FROM PLAYER");
    ResultSet Recordset2 = StatementRecordset2.executeQuery();
    boolean Recordset2_isEmpty = !Recordset2.next();
    boolean Recordset2_hasData = !Recordset2_isEmpty;
    Object Recordset2_data;
    int Recordset2_numRows = 0;
    %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="">
    <p>
    <select name="select2">
    <option value="Canada">Canada</font></option>
    <option value="France">France</font></option>
    <option value="French Guiana">French Guiana</font></option>
    <option value="French Polynesia">French Polynesia</font></option>
    <option value="French Southern Territories">French Southern Territories</font></option>
    <option value="Germany">Germany</font></option>
    <option value="United Kingdom">United Kingdom</font></option>
    <option value="United States">United States</font></option>
    </select>
    </p>
    <p>
    <select name="select">
    <%
    while (Recordset1_hasData) {
    %>
    <option value="<%=(((Recordset1_data = Recordset1.getObject("COUNTRY"))==null || Recordset1.wasNull())?"":Recordset1_data)%>" ><%=(((Recordset1_data =
    Recordset1.getObject("STATE_NAME"))==null || Recordset1.wasNull())?"":Recordset1_data)%></option>
    <%
    Recordset1_hasData = Recordset1.next();
    Recordset1.close();
    Recordset1 = StatementRecordset1.executeQuery();
    Recordset1_hasData = Recordset1.next();
    Recordset1_isEmpty = !Recordset1_hasData;
    %>
    </select>
    </p>
    <p>
    //Here's where things go awry
    <select name="select4">
    <%
    while (Recordset2_hasData) {
    %>
    <option value="<%=(((Recordset2_data = Recordset2.getObject("FIRSTNAME"))==null || Recordset2.wasNull())?"":Recordset2_data)%>" ><%=(((Recordset2_data = Recordset2.getObject("FIRSTNAME"))==null || Recordset2.wasNull())?"":Recordset2_data)%></option>
    <%
    Recordset2_hasData = Recordset2.next();
    Recordset2.close();
    Recordset2 = StatementRecordset2.executeQuery();
    Recordset2_hasData = Recordset2.next();
    Recordset2_isEmpty = !Recordset2_hasData;
    %>
    </select>
    </p>
    <p>
    <select name="select5">
    </select>
    </p>
    <p> </p>
    </form>
    <form name="form2" method="post" action="">
    <select name="select3">
    </select>
    </form>
    <p> </p>
    </body>
    </html>
    <%
    Recordset1.close();
    ConnRecordset1.close();
    %>
    <%
    Recordset2.close();
    ConnRecordset2.close();
    %>

  • Is this a Bug? List Box do not scrollbar: Magic number 2461

    In my case I am populating list box from database using script. I noticed strange behavior with List Box being populated more than 2461 list items. At run time List box do not display scrollbar if the list items are more than 2461. Looks like 2461 is the Magic number. I wonder if some one already noticed this behavior. I want to see the scrollbar irrespective of number of list items. In my case I need to load approximately 5000 list items. Any one has suggestions? Is it designed to behave like this or is this a Bug?
    Thanks in Advance.
    SekharN.

    Hi,
    I noticed it too !
    I have several lists, some oh theme have more than 2460 items and don't have the scroll bar.
    An other problem relative to scrollBar in listBox appeared : with Reader 8, i can't use the scroll bar (even if i have less than 2460 items); it appears but i can't scroll.
    I see tthe french adobe team about these 2 problems next week. If we find something new, i'll tell you.
    Pierre.

  • Warning using DWR to populate list box

    hi all,
    iam trying to use DWR for populating list box wen a check box is checked.iam using Tomcat 4.1 & j2sdk 1.4.2
    but iam getting an alert: illegal access to default constructor Aug 20, 2006 6:30:43 PM uk.ltd.getahead.dwr.util.CommonsLoggingOutput warn
    WARNING: Method execution failed:
    java.lang.InstantiationException: Illegal Access to default constructor
            at uk.ltd.getahead.dwr.create.NewCreator.getInstance(NewCreator.java:62)
            at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:172)
            at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProce
    ssor.java:48)
            at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.jav
    a:81)
            at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java
    :162)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2415)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
    3)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :594)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:392)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
    :565)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:619)
            at java.lang.Thread.run(Thread.java:534)
    Aug 20, 2006 6:30:43 PM uk.ltd.getahead.dwr.util.CommonsLoggingOutput warn
    WARNING: Erroring: id[53_1156078843109] message[uk.ltd.getahead.dwr.OutboundVari
    able@497904]my code goes here,
    package db;
    import java.util.*;
    class ArrayL 
         public ArrayL()
              System.out.println("In constructor");
         public ArrayList getA(String x)
              ArrayList al=new ArrayList();
              al.add("1");
              al.add("6");
              al.add("42");
              al.add("16");
              al.add("3");
              System.out.println("al-------"+al);
              return al;
         public int[] getNumbers(boolean big)
            if (big)
                return new int[]
                    1000, 2000, 3000, 4000
            else
                return new int[]
                    1, 2, 3, 4, 5, 6, 7, 8, 9, 10
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
        "http://www.getahead.ltd.uk/dwr/dwr10.dtd">
    <dwr>
      <allow>
        <create creator="new" javascript="Demo" scope="session">
          <param name="class" value="uk.ltd.getahead.dwr.Demo"/>
        </create>
         <create creator="new" javascript="ArrayL" scope="session">
          <param name="class" value="db.ArrayL"/>
        </create>
      </allow>
    </dwr>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <script type='text/javascript'
        src='/ajax1/dwr/engine.js'></script>
    <script type='text/javascript'
        src='/ajax1/dwr/interface/ArrayL.js'></script>
    <script type='text/javascript'
        src='/ajax1/dwr/util.js'></script>
         <SCRIPT type='text/javascript'>
         <!--
                   function continentSelected()
                        var searchexp = $("continent").value;
                        ArrayL.getNumbers(searchexp, displayItems);
                        return false;
                   function displayItems(items)
                        DWRUtil.removeAllOptions("country");
                      DWRUtil.addOptions("country", data);          
                        if (items.length == 0)
                             alert("No matching products found");
                             $("country").style.visibility = "hidden";
         //-->
         </SCRIPT>
    </HEAD>
    <BODY>
      <FORM NAME="countryform" ID="countryform" ACTION="doCountry" METHOD="POST">
        <SELECT name="continent" id="continent" onChange="continentSelected();">
          <OPTION VALUE="Africa">Africa</OPTION>
          <OPTION VALUE="America">America</OPTION>
          <OPTION VALUE="Asia">Asia</OPTION>
          <OPTION VALUE="Australia">Australia</OPTION>
          <OPTION VALUE="Europe">Europe</OPTION>
        </SELECT>
        <SELECT name="country" id="country">
        </SELECT>
    </BODY>
    </HTML>can any one help with this problem
    Thank u in advance

    I'm not sure if the code you display is 'Exactly' how it is written.
    If it is:
    1) The class needs to be public (i.e. public class ArrayL {.....})
    2) In the code below, the value of searchexp is a string
               var searchexp = $("continent").value;
              ArrayL.getNumbers(searchexp, displayItems); but the function
    public int[] getNumbers(boolean big) takes a boolean.
    3) In the call DWRUtil.addOptions("country", data); 'data' isn't defined did you mean 'items'?
    Finally in the statement that you have if (items.length == 0) I have found that does not work with Collections (at least Maps) returned from a method to DWR (as of 1.1.3).
    Good luck

  • Dependent List Boxes

    Can't figure what is wrong with this code. Any ideas? My page
    is blank unless I remove this code. If I remove the below code the
    page shows the form and the list boxes but the last dependent list
    box is not functioning properly...
    <!-- Dynamic Dependent List box Code for *** JavaScript
    *** Server Model //-->
    <script language="JavaScript">
    <!--
    var arrDynaList2 = new Array();
    var arrDL2 = new Array();
    arrDL2[1] = "lmConsumer";
    // Name of parent list box
    arrDL2[2] = "frmAddendum";
    // Name of form containing parent list box
    arrDL2[3] = "lmICPDate";
    // Name of child list box
    arrDL2[4] = "frmAddendum";
    // Name of form containing child list box
    arrDL2[5] = arrDynaList2;
    <%
    var txtDynaListRelation2, txtDynaListLabel2,
    txtDynaListValue2, oDynaListRS2;
    txtDynaListRelation2 = "SID"
    // Name of recordset field relating to parent
    txtDynaListLabel2 = "ICPDate"
    // Name of recordset field for child Item Label
    txtDynaListValue2 = "ICPDate"
    // Name of recordset field for child Value
    oDynaListRS2 =
    rsICPDate
    // Name of child list box recordset
    var varDynaList2 = -1;
    var varMaxWidth = "1";
    var varCheckGroup =
    oDynaListRS2.Fields.Item(txtDynaListRelation2).Value;
    var varCheckLength = 0;
    var varMaxLength = 0;
    while (!oDynaListRS2.EOF){
    if (varCheckGroup !=
    oDynaListRS2.Fields.Item(txtDynaListRelation2).Value) {
    varMaxLength = Math.max(varCheckLength, varMaxLength)
    varCheckLength = 0;
    %>
    arrDynaList2[<%=(varDynaList2+1)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListRelation2).Value)%>";
    arrDynaList2[<%=(varDynaList2+2)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListLabel2).Value)%>";
    arrDynaList2[<%=(varDynaList2+3)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListValue2).Value)%>";
    <%
    if (oDynaListRS2.Fields.Item(txtDynaListLabel2).Value.length
    > varMaxWidth.length) {
    varMaxWidth =
    oDynaListRS2.Fields.Item(txtDynaListLabel2).Value;
    varCheckLength = varCheckLength + 1;
    varDynaList2 = varDynaList2 + 3;
    oDynaListRS2.MoveNext();
    varMaxLength = Math.max(varCheckLength, varMaxLength)
    %>
    //-->
    </script>

    Try something like this:
    <span spry:region="dsStates" id="stateSelector">
    <select spry:repeatchildren="dsStates" name="stateSelect"
    onchange="document.forms[0].citySelect.disabled = true;
    dsStates.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{name}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{name}">{name}</option>
    </select>
    </span>
    City:
    <span spry:region="dsCities" id="citySelector">
    <select spry:repeatchildren="dsCities" id="citySelect"
    name="citySelect" onchange="document.forms[0].schoolSelect.disabled
    = true; dsCities.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{name}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{name}">{name}</option>
    </select>
    </span>
    <span spry:region="dsSchools" id="schoolSelector">
    <select spry:repeatchildren="dsSchools" id="schoolSelect"
    name="schoolSelect" onchange="window.location=this.value;">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{url}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{url}">{name}</option>
    </select>
    --== Kin ==--

  • Populating a Dynamic List Box in CRM Survey

    Hi All,
    I am currently creating a CRM Survey and am trying to use the 'Dynamic List Box with Single/Multiple Selection' options, but cannot see how i can populate these lists. I get the following error message when selecting the 'Insert Answer Option:
    'Dynamic list boxes' cannot contain statistical answer options'
    I have tried this through both Survey Suite and UI, but cannot go any further. Can anyone point me to where i can populate this list? Sounds like possible a backend table, but i cannot find which one.
    Many Thanks
    Indi

    Would anyone be able to help please?
    Thanks
    Indi

  • How to add text dynamically in  Tree view list box

    CS3/WIN<br />hi,<br />I am new in plugin development.<br />I have a Tree View List box on a dialog.<br />b I don't want to display text when i load the plugin.<br />b I want to insert text data when i click on "Insert" button on dialog. <br />I have defined  Adapter,Mgr,Observer for list box.it is working fine when i want to display data at loading time itself.but not when i click on insert button.<br />b In dialog observer i have defined this but it is not working<br /><br />b Dialog Observer::Update<br /><br />InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />IControlView* Grid = panelControlData->FindWidget(kESSGridTVWidgetID);<br />InterfacePtr<IStringListControlData> listControlData(Grid,UseDefaultIID());<br />if (theSelectedWidget == kESSInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{<br />listControlData->AddString(strText,kESSListBoxTextWidgetID); <br />}<br /><br />b it is showing error  <br />b operator new returning nil for an allocation size of 486022320 bytes<br />(..\..\..\source\components\memoryallocator\PMNew.cpp (552))<br />b Memory allocation failure<br />(c:\development\cobalt\source\public\includes\K2Allocator.h (131))<br />can any one help to get this..<br />Thanks.

    How to populate list in tree view  dynamically
    Hi,
    I am new to  Indesign Plugin creation.
    I want to create list in tree view dynamically.
    I tried wlistboxcomposite sdk sample in indesign cs4.
    I have some doubts in this.
    1. Can i write my own method in  WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter
    If it's possible how can i call this method.
    2. In this example they populating static string in constructor like this
    WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){
    K2Vector<PMString> lists;
    for (int32 i = 0; i< 12; i++){
    PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_bac k(name);}
    InterfacePtr<IStringListData> iListData(
    this, IID_ISTRINGLISTDATA);}
    and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can
    i achieve this.
    Pls do needful.
    Thanks
    Arun

  • "Dynamic List Box with Single Selection" Survey Suite in CRM 6.0

    Hi
    I am using CRM 6.0. There in Survey Suite there are 2 answering options "Dynamic List Box with Single Selection" & "Dynamic List Box with Multiple Selection". I am able to make out, how we can assign values to this. I have seen example "Example_Dynamic_survey" also.
    I believe we have to use programming for populating this. But how do we have to carry that out.
    Thanx and Regards
    Hitesh

    Hi Hitesh,
    There is no need of programming for populating values for Answer category 'List Box with Single Selection' or 'List Box with Multiple Selection'. You have to follow the following steps to populate values for those:
    - In the Answer Category select List Box with Single Selection from drop down list
    - Then on left hand side tree, right click on Answer and select Insert Answer Option (Answer->Insert Answer Option)
    - Then on right side, provide Text for the answer (value)
    - To add more values, repeat the process Answer->Insert Answer Option and providing text for those answers in the right side.
    Similarly you can populate values for 'List Box with Multiple Selection' also.
    This has to be done in the transaction CRM_SURVEY_SUITE.
    Hope this is clear to you
    regards
    Srikantan

  • Surveys - dynamic list box option

    Hi,
    How can I control the entries for the answer category "Dynamic list box with single selection"?
    Thanks,
    Susana Messias

    Hello Susana,
    To maintain dynamic values for a specific answer, select your survey in the Survey Suite and go to the maintenance of survey attributes (CTRL+F12). Under the tab 'Technical settings', you can maintain the 'Callback to PBO' function module, which allows you to modify the survey at runtime. (The function module you specify here is called by the survey tool runtime environment at PBO.)
    As an example, you can have a look at the function module 'CRM_SVY_EXAMPLE_DYNAMIC_PBO', which contains a section to set answer options at runtime. Of course, you would have to program your own logic to meet your specific requirements for setting the values.
    I hope this helps.
    Kind regards,
    Kristoff

  • Dynamic retrieval in list boxes using JSP

    Dear All,
    I have a list box in a form which is created by extracting data from oracle database. There are approximately 26000 records which are added dynamically in the list box. There are five rows in the form and each row has to have a list box with all records. Now if i retrieve all records for all list boxes, the page takes high time to load. I also tried using String array to read once and write them using loops in list box. But even then the loading time is quiet high. Is there some better way so that the page loads fast enough. I am using Oracle Database and the table is indexed.
    Thanks & Regards,
    Gagan Arora

    Well, it's big enough to make any page slow... but you can try to load all the list boxes in the client side with javascript.
    i make that usually, create a javascript strings array and on the "onLoad" event fill all the list boxes with the values in that array.
    but anyway is too much data.

Maybe you are looking for

  • Photo is placed in the wrong geographical location

    my computer has assigned photos to places that are incorrect. Some photos were taken in a different town then what town it is listed in, can I move the photos or re tag them with the correct City or town?

  • Attachments download in OAF

    Hi, I have a table in one of the OAF page in the application. For each row in the table there can be multiple attachments stored in the FND_LOBS table. I wanted to show all the attachments for a row in a column. Is it possible? Can someone please giv

  • 5G iPod crashes internet

    I have read everyones issues and i am having the fopllowing problems. Please note i have recently upgraded to tiger and installed the new patch yesterday, i am also on pipex internet and have installed the new driver for tiger (although i am not sure

  • How to connect to and communicate with an SQLite database in AIR/Flex

    Hey guys, I recently decided I would try programming a vocabulary-training program in AIR, so I could use it on Linux as well. I got stuck pretty soon. I am trying to connect to a local SQLite database and I obviously fail epically. Posting the sourc

  • How to get OpenGL 2.0 on Windows 8 ? I need to use it.

    I need to use OpenGL 2.0 or Higher because I get some appication. But this appication show error windows "Current OpenGL version 1.1 is too low, 2.000000 expected". So I want to get OpenGL version 2.0 or Higher. How to get it ? Please answer me, Than