Parsing Remote Data into Model Objects?

Hello,
I'm new to Flex and I'm trying to find out if my instincts
from other environments hold true. I have XML data from a remote
API that I'd like to use in my Flex application, specifically from
a 37Signals web application.
When I bring in the remote data into Flex, my instinct is to
parse it into data models, then use those models to bind to various
UI controls. I'm thinking that it will be easier to create
list/detail views if I have the data organized this way versus
having to do another remote XML lookup to populate the detail view.
I'm thinking it will also help me persist the data using the AIR
APIs.
Most of the information I'm finding wants me to parse the XML
into some sort of collection and bind it directly. Can someone tell
me if looking toward models is a good approach, or if it's a
paradigm/pattern that isn't appropriate?
If it is a decent approach, any information that shows
someone using it would be extremely helpful to me.
Thanks!
Scott

I create one bindable class and in it put an ArrayCollection
of ArrayCollection objects which if you make this a singleton
instance class then each module within your flex application can
initialize and maintain the ArrayCollection element within this
class. This seems to work very well since we are pulling several
xml lists throughout a tabbed multi state view flex application.
I'm not sure if this is what you are looking for or if you need an
example. How are you pulling the data into your application through
HttpService calls or you are using bindable Remote objects?

Similar Messages

  • How to extract Cognos Data into Business Objects?

    Hi All,
    I would like to know whether anyway to pull Cognos data into Business Objects?
    1. Pull data thru Universe from Cognos Cubes?
    2. Pull data using Crystal reports from Cognos Cubes?
    3. Or any otehr method of pulling data from Cognos Cubes?
    If nothing is possible I would have to explore using the RDBMS Tables to build Universe, WebI and then present in Xcelsius. Anybody is aware of getting data from Cognos?
    Thanks in advance.
    Alex.

    Cognos Reporting on SAP BI data
    We need to create a new project to import the structure of the SAP BI cube or Multiprovider.
    Enter User ID and password.
    Click on OK
    It will ask you to enter the User ID and password again. After enter the User ID and password it will ask you to select the language.
    Then it will ask you to select the metadata source, select the Data source as shown in below fig. and click next.
    Select the data Source as shown in below.
    Here we are planning to import SAP BW cube so we have to select SAP BW and click on next.
    Select sign on and Click on OK.
    Here we have to select our desired cube or multiprovider and click next.
    Now we have to select the language again.
    Here Cognos is giving the flexibility to use different options when importing cube structures.
    Here I am selecting to use the technical name of the objects and to bring same model as it is in SAP BI.
    Finally it will show list of all objects which are imported from SAP BI.
    When you click on finish it will take to the frame work manager. There you will see the SAP BI Cube Structure.
    Now it is exactly imported like SAP BW extended star schema model.
    Here you can compare the technical names of the dimensions in both in Cognos and SAP BI is same.
             COGNOS    Model                                         SAP BI Cube model         
    Here I am comparing the values of the info Objects with in one dimension.
                   Cognos Model                                                   SAP BI Model
    If there are any hierarchies in BI, it will form separately as shown in below fig.
    When you open the main object of Program definition, we will find 3 objects under this.
    It is always recommendable to use Level 01 objects.
    This is how it looks when you open all the above 3 objects. You can use any of those depends on your report requirement.
    When you open the info object if you see number of different items, that means this info object has got attributes in it.
    0COMP_CODE is the technical name of the info object in BI.
    In Cognos if it technical name starts with 1  Short Text of the Info Object.
                                                                       2  Key of the Info Object.
                                                                       4  Long Text of the Info Object.
                                                             5  Medium Text of the Info Object.
    LELEL00  Is Summarized values.
    LEVEL01  Is Item level values of Info Object.
    Once you see this in bw/bi environment, i hope you know how to gather and use it in BOBJ environment !!

  • How to parse xml data into java component

    hi
    everybody.
    i am new with XML, and i am trying to parse xml data into a java application.
    can anybody guide me how to do it.
    the following is my file.
    //MyLogin.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    class MyLogin extends JFrame implements ActionListener
         JFrame loginframe;
         JLabel labelname;
         JLabel labelpassword;
         JTextField textname;
         JPasswordField textpassword;
         JButton okbutton;
         String name = "";
         FileOutputStream out;
         PrintStream p;
         Date date;
         GregorianCalendar gcal;
         GridBagLayout gl;
         GridBagConstraints gbc;
         public MyLogin()
              loginframe = new JFrame("Login");
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              labelname = new JLabel("User");
              labelpassword = new JLabel("Password");
              textname = new JTextField("",9);
              textpassword = new JPasswordField(5);
              okbutton = new JButton("OK");
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 5;
              gl.setConstraints(labelname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 5;
              gl.setConstraints(textname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 10;
              gl.setConstraints(labelpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 10;
              gl.setConstraints(textpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 15;
              gl.setConstraints(okbutton,gbc);
              Container contentpane = getContentPane();
              loginframe.setContentPane(contentpane);
              contentpane.setLayout(gl);
              contentpane.add(labelname);
              contentpane.add(labelpassword);
              contentpane.add(textname);
              contentpane.add(textpassword);
              contentpane.add(okbutton);
              okbutton.addActionListener(this);
              loginframe.setSize(300,300);
              loginframe.setVisible(true);
         public static void main(String a[])
              new MyLogin();
         public void reset()
              textname.setText("");
              textpassword.setText("");
         public void run()
              try
                   String text = textname.getText();
                   String blank="";
                   if(text.equals(blank))
                      System.out.println("First Enter a UserName");
                   else
                        if(text != blank)
                             date = new Date();
                             gcal = new GregorianCalendar();
                             gcal.setTime(date);
                             out = new FileOutputStream("log.txt",true);
                             p = new PrintStream( out );
                             name = textname.getText();
                             String entry = "UserName:- " + name + " Logged in:- " + gcal.get(Calendar.HOUR) + ":" + gcal.get(Calendar.MINUTE) + " Date:- " + gcal.get(Calendar.DATE) + "/" + gcal.get(Calendar.MONTH) + "/" + gcal.get(Calendar.YEAR);
                             p.println(entry);
                             System.out.println("Record Saved");
                             reset();
                             p.close();
              catch (IOException e)
                   System.err.println("Error writing to file");
         public void actionPerformed(ActionEvent ae)
              String str = ae.getActionCommand();
              if(str.equals("OK"))
                   run();
                   //loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    hi, thanks for ur reply.
    i visited that url, i was able to know much about xml.
    so now my requirement is DOM.
    but i dont know how to code in my existing file.
    means i want to know what to link all my textfield to xml file.
    can u please help me out. i am confused.
    waiting for ur reply

  • How to populate data into view object

    Hi all,
    I am quite new with ViewObject.
    I have one data table which is binding with view object.
    I want to populate data into view object from my managed bean.
    how can i achieve this kind of scenario?
    actually i try to get view object as in the following. but i get only null.
    ViewObject viewobject = DCIteratorBinding.getViewObject();
    With Regards,
    Wai Phyo

    Hi,
    You could use the following code snippet to get handle to view object from the iterator.
    FacesContext fc = FacesContext.getCurrentInstance();
    BindingContainer bindings =
    (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    "#{bindings}",
    BindingContainer.class);
    DCBindingContainer bc = (DCBindingContainer)bindings;
    DCIteratorBinding iterator =
    bc.findIteratorBinding("<ITERATOR_ID>");
    ViewObject viewObject = iterator.getViewObject();
         // Perform operations on the view objectThanks,
    Navaneeth

  • How to parse URL Data into an NSString Array in iphone application

    Hi Every one
    I am newbie to iphone programming. I am having problem with reading and displaying the data into the table view. My application has to be designed like this. There is a csv file in the server machine and I have to access that URL line by line. Each line consists of 8 comma separated values. Consider each line has first name, second name and so on. I have to parse the data with comma and a newline and store them in an array of first name, second name array an so on. The next thing is I have to set first name second name combined and must be displayed in the UITableView. Can anyone provide me with an example of how to do it? I know I am asking the solution but I encountered a problem in connection methods separately and parsing simultaneously. You help is much appreciated.
    Thanks

    What does that have to do with a URL?
    The only thing that doesn't sound good is "array of first name" and "second name array". For each row, extract all the field and store them in an NSDictionary. Add a derived field consisting of first name concatenated with last name. That will be easy to display in a table.

  • Parsing XML data into MySQL database

    I need to parse data from an xml document rsiding on amother
    server into a mysql database residing on my server, so that I can
    pull data into a php site.
    Any help? Mybe there's a commercial script or something?
    I would also need to update the data daily
    Thanks!!

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_xmlsav.htm#1008593

  • Error loading data into ODS object

    Hi,
    I am trying to load some data into an ODS object, which actually does not seem very difficult. I got the InfoObjects  and structure of the ODS object all set up. Transfer rules are defined and I succeed in loading the data into PSA.
    From there i trigger the forwarding into the ODS object. And this is what i get (I use the BI in German, so maybe the translations are not 100% correct):
    message missing: tranfer rules finished.
    seems like the system does not get a esponse as to whether the transfer rules are worked through yet. this results in a timeout because nothing happens.
    i'm sorry i cant give any more detailed information. maybe someone can give me a direcion in which to search for mistakes.  irebuilt the transfer rules and compared with others, and found nothing. still the same problem...
    cheers,
    stefan

    Oh yeah, that error message i've been talking about was actually a note in the details of the monitor.
    you can see it here:
    http://www.fape.info/files/data_transfer_monitor_details.bmp
    let me give you some translation.
    - status: some error occured.
    -- data request, ok
    -- extraction, some error
    -- transfer
    ****data packet 1: received in bw, data not processed yet
    ****data packet 2: ...
    ****data packet 3: ...
    -- processing
    --- data packet 1:
    ++++ transfer into PSA, no problem
    transfer rules: error
    ******processing started
    ******missing response: transfer rules complete
    i hope this gives an idea.
    i couldn't come up with any solution so far. don't know why this response is missing after the processing of the data started.

  • Set data into Model Node on Navigating from a View

    Hi Gurus,
    Need your assistance with an issue that I am facing.
    I am developing an ESS application and it has two perspectives.
    1st Perspective contains - View1 and NavView
    2nd Perspectice contains - View2 and NavView
    I have created a dynamic ValueNode in View1 and on navigating to View2, I want the data in the ValueNode to be updated into a ModelNode.
    The problem I am facing is,
    1. I have the <b>actionOnNavigation</b> in the <b>NavView</b> whereas my data is in the <b>View1</b>.
    I tried setting the data into ModelNode in the <i>wdDoExit</i> of <b>View1</b>, but it doesnt help.
    I have the <i>Life_Span</i> property set to "<i>WHEN_VISIBLE</i>", but still, dont think the wdDoExit() of <b>View1</b> is being called.
    Any suggestions on how/ where I can set the data into my ModelNode?
    Thanks in advance.
    Anjana R.
    Message was edited by:
            Anjana Raghav

    Hi Gurus,
    Any idea on this question?
    I would like to know where I can set my data into the ModelNode before Navigating away from that view? <i>The data is in a dynamic context.</i>
    I can't write it on the onAction() method, coz action is defined in another view.
    Any suggestions? Is it a flaw in the design?
    Thanks in advance
    Anjana R.

  • Parsing xml data into oracle database

    Oracle ACEs,
    We got a requirement that needs to load xml data into oracle db. Is it possible to load xml data into oracle db using built-in package. Is Oracle provides one ?
    Our database version is Oracle 9i.
    Your help in this regard is highly appreciated.
    Many Thanks.

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_xmlsav.htm#1008593

  • Difficulty parsing XML document into query object

    Background: Using CFMX 6.1 to take an XML file exported from
    MS-Access and parse it into a query object.
    Problem: Of the 6 columns defined in the target query, one of
    the columns is only populated in the XML file a very low percentage
    of the time. When trying to populate the column for a record that
    has no volume I was getting the following error:
    Element KEY6.XMLTEXT is undefined in a Java object of type
    class coldfusion.xml.XmlNodeMap referenced as...
    To get around this I made this code change:
    Before
    <cfset temp = QuerySetCell(mcquery, "CuKey6",
    #mydoc.root.dataroot.qTop1000
    .Key6.XmlText#, #i#)>
    After
    <cfif
    StructKeyExists(mydoc.root.dataroot.qTop1000.XMLAttributes,"Key6")>
    <cfset temp = QuerySetCell(mcquery, "CuKey6",
    #mydoc.root.dataroot.qTop1000
    .Key6.XmlText#, #i#)>
    </cfif>
    The new code gets around the error, but when the template is
    executed, columns that DO have values
    show up as "[empty string]".
    I am trying to figure out why when the record has a actual
    value it is now overwritten instead of populated
    normally?

    Use XmlChildren[1], XmlChildren[2],... etc., in place of
    Key1, Key2, etc.

  • Upload Master data into Info object

    Hi Friends,
    is it possible to upload master into an info object.
    I know when I flag the info object as "info area" I can upload texts and attributes by data sources.
    But is there a procedure for a normal info object.
    Let say.
    I have an Info Object Country(char, 3) and a file like
    Country;Description;Language
    001; Germany;EN
    002; Poland;EN
    003;Norway;EN
    004......
    120;Hungary;DE
    Is there allready a procedure or do I have to write a program?
    Thanks in advance for you help.
    Rg. Jimbob

    Hi Jimbob,
    Normally your Characteristic InfoObject are set to become master data if you tick on the;
    "With master data"
    You can also load text description if you tick on the
    "With text"
    Both can be found in the Master data/texts tab.<br /> <br />
    Now a prerequisite for you to load data in a BW standard way is by going to the InfoProvider tab of RSA1 then right click>insert Characteristic as InfoProvider in the infoarea where you would like to see you master data.
    Based from your example your datasource will be your flat file.
    So you need to create a flat file data source with the structure of your file.
    Once you have this already you can create a transformation under texts of your master data.
    (Expand master data, right click at texts&gt;create transformation)
    Then thats it.
    You can now load your data from your file, just update the infopack and DTP correspondingly on how you would like to do your data loading.
    Let me know in case you have further clarifications on the step.
    Hope this helps, Thanks a lot.
    - Jeff

  • How to parse my datas into decimals

    Hi all, i've been trying to convert my data from exponential form into decimal how should i go about doing it?
    eventually, i will want to average out the data points(current) i got into a single value. Is there a better way to do so instead changing them into decimal form and try to average them again? Perhaps just do some formulas and get the final average value?
    I'm using LV 7.1. attached is the program i've done.
    thanks in advance
    Rgds,
    Linda
    Attachments:
    1.1.vi ‏104 KB

    Hi Linda,
    I attached an example of using 'Scan from String' to convert your string to an array of numbers...
    To do the formatting of numbers you should use 'Format into string' or set the formatting properties of your numeric indicators accordingly!
    (There's a huge page in the online-help on formatting codes :-)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Convert_SFS_71.vi ‏22 KB

  • Publishing Data Mining models,objects to Discoverer

    HI everybody,
    Does anybody Know where the ODM objects(tables,views) are inserted during the procedure of Publishing to Discoverer?
    Whereas , I have defined a Gateway to ODM in Discoverer Administrator and the Publishing does not invoke any error , I don't see the ODM objects in Discoverer Administrator....
    Why may this happen?
    Thanks , beforehand
    Simon

    Please ensure the following patch is installed. Which version of Oracle BI are you using?
    Patch 4430506 for OracleBI Discoverer Administrator, available from Oracle MetaLink; if this patch is not installed, the gateway will not work.
    Also I am assuming you are familiar with how a gateway object can be loaded to the Discoverer Admin GUI in the load wizard. You can get help in Discoverer forum. Discoverer
    Regards
    Sunil

  • Parsing field data into mailto:

    Is there any way to pull field data, like with a variable %TextField2%, so it can be used somewhere else in the form?  What I'm trying to setup is a form that will take the data from TextField2 so I can use it to prepopulate the subject of the mailto: submission.  This is the line I'm using:
    I have %TextField2% entered as an example.  So basically I just need the info from TextField2 to be used in the subject= line.  If anyone has any information on how to do this it would be greatly appreciated.  Thanks!

    Got it. Here is the script I used:
    event.target.submitForm({cURL:"mailto:[email protected]?subject="+TextField1.rawValue+"",cSub mitAs:"PDF",cCharset:"utf-8"});
    TextField1 is the field I referenced to. Hope this helps someone out.

  • How to read a CSV file and Insert data into an Oracle Table

    Hi All,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
    Please let me some suggestions on this.
    Thanks,
    Chandra R

    jeneesh wrote:
    And, please don't "hijack" 5 year old thread..Better start a new one..I've just split it off to a thread of it's own. ;)
    @OP,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .You don't have a "clob file" as there's no such thing. CLOB is a datatype for storing large character based objects. A file is something on the operating system's filesystem.
    So, why have you stored comma seperated data in a CLOB?
    Where did this data come from? If it came from a file, why didn't you use SQL*Loader or, even better, External Tables to read and parse the data into structured format when populating the database with it?
    If you really do have to parse a CLOB of data to pull out the comma seperated values, then you're going to have to write something yourself to do that, reading "lines" by looking for the newline character(s), and then breaking up the "lines" into the component data by looking for commas within it, using normal string functions such as INSTR and SUBSTR or, if necessary, REGEXP_INSTR and REGEXP_SUBSTR. If you have string data that contains commas but uses double quotes around the string, then you'll also have the added complexity of ignoring commas within such string data.
    Like I say... it's much easier with SQL*Loader of External Tables as these are designed to parse such CSV type data.

Maybe you are looking for

  • Storing PDF and Word document in oracle database

    any idea, how to store PDF and word document using oracle database. thanks

  • Find the report from the query

    Hi, We noticed one of the bad queries creating blocks in SQL Server and that is coming from our report server. I captured the query, Now I m trying to find what report that query belongs to ? Is there any way to find this from Report server database

  • Test if interval is set properly in DBMS_JOB .

    Hi, looking for a way to test interval setting in some complex cases . Its obvious when You have DBMS_JOB.SUBMIT (         :jobno       , 'p;'       , TRUNC(sysdate)+11/24       , 'TRUNC(SYSDATE+1)+11/24');but what if You want interval depend on day

  • Multiple datasource with a sub-report with Java

    Hi All, I have a group of data from which I will create subset to separate on a group. Now, I have multiple (say 3) datasets with me for which I want to perform the following tasks: Add first dataset to the databasecontroller, after adding the datase

  • Getting username, urgent

    Hello, How can I get the username who logged into portal and pass the username in a sql statement which I am using in report portlet? Any help is highly appreciable. Thanks in advance. Newbie