How to populate a ComboBox with data from a WebService

I have a simple application that has a DataGrid that gets its
data from a web service. I would prefer to put that data into a
ComboBox instead of a DataGrid. My web service returns objects.
Anyone have any idea how to do that?
<mx:DataGrid id="dgProjects"
dataProvider="{ws.getProjects.lastResult}" >
.....<mx:columns>
..........<mx:DataGridColumn dataField="projectID"
headerText="Project ID" width="100"/>
..........<mx:DataGridColumn headerText="Project Name"
dataField="projectName"/>
..........<mx:DataGridColumn headerText="Doc UNID"
dataField="docUNID" visible="false"/>
.....</mx:columns>
</mx:DataGrid>

I tried that but it doesn't work. However, I just found part
of the solution and that was to add labelField="projectName".
That worked. Now, I want to glue together projectID with
projectName and a dash between them. So I changed it to labelField
= "projectID - ProjectName" and that causes the combo box to
display [Object] [object].
Any ideas how to glue those items together?

Similar Messages

  • Table - populate one table with data from the list of another table

    Hello All,
    I am a newbie in Swing and am a book and few tutorials old.
    I am trying to achieve the following:
    (1) I populate Table1 (a JTable) with a list of data - each row consists of several columns. And I have a Table2 (also JTable) that is in the beginning empty.
    Both the tables (Table1 and Table2) are showed in the window.
    (2) Lets say, there's a button (JButton) in between the two tables.
    Now if I Select a row from Table1 and press the button, this row will be sent/copied to Table2.
    And this way I can choose different rows and pass the data to Table2.
    I have manages to make Table1 and put data in it ... but for the rest, I don't know where and how to begin.
    Would appreciate some ideas and tips.
    Thank you.

    Since you are using a button to start the copy process you don't need to worry about a ListSelectionListener or a MouseListener. You need to create a button with an ActionListener that does the following:
    a) Create an Array based on the size of the number of columns in the table
    b) get the index of the selected row
    c) populate the Array with data from the TableModel by using the table.getModel().getValueAt(...) method for each
    d) Now you can add the row of data to the other JTable by updating its model.
    DefaultTableModel model2 = (DefaultTableModel)table2.getMode();
    model.addRow( theArray );

  • Trying to populate a table with data from WebRowset

    Hi,
    I want to be able to populate my tables with data from WebRowsets that have been saved to files. Everything goes good until I get to acceptChanges(). At which point I get a NullPointerException.
    Here's the code...
    WebRowSet wrs = new WebRowSetImpl();
    FileReader reader = new FileReader(inputFile);
    wrs.readXml(reader);
    wrs.beforeFirst();
    CachedRowSet crs = new CachedRowSetImpl();
    crs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider");
    crs.populate(wrs);
    crs.beforeFirst();
    crs.acceptChanges(con);
    Results in...
    java.lang.NullPointerException
    at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:867)
    at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:919)
    I'm using Java 1.5_02. I looked at the source code for CachedRowSetImpl, and the only thing I could think of is that maybe "provider.getRowSetWriter()" in the following snippet is returning null....
    public void setSyncProvider(String s)
    throws SQLException
    provider = SyncFactory.getInstance(s);
    rowSetReader = provider.getRowSetReader();
    rowSetWriter = (TransactionalWriter)provider.getRowSetWriter();
    Any ideas?? Thanks!

    I have the same problem after setting com.sun.rowset.providers.RIXMLProvider.
    Looks like a bug to me.
    By the way, why are you creating a new CachedRowSet and populate it with a WebRowset (which extends CachedRowSet)?

  • Populate SQL table with data from Oracle DB in ODI

    Hi,
    I am trying to populate a source SQL table with fields from an Oracle db in ODI. I am trying to perform this using a procedure and I am am getting the following error:
    ODI-1226: Step PROC_1_Contract_Sls_Person_Lookup fails after 1 attempt(s).
    ODI-1232: Procedure PROC_1_Contract_Sls_Person_Lookup execution fails.
    ODI-1228: Task PROC_1_Contract_Sls_Person_Lookup (Procedure) fails on the target MICROSOFT_SQL_SERVER connection Phys_HypCMSDatamart.
    Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'C2C_APP.CON_V'.
    My question is what is the best method to populate SQL db with data from an Oracle db? Using a procedure? A specific LKM?
    I found threads referring to using an LKM to populate Oracle tables with data from a SQL table....but nothing for the opposite.
    Any information would help.
    thanks,
    Eric

    Hi Eric,
    If using an Interface, I would recommend the LKM SQL to MSSQL (BULK) knowledge module. This will unload the data from Oracle into a file, then bulk load the staging db on the target using a BULK INSERT.
    Regards,
    Michael Rainey

  • Loading a combobox with data from a different domain

    I have filled in a combobox with values from an .asp page and
    have used it
    successfully. The problem is that if the flash file is ran
    from a different
    domain from the load location, the combobox doesn't get
    filled in (as
    apposed to the error if I ran it off of my drive).
    datafeed.asp spits out the appropriate stuff for the AddItems
    function to
    read correctly. (as I has said, it does work). The combobox
    gets filled in
    the development environment (Macromedia Flash MX Professional
    2004) as well
    as flash player.
    But when I upload it to one of my other websites, the data is
    never
    retrieved. Even though that the webserver containing the data
    feed, the
    webserver hosting the flash file and my machine can all read
    datafeed.asp.
    Am I missing a setting that allows a flash file to read data
    from another
    domain?
    The following code has been changed for security reasons. But
    believe me it
    works in its original format.
    myData = new LoadVars();
    myData.onLoad = AddItems;
    myData.load("
    http://www.mydomain.com/datafeed.asp")
    function AddItems() {
    for (i=0; i<numItems; i++) {
    var ProductID = eval("myData.ProductID"+i);
    var ProductName = eval("myData.ProductName"+i);
    var ProductSale = eval("myData.ProductSale"+i);
    var DataProvider = { productid
    roductID, productsale
    roductSale };
    _root.application.chooseproducts.prodlist_cb.addItem(ProductName,
    DataProvider);
    Thank You,
    Julian

    not sure, but this might be what you need...
    //allow loading of files from domain
    System.security.allowDomain("
    http://www.mydomain.com");

  • How export one table along with data from one location to other location

    Hi All,
    I'm new in export/import practice.
    Can anyone plz tell the steps along with commands to do the following:
    1. I want to export a table with data from one location(computer) to other(computer) that are in same network.
    2.Also from one user to another user.
    I'm using oracle 10g.
    regards
    Sonia
    Edited by: 983040 on Feb 19, 2013 11:35 PM

    First of all read documentation
    Oracle Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/exp_imp.htm
    Datapump Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm
    If you are using Datapump or Traditional Export/import you need to follow following steps
    *1) Take User dump via EXPDP on Computer A .*
    For EXP
    exp username/password owner=Test file=D:\test.dmp log=D:\test.log
    For EXPDP
    expdp username/password schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=TEST.log*2) Copy that to Computer B*
    *3) Import dumpfile.*
    For IMPDP  Use remap_schema optionhttp://www.acehints.com/2012/05/data-pump-impdp-remapschema-parameter.html
    For IMP use fromuser and touser option
    one user to another user imp

  • How to import whole database (with data) from remote server?

    I am using oracle sql developer 2.1. Our main database server is in USA, we use this from Bangladesh. We also a local copy here time to time updataed.
    Is there any way copy or migrate the whole database with data from usa server to our local serve using sql developer 2.1?
    we use windows server 2003 service pack 2 in local server.

    I replied to you in Import Data wizard not found and stand by my suggestions.
    Regards,
    K.

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

  • How to fill a table with data from columns & rows from a txt file

    I am trying to fill say:
    Myname     Myclass     Mycollege
    Mohan     MD     Stanford
    from a txt file into 3 columns of a table. I can easily do it into a textarea component by
    clicking a button:
    try{
    FileReader fr = new FileReader("F:/CreatorProjects1/stan.txt");
    BufferedReader br = new BufferedReader(fr);
    String s1="";
    String s="";
    stantxtarea.setValue(s);
    while((s=br.readLine())!=null) {
    s1 = s1+s;
    s1=s1+"\n";
    stantxtarea.setValue(s1);
    br.close();
    fr.close();
    } catch(Exception e) {
    e.printStackTrace();
    return null;
    All table components seem to need a database. I do not use any database. I run exe files that give output to txt files. How to solve it?
    I appreciate any help in this regard...
    dr.mohan rao

    there may be another way. This is some thing some thing I can recommend. You can create property type of ObjectListDataProvider in session or application based on the scope you required. Create web bean class with property you want to show in the column (say col1, col2, col2). Initialize the list property like similar below
    List dataList = new ArrayList();
    ObjectListDataProvider mytableprops = new ObjectListDataProvider();
    try {
    //start loop read data from your txt file
    //create instance of web bean for each line
    //add web bean instance into dataList
    //end of loop readind data from txt file
    oldpins.setList(dataList );
    oldpins.setObjectType(NotificationProfileBean.class);
    } catch (Exception ee1){;}
    return oldpins;
    Sri Thuraisamy

  • How to Set a Variable with data from Srouce Data Store

    Hello ODI Experts,
    I have created a Physical & Logical Schema and a Source Data store to pickup data from a database table.
    On the other hand, I have a few variable that I will pass in a web service call (ODIInvokeWebService tool).
    Would yo please guide how I can set variables from my source data store.
    Thanks & Regards,
    Ahsan

    Hello Bos/Damodhar/ODI Experts,
    Doesn't it gives me a less optimized approach picking one column per query (per variable)?
    Lets say, I have to pick 35 columns from a table and put those in 35 variables...It would mean running 35 queries for fetching one record from the database table.
    Doesn't it seem less performance effective (less optimized)..a little scary..any thing better that I can do to make it more optimized?
    Another question, what if multiple new values have come in the DB table, since I am using Refresh Variable, would this variable have multiple values in it?
    Thanks for all your help,
    Ahsan
    Edited by: Ahsan Asghar on 21-Jun-2011 07:46

  • How to Extract email subject with date from outlook?

    Hello,
    I am new to powershell and was wondering how i can extract the email subject with date for entire last month? i need to generate a report every month end and have to go through all the emails which can be very cumbersome at times. 
    Divyansh 
    Divyansh

     Ok i was able to find the commands but it only list email which are exactly 2 week old .. it does not list the recent items ..  
     Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null
     $olFolders = "Microsoft.Office.Interop.Outlook.olDefaultFolders" -as [type] 
     $outlook = new-object -comobject outlook.application
     $namespace = $outlook.GetNameSpace("MAPI")
     $folder = $namespace.getDefaultFolder($olFolders::olFolderSentMail)
     $folder.items  | where { $_.SentOn -gt [datetime]"3/1/2014" -AND $_.On -lt [datetime]"3/25/2014" }  | Select-Object -Property Subject, SentOn, Importance, SenderName
    Divyansh

  • Populate PDF template with data from another form

    Hi all, it's been a while since I've been here. I'm not a LC pro by any stretch, but I've been working on a personal project which I hope will someday result in a small business. The idea is simple: a client fills out a custom form in Acrobat Reader which I've created in LC Designer. Upon completion, they email the pdf (or XDF, or XML, or E4X or whatever might be possible, I'm not even sure!) back to my website.
    On my end... and this is hopefully automated... the data would be injected into a template PDF the client needs. This would then be sent back via email for them to print.
    It's been over a year since I worked on this. Both the front end forms and the pdf templates are built, but the interaction between receiving the client data and populating the template form never got worked out.
    Could anyone provide me with a clue as to what this workflow might look like?
    Just to be clear, this application would be waaay too small to even think about going the Enterprise route. I'm "thinking" the automation part of it would be handled by some custom PHP coding, but that's another story.
    Thanks!
    Graham Calhoun

    Thanks PMG.
    Yes, I am wedded to the idea that I will only use Adobe PDF. The server component is a whole other story though. I understand the value of it, but as a small business, the idea of coughing up 60k is pretty much out of the question. Especially given that this form is a one of a kind, simple, time saver for my prospective clients.
    From what I understand about LC, Acrobat and Reader, there are severe limitations imposed on saving form information in Reader. My clients need to be able to do that, as the form is quite extensive and needs to be revisited to be sure information is correct.
    While any one user will probably not exceed the 500 submissions issue, hopefully there will be more than 500 users submitting 1 time!
    We'll see if I can work around this issue.

  • How to load my tree with data from SQL database????

    Hello friends
    May i know how i can load my tree with my database??
    i have 3 different tables and i need them to be the 3 main nodes of my tree
    They are
    1.fiche
    2.amis and
    3.famille
    and in each of these nodes need to load the 3 databases
    thank u in advance

    Heres my program so i loaded my vector ,
    Now how can i integrate the coding u gave me, and where ??
    Is it where i put the quetion mark?
    if so
    can you tell me how?? because i didnt understood well the codings you gave me as im nt at all familiar with this
    Thank you in advance
    public class carnetf extends javax.swing.JFrame  {
       DefaultMutableTreeNode root =null;
        public carnetf() {
           root= new DefaultMutableTreeNode("Carnet");
            DefaultMutableTreeNode tnFiche=new DefaultMutableTreeNode("Fiche");
           root.add( tnFiche);
            DefaultMutableTreeNode tnAmis=new DefaultMutableTreeNode("Amis");
            root.add( tnAmis);
            DefaultMutableTreeNode tnFamille=new DefaultMutableTreeNode("Famille");
            root.add( tnFamille);
           initComponents();
        public Vector vecfiche() {
            Vector v = new Vector();    
            Connection connection = null;
            try
                Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());;
            catch (Exception E)
                System.out.println("Unable to load driver.");
                System.out.println(E.getMessage());
                E.printStackTrace();
                return null;
            try
                connection = DriverManager.getConnection( "jdbc:microsoft:sqlserver://localhost:1433;user=sa;password=sa;DatabaseName=carnet");
            catch (Exception E)
                System.out.println("Unable to connect.");
                System.out.println(E.getMessage());
                return null;
            try
                Statement Stmt = connection.createStatement();
                if(jRadioButton1.isSelected()==true)  
                    String Query = "SELECT * FROM fiche";
                ResultSet RS= Stmt.executeQuery( Query );
                while ( RS.next())
                 v.add( new vecfiche( RS.getString("Nom"), RS.getString("Prenom")));
                if( RS!= null) RS.close();}
                if(jRadioButton2.isSelected()==true)  
                    String Query = "SELECT * FROM amis";
                ResultSet RS= Stmt.executeQuery( Query );
                while ( RS.next())
                 v.add( new vecfiche( RS.getString("Anom"), RS.getString("Aprenom")));
                if( RS!= null) RS.close();}
                if(jRadioButton3.isSelected()==true)  
                    String Query = "SELECT * FROM famille";
                ResultSet RS= Stmt.executeQuery( Query );
                while ( RS.next())
                 v.add( new vecfiche( RS.getString("Fnom"), RS.getString("Fprenom")));
                if( RS!= null) RS.close();}
                if( Stmt!= null) Stmt.close();
            catch (Exception E)
                System.out.println("Unable to query.");
                System.out.println(E.getMessage());
                return null;
            try
                connection.close();
            } catch (Exception E)
                System.out.println("Unable to close.");
                System.out.println(E.getMessage());
                return null;
            return v;
        }

  • How to replace song metadata with data from iTunes store?

    I have a rather large itunes library.  A long time ago I tried to simplify the genres in my library and changed the genres of most tracks from what they were in the itunes store.  Now I would like to change the generes (and all metadata) of all the tracks I own that have matches in the itunes store to what they are in the itunes store.  Can this be done?  I have subscribed to itunes match if it matters.  Thanks.

    Thanks ed2345 but I already thought of that.  Unfortunately for me but fortunately for many many others, doing that maintains all metadata changes you've made to any tracks.  I would think they would simply have a menu dropdown or right click option that says something like "replace metadata with itunes store" or something to that effect.

  • How to populate DB column with filename from file browse item?

    Hi,
    Using APEX 3.1.2, I'm trying to easily allow maintenance of a filename stored in a DB column (VARCHAR2(1000)). Using the column as a file browse item seemed to be the way to go, but of course I don't want the resulting file to be uploaded and it appears as though an existing filename is not shown in a form when the row is retrieved.
    After much searching, I found Checking filename length in File Browse item before uploading , but I'm not able to connect the dots. I was thinking that I could create a hidden file browse item and use a button to call Javascript function to activate it, then save the resulting filename to my DB column item and wipe out the hidden item before it was uploaded. But the hidden item doesn't appear, so I'm not able to reference it's form input name.
    Hopefully this mess makes sense. Anyone?
    Thanks!
    Rich
    Edited by: socpres on Sep 5, 2008 2:02 PM because message was truncated after attempting to preview it first.

    Hi John,
    From what I can tell, the path of a local file browsed from a file browse item cannot be retrieved because of security concerns. Although, it seems that while Firefox 3 only returns the filename sans directory, IE6 returns the full path:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head><title>Form Test</title>
    </head><body>
    <script type="text/javascript" language="JavaScript">
    function GetDirectory()
    strFile = document.FileForm.filename.value;
    intPos = strFile.lastIndexOf("\\");
    strDirectory = strFile.substring(0, intPos);
    alert(strDirectory);
    document.FileForm.Directory.value = strDirectory;
    </script>
    <form id="FileForm" name="FileForm">
    <input type="file" id="filename" name="filename" value="" onChange="GetDirectory(this.value)">
    <input type="hidden" id="Directory" name="Directory" value="">
    </form>
    </body>
    </html>
    This Win-specific code displays the path via IE6, but not in Firefox 3. Then again, I can't seem to preview posts here using FF3, either...
    Rich

Maybe you are looking for

  • Best practices for Edit Proxies in Final Cut Server?

    We just bought Final Cut Server, and for the most part are pretty happy with the product. We are a small production facility, and primarily work with DVCPro HD footage at 720P. One feature we'd like to use would be the edit proxies feature in FCS, bu

  • AS A ROUTER

    I only want to use this pixi for a phone and a router for my notebook. I've been trying every day all day for 1 week now and it just ain't gonna happen. Seems like nobody knows how including verizon,palm,the manual{duh}. Cauliflower ear staring to ge

  • Problem when i try reconnect the same user to tuxedo 8.0

    Hello I build a dll for use in a java application by JNI. This dll work very fine under Tuxedo 6.4. Now I use Tuxedo 8, I recompile the dll for tuxedo 8 and try my system, this work fine. The problem is that my application detect a network error and

  • Re: set up 2 airports to extend range

    I have the new airport extreme 802.11n base station. I also have the old airport extreme base station. I want to be able to extend the range to another building. How do I set this up? We are on a network in the office. If I plug it into the hub then

  • IPad mail won't load

    I recently tried to send a message with my comcast mail account on my iPad mini when ALL of my email disappeared -- everything! Should I delete my account from my iPad and somehow reinstall it? Will it wipe out my comcast account on my iPhone and Mac