How to fill a ComboBox with data from a Web service

I have a simple application that contains a DataGrid control that gets its data from a web service. I prefer to put these data in a ComboBox instead of a DataGrid control. My web service returns objects.

Someone has an idea how to do?

< mx:DataGrid id = dataProvider = "{ws.getProjects.lastResult"dgProjects"}" > "
... < mx:columns >
... < mx:DataGridColumn dataField = "projectID" headerText = "ID of project" width = "100" / >
... < mx:DataGridColumn headerText = "Project name" dataField = "projectName" / >
... < mx:DataGridColumn headerText = "Doc UNID" dataField = "docUNID" visible = "false" / >
... < / mx:columns >
< / mx:DataGrid >

Exactly what I needed.

Thank you very much!!!

Tags: Flex

Similar Questions

  • Exception during consumption of huge data from a web service.

    Hello

    I m developing an application to receive data from a Web Service and retain the data received on the device.

    App is developed for OS 4.3.0

    The Web Service call is made using Ksoap. The Code receives the data from the web service, analyzes the data and stores it in an object. This object is then persisted on the device. The data are essentially the coordinates. It takes the number of contacts required as input and passes it to the Web Service. The Web Service then returns the requested number of records

    The code works if I ask data of up to ~ 600 cases. If I specify more than 600 cases, it throws the following exception

    Chain rg.xmlpull.v1.XmlPullParserException:unexpected type (position: TEXT entity request in T...@1:24 in java.io.InputStreamReader@1f87d1b4)

    When I debugged using Eclipse, this exception is thrown on this statement ht.call (soapAction, envelope);

    Would it be because of a time-out? OT is because the Analyzer is not able to analyze huge data?

    Given that this exception occurs on the declaration of ht.call, I guess the problem is with the web service call and not with the code for persistent storage.

    I have included the code here... Is could someone please show me what the problem is?

    C ode to call Web Services

    public Vector getWebData(String count)
        {
    
       Vector personsVectorto = new Vector();
        try
        {
        StringBuffer receivedContent = new StringBuffer();
        String serviceUrl = "........";
        String serviceNamespace = ".....";
        String soapAction = ".........";
    
       SoapObject rpc = new SoapObject(serviceNamespace, "GetContactsList");
            //rpc.addProperty("listSize", "5");
            rpc.addProperty("listSize", count);
         SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    
            envelope.bodyOut = rpc;
    
            envelope.dotNet = true;
            envelope.encodingStyle = SoapSerializationEnvelope.XSD;
            HttpTransport ht = new HttpTransport(serviceUrl);
            ht.debug = true;
    
            ht.call(soapAction, envelope); // This is where thexmlpullparser exception occurs
    
     Object obj = envelope.getResponse();
            SoapObject soapResult = (SoapObject)obj;
    
                for(int i=0; i < soapResult.getPropertyCount(); i++)
    
                {
                  PersonDTO personto = new PersonDTO();
               SoapObject choice = (SoapObject)soapResult.getProperty(i);
                if( choice!=null)
                {
                    for(int j = 0; j < choice.getPropertyCount(); j++)
                    {
                      receivedContent.append(" Reading Property Number" + String.valueOf(j) + " Value = " + choice.getProperty(j).toString());
    
         if (j==0) personto.setElement(1,choice.getProperty(j).toString());
        if (j==1) personto.setElement(2,choice.getProperty(j).toString());
        if (j==2) personto.setElement(3,choice.getProperty(j).toString());
        if (j==3) personto.setElement(4,choice.getProperty(j).toString());
        if (j==4) personto.setElement(5,choice.getProperty(j).toString());
         if (j==5) personto.setElement(6,choice.getProperty(j).toString());
         if (j==6) personto.setElement(7,choice.getProperty(j).toString());
          if (j==7) personto.setElement(8,choice.getProperty(j).toString());
         if (j==8) personto.setElement(9,choice.getProperty(j).toString());
       if (j==9) personto.setElement(10,choice.getProperty(j).toString());
                    }
                }                 
    
                personsVectorto.addElement(personto);
                //storepersistentobject(personsVectorto);
            }
    
            }catch(org.xmlpull.v1.XmlPullParserException ex2)
            {
                String bah1 = ex2.toString();
                Dialog.alert("String: " + bah1);
                String bah2 = ex2.getMessage();
                Dialog.alert("Message: " + bah2); 
    
            }       
    
            catch(Exception ex){
                String bah = ex.toString();
                Dialog.alert("Response: " + bah);
    
                }
    
                return personsVectorto;
        }
    

    Thank you

    Hi Philippe,.

    First Question: Print server response

    Yes - I think for you too in fact just print the answer you'll have to do a regular HTTP call to the server and print it like this:

    StringBuffer sb = new StringBuffer();

    int thumb;

    HttpConnection httpConn = (HttpConnection) Connector.open (url);

    httpConn.setRequestMethod (HttpConnection.GET); or by POST depending on your needs

    in = httpConn.openInputStream ();

    While ((thumb = in.read ())! = - 1).

    {

    SB. Append ((Char) inCh);

    }

    System.out.println ("server response:" + sb.toString ());

    Try and see if you get a request too large entity. Note: you should probably put your SOAP request in GET or POST http request.

    Second Question: Is zipping required?

    This is how I chose to do for my particular needs that transfer me a large amount of data and the compression algorithm seems to keep all my data well below 40 k. However, it is not the only way, you could actually make several requests and get data piece by piece, but I don't know if it works well with SOAP responses. Depending on the type of Network Setup Blackberry you have, you can also set this limit to be higher (I think a maximum of 1 024 Ko for BES).

    Third Question: Timeout Logging

    For wait times, usually the exception you get should indicate that there was a timeout, but if you are suspicious that it's a timeout check your web service and see.

    Hope that helps!

    R

  • Does anyone know how to get data from a web service of Labview with ajax or JSON?

    Hello

    I try to use ajax and json to service Web restful which I build with the labview. However I get errors

    For example. I create a web service from a labview vi (z = x / y http://localhost: 8080/math/divide/5/20 will give {Z: "4,000,000"})

    I get errors for the attached html files.

    Does anyone know how to get al labview WebService with ajax or json data?

    Thank you... Eran


  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • Extract the data from the web service response

    Hello

    I called a web service and in response to XML data, now I have to extract the values and store them in the array

    My steps,

    1 call WebService
    2 answer stored in the CLOB column
    3, then used after the request

    SELECT loc.*
    OF my_xml PO,.
    XMLTable (XMLNAMESPACES)
    "urn: schemas-microsoft-com: XML-diffgram-v1" as "diffgr".
    ,'http://api. .com / "as"ns0"
    )
    ,'/ ns0:DataSet / diffgr:diffgram/NewDataSet/OptOutAll '
    PASS xmltype.createxml (PO.xml_data)
    COLUMNS
    "E-mail" TANK (100) path "Email."
    'Reason' TANK (150) PATH 'reason '.
    ) As loc
    WHERE ROWNUM < = 10;

    I wrote using this example

    But it does not work, do not know why

    / Zab

    If I use the XML (stored in the table XMLType TMP_XML) below:

    
    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                          
                          
                          
                          
                        
                      
                    
                  
                
              
            
            
              
                
                  2012-05-09T22:40:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-07T22:30:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-14T00:20:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
                
                  2012-06-19T20:50:00+02:00
                  information
                  111111
                  Subscriber confirmed
                
              
            
          
        
      
    
    

    Then I can do:

    SQL> SELECT x.*
      2  FROM tmp_xml t
      3     , XMLTable(
      4         XMLNamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "soap"
      6         , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr"
      7         , 'http://api.***.com/' as "ns0"
      8         )
      9       , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll'
     10         PASSING t.object_value
     11         COLUMNS OptOutTime  TIMESTAMP WITH TIME ZONE PATH 'OptOutTime'
     12               , MailingList VARCHAR2(100)            PATH 'MailingList'
     13               , Reason      VARCHAR2(150)            PATH 'Reason'
     14       ) x
     15  ;
    
    OPTOUTTIME                          MAILINGLIST                    REASON
    ----------------------------------- ------------------------------ --------------------------------------------------------------------------------
    09/05/12 22:40:00,000000 +02:00     information                    Subscriber confirmed
    07/06/12 22:30:00,000000 +02:00     information                    Subscriber confirmed
    14/06/12 00:20:00,000000 +02:00     information                    Subscriber confirmed
    19/06/12 20:50:00,000000 +02:00     information                    Subscriber confirmed
     
    

    Are you getting something different?

  • XPath with XML from a Web Service

    Hello

    I've been tweaking data traction of a webservice and have managed to get the results that I need so I'm now at the stage where I want to do something useful with the XML that is returned, so I played with Xpath.

    I understand I can use Xsearch to draw the nodes of the XML object rather than having to write the XML to a file and then look in the file. The problem I have is that when I use Xsearch it does not extract data I'll be waiting.

    Here is the XML that is returned by the web service, which I attribute to the variable xmlReturned:

    <? XML version = "1.0" encoding = "utf-8"? >

    " < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema ">

    < soap: Body >

    " < GetChildLocationsResponse xmlns =" http://tempuri.org/VillarentersWebService/villa_search ">

    < GetChildLocationsResult >

    < RequestedParentID > 3924 < / RequestedParentID >

    < VRF / >

    < ChildLocations >

    < location >

    < LocationRef > 10 < / LocationRef >

    the Argentina < LocationDescription > < / LocationDescription >

    < ParentID > 3924 < / ParentID >

    < / location >

    < location >

    < LocationRef > 30 < / LocationRef >

    Brazil < LocationDescription > < / LocationDescription >

    < ParentID > 3924 < / ParentID >

    < / location >

    < / ChildLocations >

    < / GetChildLocationsResult >

    < / GetChildLocationsResponse >

    < / soap: Body >

    < / envelope soap: >

    So, when I use:

    < cfset locDescription = XmlSearch (xmlReturned, "//LocationDescription") / >

    < cfdump var = "#locDescription #" >

    I expect to see an array of 2 elements, the Argentina and the Brazil. What I actually get is an empty array. I tried using a Xpath Checker convenient online at http://www.zrinity.com/xml/xpath/index.cfm and I get the same result. I tried a little research different but every time the table is empty.

    Does anyone know why it is not pulling the knots required in the table? Am I missing something simple here?

    Or you could represent the namespaces in your xpath xmlsearch properties.

    Here is the first link that I got from a Google search for"namespace xmlsearch.

    http://www.aftergeek.com/2006/08/xmlSearch-XPath-and-XML-namespaces-in.html

  • Dynamic LOV with data to the Web Service Control

    Hi all

    I am currently working on JDeveloper 11.1.1.9.

    I want to implement a form of creation, for two of my form fields do correspond to LOV.

    The first is a LOV returned by a method of the web service (see back picture1) call, it works perfectly (see picture0).


    picture0:

    Capture1.PNG

    The other is represented by the nested list of the object returned by this method ( see picture1to taskPurposeList).


    Picture1:

    Capture.PNG



    By choosing a value in first af:selectOneChoice , I want to access the nested list in the second af:selectOneChoice.

    I have tried to map the second field directly to this list, but it is not updated (see image2).



    Capture2.PNG


    You have an idea on how to apply it?


    Thank you very much


    Leslie

    Hi all, sorry for taking the trouble,.

    I finally found the solution after several days of reflection and try.

    It is, when you select a value in the select list is not to update the current row of the iterator.

    Only, I've defined the current line of my iterator (mapped to the first list) parent according to the selected code in the list and update the second list like this:

    DCIteratorBinding taskTypeLOVIterator = ADFManagedBeanUtil.findIterator ("TaskTypeLOVIterator");

    Rank [] allRows = taskTypeLOVIterator.getAllRowsInRange ();

    for (line: allRows) {}

    {if ((Row.GetAttribute("ID").) {(Equals (valueChangeEvent.getNewValue ()))}

    taskTypeLOVIterator.getRowSetIterator () .setCurrentRow (row);

    }

    }

    AdfFacesContext.getCurrentInstance () .addPartialTarget (soc2);

    Setting the current row of the iterator parent automatically updated the second list.

    Thank you

    Leslie

  • How to fill the gaps with data?

    Hello

    I have data points with a header that contains the ID that I have to report to each row of data.

    I want the ID of the Patient to fill the fields below the rank (where the "Obs" and sequential numbers are) until it reaches the next patient id and then do the same thing again and again until the end.

    Is this possible in a single SQL UPDATE statement?

    Thank you, Daniel

    It's data, it's a column:

    Patient ID = system 1000207 = LVS + ZDV + ddI randomization Date = 26/03/2004
    OBS
    1
    2
    3
    4
    5
    6
    7
    Patient ID = regime 1000751 = LVS + d4T + 3TC randomization Date = 25/02/2004
    OBS
    8
    9
    10
    11
    12
    13
    14
    Patient ID = system 1001379 = LVP + d4T + 3TC randomization Date = 17/03/2004
    OBS
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    etc etc.

    Do you have any column order?

    If not, how you will order the data?

    If you have a column for the classification, the described selection will give you the id of the patient in all lines

    select col1,
           last_value(
              regexp_substr(col1,'Patient ID=([0-9]+)',1,1,null,1) ignore nulls
                    )
            over(order by ord_col) s
    from your_table;
    

    You can then use the MERGER based on the ROWID of update...

    Published by: JAC on May 21, 2013 20:18

  • How can I dynamically pull in data from a Web application to a native or hybrid application sold in the Apple/Android/Windows store?

    I built a few hybrid and native apps using the API of Wordpress, and now I need to make an app that has its roots in a site of BC.  I need to make an API call from a native application or hybrid in the webapp (name, image, content and llink) points.

    Sorry for the slow response, BC events no, other things such as CRM and other items Yes, just look to the top of the developer reference:

    The developer reference

    Where's the API V3:

    BRITISH COLUMBIA. Next - access all the data of British Colombia: output JSON everywhere, more REPOSENT API

  • Reading the data from a Web service

    Hi all

    I have a webservice that returns the square of the number.


    < s0:ZJK_FLEX_TEST.Response xmlns:s0 = 
    "urn:sap-com:document:sap:rfc:functions" 
    xmlns:SOAP - ENC = 
    "http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      
    <DATA1>0000016</DATA1>
    </s0:ZJK_FLEX_TEST.Response>
    
    

    the data1 contains the value.


    but I am not able to set this value in the text field in the flex.

    function() {return A.apply (null, [this] .concat ($A (arguments)))}

    public void result_getAll(event:ResultEvent):void

    {

    Alert.Show (Event.Result.ToString ());

    Here, I would like to put the value in the text field.

    }

    What do you see with this:

    Alert.Show (Event.Result.ToString ());

    What happens if you do the following:

    Alert.Show (Event.Result.Data1.ToString ());

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Support services and training, tutoring, Contracting, Flex

  • How to fill the DataGird with the data returned by the php page?

    Hi, I'm new to Flex, I try to fill DataGrid with data from PHP, my code is

    < mx:HTTPService

    id=" personRequest = URL "result ="getPerson (event)" http://localhost/searchPerson.php " useProxy = ' fake "method =" " POST "

    showBusyCursor ="

    true "resultFormat =" " E4X " >

    < /.

    MX:HTTPService >

    < mx:DataGrid

    id=" searchResult " " dataProvider =" {? what to paste here? } }" y="30"

    >

    < / mx:DataGrid >

    .....

    private

    function getPerson(evt:ResultEvent):Sub { }

    var res: XMLList = evt.result... Dane as XMLList;

    search results =

    new (Res) XMLListCollection;

    }

    ....

    output of PHP

    < person >

    < dane >

    < name > CBA < / name >

    < Street > XLXXLX < / street >

    < / dane >

    < dane >

    < name > DEF < / name >

    < Street > CIWU < / street >

    < / dane >

    < / person >

    If I set the dataProvider as search results "" it doesn't work. I have probably set all collection ArrayCollection as a dataprovider, but I don't know how to convert my XMLListCollection for her.

    Could someone help me complete Datagrid with

    name | Streer

    ABC, XLXXLX

    DEF, CIWU

    Best regards

    Mariusz










    After the datagrid control, you post the above code.

  • How to fill a field of date with today's date when the signature field is signed?

    How to fill a field of date with today's date when the signature field is signed? In the LCD, I insert a signature field and a date field, what parameters in these two fields are necessary to make this work? Is the date field, the value calculated? I tried different JS suggestions I found, but none work. In the form, I named the signature ClaimSignature field and the date in the ClaimSigDate field.

    The thought of her with a little help. In the script editor window, I selected the postSign event and added the following JS:

    Form1.Page1.ClaimSignature::postSign - (JavaScript, client)

    var date = new Date();

    var day = date.getDate ();

    var month = date.getMonth () + 1;

    var monthstring = (month, 10?) ('0' + month: month)

    year var = date.getFullYear ();

    var = year DateString + '-' + monthString + '-' + (day< 10="" "0"="" +="" day="" :="">

    ClsimSigDate.rawValue = dateString;

    I hope this helps someone else save time.

  • How can I get the filtered data from the first form

    How can I get the filtered data from the first form in a second form to make an update of the multi.
    Thank you very much

    William,

    I would use for this collections. A link is good if you need to pass a single value.

    1. create a collection
    2 fill the collection with your result set
    3. go in the page target and uses a method of a query in your link to this page
    4. your target page receives a request and allows you to edit documents.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to fill a datagrid with a web service result which is an array?

    I know how to fill a DataGrid to a CF of the web service that returns a query result. But what happens if I want to my CF component to run a query, then massage the data and back-is not a query - but a picture from the web service.

    Seems my two dimension table because ColdFusion has no column name, I need to create on the CF side name-value pairs or the side Flex. BTW, I prefer to use mx:webservice and not remoteObject.

    Any ideas on the best way to fill a datagrid from an array?

    Thank you.

    (Sorry for the previous double post).

    A colleague found the answer for me. I hope this saves someone else from 5 days of anquish!

    When a ColdFusion component returns an array of structures (not the result of a query), redesign the table as an arrayCollection collection throws an error.

    IT DOES NOT WORK:
    acSpeeds = new ArrayCollection (wsSpeeds.oneNode.lastResult);

    THIS WORKS!
    acSpeeds = wsSpeeds.oneNode.lastResult;

    It seems that a table generated by ColdFusion structures is already a collection arrayCollection 'official '!

    Hope this helps someone.

  • How to fill one shape with another shape, but not of models

    Hello

    How to fill one shape with another shape, but not of models. Example of this poster

    Screen Shot 2015-05-18 at 13.41.33.png

    put in a shape of the tree so that it looks like this:

    Heavy_type_tree.jpg

    Select your type with a vector path, which is the subject

    Object > envelope distort > make with top object.

Maybe you are looking for