Best way to "page" through data?

If I have a XM, something like
<people>
<person>
<firstname>john</firstname>
<lastname>smith</lastname>
</person>
<person>
<firstname>robert</firstname>
<lastname>walker</lastname>
</person>
</people>
And I create some bound fields to display this, what's the best way to "page" the data?
I know I can create an XML variable of the data and then access person[0].firstname, but I need to have a button or other ui element that would choose person 0,1,2,3 etc.
Normally I's use a list, but this application calls for a static screen where only the data changes when buttons are chosen.

I use this method(this is simplified) as it doesn't require any sort of data services, you can have change events etc for editing/deleteing. the slider is just for poc, a prev/next button could just as easily do.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="800" minHeight="400" creationComplete="initApp()" width="800" height="400">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable] private var Arr:ArrayCollection=new ArrayCollection();
private var Sel:int = 0;
protected function initApp(): void
Arr.addItem({id:1,name:"John",surname:"Robertson",age:30});
Arr.addItem({id:2,name:"Peter",surname:"Williams",age:35});
Arr.addItem({id:3,name:"Jane",surname:"Brown",age:23});
Arr.addItem({id:4,name:"Rebecca",surname:"Smith",age:42});
Arr.addItem({id:5,name:"Susan",surname:"Reynolds",age:25});
Arr.addItem({id:6,name:"Michael",surname:"Royce",age:23});
Arr.addItem({id:7,name:"Jack",surname:"Jones",age:22});
Arr.addItem({id:8,name:"Pete",surname:"Young",age:50});
Arr.addItem({id:9,name:"Robert",surname:"Peters",age:39});
hs.maximum = Arr.length-1;
hs.value = 0;
updateList();
protected function updateList():void
Sel = hs.value;
surname.text= Arr[Sel].surname;
firstname.text= Arr[Sel].name;
age.text= Arr[Sel].age;
]]>
</fx:Script>
<s:Group width="497" height="114" horizontalCenter="0" verticalCenter="0">
<s:TextInput id="surname" x="46" y="45"/>
<s:TextInput id="firstname" x="182" y="45"/>
<s:TextInput id="age" x="318" y="45"/>
<s:HSlider id="hs" x="62" y="96" width="200" minimum="0" maximum="1" liveDragging="true" change="updateList()" value="-1"/>
  </s:Group>
</s:Application>
David

Similar Messages

  • Best Way to port the data from one DB to another DB using Biztalk

    Hi,
    please suggest best way to move the data from one db to another DB using biztalk.
    Currently I am doing like that, for each transaction(getting from different source tables) through receive port, and do some mapping (some custom logic for data mapping), then insert to target normalized tables(multiple tables) and back to update the status
    of transaction in source table in sourceDB. It is processing one by one.
    How/best we we can do it using  bulk transfer and update the status. Since it has more than 10000 transaction per call.
    Thanks,
    Vinoth

    Hi Vinoth,
    For SQL Bulk inserts you can always use SQL Bulk Load
    adapter.
    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalksyn/archive/2005/10/23/processing-a-large-flat-file-message-with-biztalk-and-the-sqlbulkinsert-adapter.aspx
    However, even though a SQL Bulk Load adapter can efficiently insert a large amount of data into SQL you are still stuck with the issues of transmitting the
    MessageBox database and the memory issues of dealing with really large messages.
    I would personally suggest you to use SSIS, as you have mentioned that records have to be processed in specific time of day as opposed to when the
    records are available.
    Please refer to this link to get more information about SSIS: http://msdn.microsoft.com/en-us/library/ms141026.aspx
    If you have any more questions related to SSIS, please ask it in
    SSIS 
    forum and you will get specific support.
    Rachit

  • I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    Paragon even has non-destriuctive conversion utility if you do want to change drive.
    Hard to imagine using 3TB that isn't NTFS. Mac uses GPT for default partition type as well as HFS+
    www.paragon-software.com
    Some general Apple Help www.apple.com/support/
    Also,
    Mac OS X Help
    http://www.apple.com/support/macbasics/
    Isolating Issues in Mac OS
    http://support.apple.com/kb/TS1388
    https://www.apple.com/support/osx/
    https://www.apple.com/support/quickassist/
    http://www.apple.com/support/mac101/help/
    http://www.apple.com/support/mac101/tour/
    Get Help with your Product
    http://docs.info.apple.com/article.html?artnum=304725
    Apple Mac App Store
    https://discussions.apple.com/community/mac_app_store/using_mac_apple_store
    How to Buy Mac OS X Mountain Lion/Lion
    http://www.apple.com/osx/how-to-upgrade/
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    http://www.apple.com/support/timemachine
    Mac OS X Community
    https://discussions.apple.com/community/mac_os

  • What is the best way to mimic the data from production to other server?

    Hi,
    here we user streams and advanced replication to send the data for 90% of tables from production to another production database server. if one goes down can use another one. is there any other best option rather using the streams and replication? we are having lot of problems with streams these days they keep break and get calls.
    I heard about data guard but dont know what is use of it? please advice the best way to replicate the data.
    Thanks a lot.....

    RAC, Data Guard. The first one is active-active, that is, you have two or more nodes accessing the same database on shared storage and you get both HA and load balancing. The second is active-passive (unless you're on 11.2 with Active Standby or Snapshot Standby), that is one database is primary and the other is standby, which you normally cannot query or modify, but to which you can quickly switch in case primary fails. There's also Logical Standby - it's based on Streams and generally looks like what you seem to be using now (sort of.) But it definitely has issues. You can also take a look at GoldenGate or SharePlex.

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • I am giving away a computer, what is the best way to wipe out data prior to depature

    i am giving away a computer, what is the best way to wipe out data prior to depature

    Did the Mac come with two grey disks when new? If so, use disk one to erase the drive using Disk Utility and then re-install the OS from the same disk. Once installed, quit and when the new owner boots they can set it up as a new out-of-the-box Mac when they boot it up. The grey disks need to be passed on with the computer.
    If you need detailed instructions on how to erase and re-install please post back.
    If the Mac came with Lion or Mountain Lion installed the above process can be done using the Recovery HD as since Lion no restore disks are supplied with the Mac.
    The terms of the licence state that a Mac should be sold/passed on with the OS installed that was on the machine when new (or words to that effect).

  • Best way to accept a date from a user

    Hi Guys,
    Whats the best way to get a date from a user and add it in an
    insert record to access.
    I have a form that adds a record and it works well enough as
    long as the data added is in the correct format.
    Untill now ive just had a text box with an explination to the
    user on how to add the date and what format....
    But Im fed up with having to change bad entrys and need to
    place a control or something on the form but dont know whats
    easiest and best?
    Any ideas welcome.
    Thanks

    If you want today's date set the database up to insert the
    date
    automatically. If you want other dates than today's use a
    date picker or
    calendar to insert the date.
    Dave
    "Tag2007" <[email protected]> wrote in
    message
    news:epj87p$mar$[email protected]..
    > Hi Guys,
    >
    > Whats the best way to get a date from a user and add it
    in an insert
    record to
    > access.
    >
    > I have a form that adds a record and it works well
    enough as long as the
    data
    > added is in the correct format.
    >
    > Untill now ive just had a text box with an explination
    to the user on how
    to
    > add the date and what format....
    >
    > But Im fed up with having to change bad entrys and need
    to place a
    control or
    > something on the form but dont know whats easiest and
    best?
    >
    > Any ideas welcome.
    > Thanks
    >

  • Best way to store historical data

    Hello:
    I'm currently developing an application that monitors some phisycal
    variables such as temperature and differential pressure in different
    locations. I also must do historical datalogging of the values read so
    the user can generate reports of the historical data. What is the best
    way to save the data? I was thinking about using and SQL-based database
    and use a table for each variable, an make some maintenance on the
    database after certain time to avoid it getting too big, but I'm opened
    to any suggestions
    Thanks in advance!
    Robst
    Robst - CLD
    Using LabVIEW since version 7.0

    Hello:
    I've been looking for a way to install just Citadel with no success.
    I've read that it only ships with Lookout and DSC, so I guess it can't
    be installed without one of them. Si, if this is true, Do U know
    another option for doing datalogging?
    Thanks in advance
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0

  • What is the best way to edit meta data..

    What is the best way to edit meta data and tag photos, faces, places etc. and have the data saved to the original photo.
    On a PC I would just use Windows Gallery. iPhoto on the Mac allows for some tagging, but it doesn't save to the original file.
    I like to have my photos in a folder, edit them and save the changes.
    What software would work best on a MAC to accomplish this?
    Thanks for any help,
    Nick

    iPhoto is a database and any metadata you add or edit is available in any app - if you learn how to use it.
    iPhoto is a non-destructive processor. It never touches the original file - it treats it like a film shooter treats the negative.
    If you want a copy of the original file with the metadata included simply export a copy.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    As an FYI:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • Best way to update through testing repo

    As I am finding out, there are certain limitations to pacman. I enabled the testing repo to try out xorg 1.7, and to see if this could help with my X delay at startup. I enabled the repo and installed xorg, gcc, and among other packages. My problem is, I dont want the testing repo enabled by default. So I comment out testing from my pacman.conf, and now I cannot upgrade without dependency errors.
    Should I have used the ABS to install xorg 1.7...? Now I would like to disable the testing repo and be able to still sync and upgrade as normal. Am I missing something here...? Since I upgraded all packages from the testing repo, and now all my revisions are newer, and when I disable the repo to prevent any other updates, I am now unable to upgrade normally...  So... what is the best way to upgrade through the testing repo..?
    Last edited by StanIsTheMan (2009-10-23 10:15:00)

    Allan wrote:
    You can revert all packages to versions in [core]/[extra] by using "pacman -Suu".  Otherwise, you need to wait for these to move out of [testing].
    What problems are you observing?
    I didn't necessarily want to downgrade all of the packages I upgraded through the testing repo. It was after upgrading the packages from the testing repo, and then commenting out the "testing"  in pacman.conf, and then trying a normal 'pacman -Su'. I was then receiving errors on dependencies that were not met, and was refusing an upgrade. (which i can understand, since the testing db is being ignored, and the revision numbers are different and would cause conflicts)
    I have reverted back to the earlier versions from the upgrade with a 'pacman -Suu'  Now what is the proper way to upgrade just xorg..? Should I use the ABS..? I dont want to enable the testing repo, because if I do, It wants to pull in all of the testing branch that I dont want. So really my original question is... What is the bet way, or proper way to upgrade a package from the testing branch...?
    Last edited by StanIsTheMan (2009-10-23 10:40:00)

  • Best way to edit/update data in JSP ?

    Hi Friends,
    I want to know about Update / Edit data procedure in JSP.
    ie.
    If we have one form having 10 fields, and we need to change only
    1 field then do we require to set update query for all 10 fields ?
    don't it make some overload ?
    Can you give me solution like that ?
    and I want to update data like we use CakePHP scaffold functionality.
    data from database is displayed in field and we just need to edit data
    and save it.
    Can we have such in JSP ? see I don't know struts or any frameworks
    Better you will suggest way to do in JSP.
    for Insert I use Bean [ one java class get the parameters for all fields and query ]
    Please suggest me to set the value to field on edit / update
    and best way to update the data.
    -GkR

    It's easy if you want upade game files, not game engine binary.
    You can make your app that will load swf file. So you can make engine that will load all files externaly from device. Firstly you run app and if it connected by wifi - ask user for upadate wish and that simply download from http files as binary and save they using FileSystem

  • Best way to check the data

    I have a made some changes to an existing view. The change is adding a join and a new column from new table. I have created a version2 with all these changes. I want to make sure that same data exists in both the views. what is the best way to test the data.

    Bad wording, the query results could be:
    No rows selected. Same number of rows on both views and same data (considering view1 structure and view without the new column)
    At least one row selected. If the count(*) on both was different, rows returned will be at least the difference. If the count was the same, then every returned row means that there's no equivalent row on view2 and a data difference may exist in at least one of the fields, so You have to find the equivalent row on view2 to compare.
    On the query sintaxis, as view2 hava a new column and I guess it's not a constant value, You have to specify every column for the view1, and the same columns for view2, so new field isn't included and compared.

  • Best way to extract XML data to DB

    Hello,
    In our work we need to extract data from XML documents into a database. Here are some extra notes:
    + There is no constant schema for the XML documents.
    + Some processing on the XML files is required.
    + The XML documents are very big.
    + The database is Oracle 8i or 9i (Enterprise Edition both) and our framework is NET.
    Our questions are:
    1. What is the best way to extract the data into the database under the above circumstances ?
    2. In case there was a constant schema for the XML documents, would there be a better way ?
    3. Is writing the data to text files first, and then loading it via SQL-Loader is an effective way ?
    Any thoughts would be welcome. Thanks.

    Hi Nicolas,
    The answer depends on your actual storage method (binary, OR, CLOB?), and db version.
    You can try XMLTable, it might be better in this case :
    SELECT x.elem1, x.elem2, ... , x.elem20
    FROM your_table t
       , XMLTable(
          '/an/xpath/to/extract'
          passing t.myxmltype
          columns elem1  varchar2(30) path 'elem1'
                , elem2  varchar2(30) path 'elem2'
                , elem20 varchar2(30) path 'elem20'
         ) x
    ;

  • What is the best way to captue current date and time?

    I got a field in table to capute current date and time...i am
    using SQL Server.
    field name datatype length
    enter_datetime datetime 8
    What is the best way to get current date and time and insert
    to table?.
    Is this way?.
    <cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
    "&timeformat(#now()#,'hh:mm:ss')'>
    This way looks like time is not entered correctly.
    or any other better way?.

    > get current date and time and insert to table?
    You can use cfqueryparam
    <cfqueryparam value="#now()#"
    cfsqltype="cf_sql_timestamp">
    Or as was suggested, set the default for your table column to
    getdate(). Then you won't have to insert anything. Sql server will
    do it automatically when a new record is created.

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

Maybe you are looking for

  • How do I restore music to my iTunes after new hard drive

    FIrst of all apologies if this is really simple .... I'm a bit rubbish with technology ! My problem is that I have had to have my hard drive replaced in my laptop  . I have reinstalled iTunes & music I have brought from iTunes is back on there but I

  • Unable to convert the sender service ... to an ALE logical sysetm

    I have read prior posts to this issue regarding the solution but I am not able to resolve this issue.  The scenario is as follows: A Web Service is consumed on the PI system (XD1) which extracts the data for posting an IDoc to the SAP ECC system (ED1

  • Servlet/JSP problems with WL 4.51

    Hi all           I have a set of Servlets and JSPs running on NewAtlanta's ServletExec           servlet engine. I am currently porting them to WebLogic. I am facing a           few problems. I do not want to change any of my HTML/JSP/Java files     

  • InDesign CS5 ME - Workspace/Toolbars issue

    hi all i bought new computer with win 7 ultimate 64 bit and i try to install indesign cs5 middle east (ME) and after i finnish it i get : Window -> Workspace" dropdown there are no available Workspaces to choose from The Workspace settings are set to

  • Problems saving AI file to an EPS

    I am try to save an Illustrator file as an EPS, and I keep getting the message: NOT ENOUGH MEMORY OR IMAGE IS TOO COMPLEX, CHANGING THE DOCUMENT WINDOW MAY HELP. I am using CS6. I have done this over and over for years. Now as of two days ago I keep