Have a combobox pre-filled using data from database

What would be a recommended method to have a combobox
pre-filled using data from database?

You can load an Array with the data returned from your
database and bind to that array as the dataProvider for the
comboBox.
[Bindable]
private var myArrayDP:Array = new Array();
//Load the array with your returned data.
<mx:ComboBox dataProvider="{this.myArrayDP}">
</mx:ComboBox>
Using an ArrayCollection however is often better if you want
changes to the dataProvider to automatically reflect in the
ComboBox.

Similar Messages

  • Create JTree using data from DataBase

    Hi all,
    I have GUI with JTree, and i have data in database with ParentID, ChiledID fileds,
    i want to crate tree structure from using data in database.
    can you people tell me how can i proceed, I will get a data as List of Vectors from DB.
    Thanks
    Daya

    i got the solution,
    what i did i having object class extended DefaultMutableTreeNode and i have list of objects class refrence and i know which is parent and a child so just add the child refrence to parent refrence which stored in list.
    Thanks
    daya

  • Creating XML file using data from database table

    I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
    It would be great if you can suggest some approach to achieve my requirement.
    Thanks,
    -Vinod

    An example from the forum: Re: How to generate xml file from database table
    Edited by: Marco Gralike on Oct 18, 2012 9:41 PM

  • Combo filled with data from database

    i want to display the list of schemas dynamically in a combo box and then display the tables in that schema. i tried a servlet; but the schemas are not displayed.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    public class try extends HttpServlet
         public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
         PrintWriter out;
         res.setContentType("text/html");
         out = res.getWriter ();
         try
         out.println("<html>");
         out.println("<head>");
         out.println("<script language='javascript'>");
         out.println("function one()");
         out.println("{");
         out.println(" ResultSet rs=st.executeQuery('select distinct owner from all_tab_columns')");
         out.println("while(rs.next())");
         out.println("{");
         out.println("var newElement=document.createElement('option')");
         out.println("newElement.value=rs.getString(1)");
         out.println("document.form1.table1.options.add(newElement))");
         out.println("}");
         out.println("}");
         out.println("</script>");
         out.println("</head>");
         out.println("<body>");
         out.println("<form name=form1 action=http://mysystem:9000/servlet/query method=post>");
         out.println("Schema name");
         out.println("<input type=textbox name='user'><br>");
         out.println("Password");
         out.println("<input type=password name='pwd'><br>");
         System.out.println("Password");
         out.println("Table Name");
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         Connection m_connection;
    m_connection = DriverManager.getConnection("jdbc:oracle:thin:@mysystem:1521:oracle8","scott","tiger");
         Statement st=m_connection.createStatement();
         System.out.println(st);
         out.println("<select name='table1' onFocus=one();>");
         out.println("<option value=' '>");
         out.println("</option>");
         out.println("</select>");
         out.println("<br>");
         out.println("<input type=submit>");
         out.println("</form>");
         out.println("</body>");
         out.println("</html>");
         }catch(SQLException s){
              out.println("Trial");
         catch(java.lang.Exception x){ }
    }

    If you're wanting to get data back from the database you're actually going to have to execute a query. The Statement:out.println(" ResultSet rs=st.executeQuery('select distinct owner from all_tab_columns')"); will print out the query you wish to run, showing it to the user, but it won't execute it.
    Try instead:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection m_connection;
    m_connection = DriverManager.getConnection("jdbc:oracle:thin:@mysystem:1521:oracle8","scott","tiger");
    Statement st=m_connection.createStatement();
    out.println("<select name='table1' onFocus='one();'>");
    ResultSet rs=st.executeQuery("select distinct owner from all_tab_columns");
    while(rs.next()){
    String val = rs.getString(1);
    out.println("<OPTION VALUE='" + val + "'>" + val + "</OPTION>";
    rs.close();
    st.close();
    out.println("</select>");

  • Question regarding Polling data from database using DB Adapters in BPEL

    Hi,
    I have the following question regarding Polling data from database using DB Adapters in BPEL -
    If I am selecting data from multiple tables/view to ultimately generate hierarchical xml document, is there a way that I specify polling all of these tables/views. Is polling limited only to one table/view?
    Thanks
    Ravi

    Hi Ravi,
    your question seems to have been answered for the question of polling a set of tables with one as the root, and getting back a hierarchical xml representing multiple related tables.
    However you can also poll for changes to both the root table and its related tables. Not sure if this was your question or the one already answered. If the former please check out the sample
    bpel/samples/tutorials/122.DBAdapter/advanced/polling/PollingForChildUpdates
    Thanks
    Steve

  • I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. years each month.

    I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but need to report each month.

    Hi Tony,
    Answering your question would be easier given a screen shot of the source table and one of what you want the summary table to look like.
    Is the data you want for each month in a single cell o the source table, or does the summary table need to collect February's data (for example) from several cells and do some math with those numbers before presenting them on the summary table?
    Regards,
    Barry

  • Filtering using data from a spreadsheet in WebI

    I need to convert a BO6.5 Full client report to a BO XI R3.1 WebI report.  The report needs to use data from an Excel spreadsheet to filter data from a universe, and in 6.5 this was achieved by creating a universe for the spreadsheet data and using 'Select Query Results' as an operand returning this data in the report conditions.  When we put this report through the conversion wizard the conversion fails.
    Are there any other techniques that can be used in WebI that would allow me to use a spreadsheet to filter / join with a query from a 'regular' universe?
    Thanks,
    Steve Clarke

    Thanks for the response! I'd be interested in writing a script for it (I've actually been researching it a bit already). I'm completely new to Javascript (and scripting) but have a fair level of experience with c/c++ so I feel it shouldn't be too bad. I'll ask here for now, just let me know if I should ask a new question on the scripting forum instead.
    I've looked at the Acrobat JavaScript API Reference (http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf) a bit but am having trouble finding a way to read the spreadsheet's data in (I was planning on using a csv file). I found Doc.importTextData(), which can parse a tab delimited file and from the sounds of it fill in the forms automatically (though I would much prefer a c style file interface that lets me write the parsing logic). Every time I try to call importTextData it returns -1 though, which means "Warning: User Canceled File Select". When I call it direct from the JavaScript Debug Console I just get a -1, but when I have it execute when I save I get "NotAllowedError: Security settings prevent access to this property or method.". I did a bit of research on that and modified my script to look like:
    Autofill = app.trustedFunction(
        function ()
            app.trustedFunction(importTextData);
            app.beginPriv();
            var result = this.importTextData("test.csv", 0);
            app.endPriv();
            return result;
    I've also tried running Acrobat as an administrator, but I still get the same error. I could just not be understanding privileges correctly.
    My overall plan was:
        for each row in the spreadsheet
            - read the row in from the file
            - fill out the fields in the PDF using the read data
            - save the file with a new file name.
    If there is a better method to do this, just let me know.
    Thanks again for your time!

  • Standard Proxy enhanced unable to fill the data from xml to the structure

    Hi All,
      We have enhanced a standard proxy structure in PI, generated the proxy in the target system SCM, but the call transformation is not filling the data from xml into the appended field.
    Am i have to do any thing to fill the data.
    Thanks.
    Chaitanya Naru

    Hi Srikant,
    You can use the following code. This works for me.
      Remember to set the multiplicity of the User structure to 0...N or 1...N
    IGPStructure inputStructure = m_context.getInputStructure();
    Collection inputItems = inputStructure.getStructures("User");
    if(inputItems == null){
    return;
    for (Iterator iter = inputItems.iterator(); iter.hasNext();) {
    //get input item structure and fill context
    IGPStructure item = (IGPStructure) iter.next();
    String attrName=
    item.getAttributeAsString("AttrName");
    Thanks & Regards,
    Dipankar

  • How to use data from standard view in Web dynpro for ABAP

    Hello:
    I have to create an Abap Web Dynpro, and I must use data from a standard view in the new one. Does anybody know what do I have to do?
    Thank you and have a happy new year.

    Hi Rodrigo,
    Firstly, list the Standard component under Component Usage of the Component which you are creating in your View.
    Second, In the Custom Component, view, goto context, and try to add the node from the Standard component in to your view.
    NOTE: The second step requires a Node in component controller of the Standard Component.
    Finally, Now in your view, get the data from that and map the data.
    NOTE: To do this, I think you need to call your Standard WDA first and then only your node contains data and it will be passed.
    I hope it is helpful.
    Regards,
    Shashikanth. D

  • How to fetch data from Database using SUP MBOs

    I'm learning to develop blackberry apps using SUP.I am new to both blackberry api and SUP.
    I need to make a login page for a Student and then validate the username and password entered using data from a database.
    I need to check the database for the username and password entered. What should be my next step? How do i get this data from the database. Using findAll() method is not working . Do i need to connect to SCC or unwired server first. If yes , then someone please provide a sample code for it.

    Hi!, I see your code and I see that you have a fee errors, try to use this:
    import java.text.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.OutputStream;
    * NOTE: You must put the try-catch and your sql code into the get method
    /** Servlet program to take fetchdata from database and display that on the broswer*/
    public class Fetchdata
        extends HttpServlet {
      String query = new String();
      String uid = "ashvini";
      String pwd = "******";
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws
          ServletException, Exception {
        try {
          Connection con = null;
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String url = "jdbc:odbc:Testing";
          con = DriverManager.getConnection(url, uid, pwd);
          Statement s = con.createStatement();
          query = "select * from gowri.msllst1";
          ResultSet rs = s.executeQuery(query);
          response.setContentType("text/html");
          ServletOutputStream out = response.getOutputStream();
          out.println("<HTML>" + "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                      "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                      "<table>" + " <th>ITEM Code</th>");
          while (rs.next()) {
            out.println("<tr><td>" + rs.getString(1).trim() + "</td></tr>");//I change </tr></td> for </td></tr>
          } //end of while
          out.println("</table></BODY></HTML>");
        catch (Exception e) {
          System.out.println(e);
      } //end of doGet method
    }I hope this help you :)

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • Is there a way to retrieve data from database wihout using JDBC while using JPDK?

    Hi,
    I want to create a portlet using JPDK with extra render modes and edit/Edit defaults mode too. The detail and show renderer mode jsp's/servlets render data from database. Based on the personalized paramter, the data rendered in detail and show mode will be obtained from database.
    The articles in the PDK zip asks not to use JDBC for security vulnerability. Does that mean , I should not use JDBC to connect to db to get data. If not, what should I use ? How do I connect to database ? Is there any class which helps to connect to db without using JDBC ?
    thanks,
    Mainak

    I'm not sure what articles you are refering to, because there is no other way to access a database from a java program. Generally, security related docs tend to be a little paranoid (and so they should be), but you have to balance high security against getting the job done.
    Obviously, if using JDBC, you need to be careful about protecting your config files because they will contain connection information.

  • I have downloaded OS X Yosemite using recovery from boot but while installing error occuring showing unable to extract essential.pkg so can't install. problem is i have already formatted my drive and dont have any os right now. please help

    i have downloaded OS X Yosemite using recovery from boot but while installing error occuring showing unable to extract essential.pkg so can't install. problem is i have already formatted my drive and dont have any os right now. only the downloaded new os x yosemite in the os x base system. please help

    Please try again after taking each of the following steps that you haven't already taken.
    Step 1
    Reset your computer’s PRAM.
    Step 2
    If your model has user-replaceable memory, and you've upgraded the memory modules, reinstall the original memory and see whether there's any improvement. Be careful not to touch the gold contacts. Clean them with a mild solvent such as rubbing alcohol. Aftermarket memory must exactly match the technical specifications of the machine.
    Step 3
    Back up all data to at least two different storage devices, if you haven't already done so. One backup is not enough to be safe. The backups can be made with Time Machine or with Disk Utility. Preferably both.
    Erase and install OS X. This operation will destroy all data on the startup volume, so you had be better be sure of the backups.
    Step 4
    Make a "Genius" appointment at an Apple Store, or go to another authorized service provider to have the machine tested.

  • Retrieving Data from database to combobox

    Hi
    Can anyone help in retrieving data from database to combobox..
    All the names of employees and their designations are stored in database.so i want retrieve them in other page.
    both designation and names of employees are comboboxes.
    after loading tha page i need to get all the designations which are stored in database in first combobox and when i select a particular designation i need get all tha names of employees of that designation in other combobox.this has to be done using jsp and ajax.
    please can anyone give me the code for this using Ajax and Jsp.

    Hello Friend try this code
    dbdata.jsp
    <%@page language="java" import="java.sql.*"%>
    <html>
    <%
    Class.forName("..........");
    Connection n=DriverManager.getConnection ("....","...","...");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select ename from emp");
    %>
    <body>
    <form>
    <select>
    <%
    while(rs.next())
    %>
    <option><%=rs.getString("ename")%></option>
    <%
    %>
    </select>
    </form>
    </body>
    </html>

  • Does Facetime Use Data From You Data Plan?

    Does Facetime Use Data From You Data Plan?
    If so, what would be a good plan to use :200MB, 2 GB, or 2GB + Tethering?
    Or Does it use up minutes?

    Facetime uses wi-fi.
    "People have been dreaming about video calling for decades. iPhone 4 makes it a reality. With just a tap, you can wave hello to your kids, share a smile from across the globe, or watch your best friend laugh at your stories — iPhone 4 to iPhone 4 or to the new iPod touch over Wi-Fi."
    http://www.apple.com/iphone/features/

Maybe you are looking for

  • I accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    i accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

  • Leaked connection problem

    Hi, I was getting the below error in BPEL server console, while trying to read data from oracle database: 06/03/20 11:28:33 OrionCMTConnection not closed, check your code! 06/03/20 11:28:33 Logical connection not closed, check your code! 06/03/20 11:

  • Change language in iTunes

    Since a few weeks my I-Tunes changed from German to English. Under Edit-Preferences-General-Language German is selected but my I-Tunes wont change the language. Any Ideas? THX for help

  • Trouble installing Acrobat XI

    I get the folowing message when tryin to install Acrobat XI from Adobe Application Manager: Exit Code: 7 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW050 ... -------------------------------------- Summary

  • Querying windows service from Java

    Hi All, i have a java web application running on jboss that does data collection by querying different windows processes like MSSQLSERVER, IIS availability etc. The problem i am facing is that my application is returning a negative result for the abo