How to change 'dataprovider' using 'states'

Hi All
I have 2 arrays and a HorizontalList. I want to be able to switch between the arrays using states. The states and horizontal list look like
<mx:Array id="arr1">
</mx:Array>
<mx:states>
   <mx:State name="state1">
      <mx:SetProperty name="dataprovider" target="{horizontalList}">
         <mx:value>
            arr1
         </mx:value>
      </mx:SetProperty>
   </mx:State>
   <mx:State name="state2">
      <mx:SetProperty name="dataprovider" target="{horizontalList}">
         <mx:value>
            arr2
         </mx:value>
      </mx:SetProperty>
   </mx:State>
</mx:states>
<mx:HorizontalList id="horizontalList"
  dataProvider="{arr1}"
/>
This code doesn't work, the mx:Value is probably not what I need. Any suggestions how to fix this ?
thnx
Luca

Hi Luca,
Try the code below...
Instead of  <mx:value>arr1</mx:value> assign the value in the SetProperty tag itself....as shown below
<mx:SetProperty name="dataProvider" target="{horizontalList}" value="{arr1}">
</mx:SetProperty>
Also you have used the name of the property as dataprovider instead of dataProvider.(P should be uppercase)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Array id="arr1">
  <mx:Object data='bar' label="bar1"/>
  <mx:Object data='bar' label="bar2"/>
  <mx:Object data='bar' label="bar3"/>
  <mx:Object data='bar' label="bar4"/>
  <mx:Object data='bar' label="bar5"/>
  <mx:Object data='bar' label="bar6"/>
</mx:Array>
<mx:Array id="arr2">
  <mx:Object data='bar' label="bar7"/>
  <mx:Object data='bar' label="bar8"/>
  <mx:Object data='bar' label="bar9"/>
  <mx:Object data='bar' label="bar10"/>
  <mx:Object data='bar' label="bar11"/>
  <mx:Object data='bar' label="bar12"/>
</mx:Array>
<mx:states>
    <mx:State name="state1">
       <mx:SetProperty name="dataProvider" target="{horizontalList}" value="{arr1}">
       </mx:SetProperty>
    </mx:State>
    <mx:State name="state2">
       <mx:SetProperty name="dataProvider" target="{horizontalList}" value="{arr2}">
       </mx:SetProperty>
    </mx:State>
</mx:states>
<mx:HorizontalList id="horizontalList"  dataProvider="{arr1}" labelField="label" height="100"/>
<mx:HBox horizontalGap="5" top="200">
  <mx:Button id="btn1" label="Go to State1" click="this.currentState='state1'" />
  <mx:Button id="btn2" label="Go to State2" click="this.currentState='state2'" />
</mx:HBox>
</mx:Application>
Thanks,
Bhasker

Similar Messages

  • HOW TO CHANGE THE USEFUL LIFE FOR MORE ASSETS AT A TIME FOR ASSET CLASS

    Hi All,
    Asset which is under Asset Class Support system-B700. Here every thing is ok but the problem in USE FULL LIFE which is come by default. It must be 4 instead of  5.   So can any body help me out from this how to change the Useful life in that Asset class.  In that Asset Class we have the morethan 200 Assets. It was happend in Prdocution system so now the problem is where i can change the useful life for the asset class either in DEV or PRD.
           Also i want to know the information of How these assets are Uploaded into the system (Lsmw or etc). this is very urgent for me.
    Thanks in Advance,
    Regards,
    Siva.

    Hi Ashok,
         Can i know the reason how it was happend. i mean instead of 4 years the system showing is 5yesrs any reason is there behind that.
    Thanks in Advance.

  • How to change the privacy statement link url

    I looked into the previous threads , could not find the answer to "Changing the privacy statement url to clients privacy statement url".
    I am talking about the privacy statement URL in the page that user see it as soon as user logs into the e-business suite.
    I have read the previous theads and developers guide regading how to show or hide this autofooter thing. but could not find any thing about how to change the one in the login page.I even looked ino personalization but could not find a place to change this url. please HELP.
    Another question is " is it ok to show privacy statement in just the first page and hide it in rest of the application pages?"
    Thanks
    karan

    Extract from Personalization Guide - Page Footer - Personalization Considerations
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a standard Copyright and Privacy (that is, its Auto Footer property is set to true), set the Scope to OA Footer, in the Choose Personalization Context page of the Personalization UI.
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a custom Copyright and Privacy (that is, its Auto Footer property is set to false), set the Scope to Page in the Choose Personalization Context page of the Personalization UI. In the following Page Hierarchy Personalization page , identify and personalize the Privacy page element.

  • How to change Bulk Insert statement from MS SQL to Oracle

    Hi All,
    Good day, I would like to bulk insert the content of a file into Oracle db. May I know how to change the below MS SQL syntax to Oracle syntax?
    Statement statement = objConnection.createStatement();
    statement.execute("BULK INSERT [TBL_MERCHANT] FROM '" MERCHANT_FILE_DIR "' WITH ( FIELDTERMINATOR = '~~', ROWTERMINATOR = '##' )");
    Thanks in advance.
    cs.

    Oracle SQL Loader utility allows you to insert data from flat file to database tables.
    Go to SQL Loader links on following url to learn more on this utility
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96652/toc.htm
    Chandar

  • How to change workcenter using bdc

    hi,
      can any one help me that how to change Workcenter while creating production order.
    plz its urgent.
    plzzzzzz
    Gowri

    Gowri,
    Before calling BDC upload u have to do the validations,So put a logic for which Items u have to change WC.
    try to use any BAPI to overcome TC issue.
    Sample program here.
    data: str type c length 1,
    var type c length 30,
    cntr type i.
    data: begin of record,
    AUFNR(012),
    FLG_OVIEW(001),
    GLTRP(010),
    GSTRP(010),
    ARBPL(008),
    KTSCH(020),
    end of record.
    DATA: itab LIKE record OCCURS 1000 WITH HEADER LINE.
    PARAMETERS textfile LIKE rlgrap-filename DEFAULT
    'c:\prdord.txt'.
    End generated data section ***
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = textfile
    filetype = 'DAT'
    TABLES
    data_tab = itab
    EXCEPTIONS
    conversion_error = 1
    file_open_error = 2
    file_read_error = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    WRITE:/ 'Upload From',textfile,'to itab is not successful'.
    EXIT.
    ENDIF.
    LOOP AT itab.
    IF sy-subrc <> 0. EXIT. ENDIF.
    perform bdc_dynpro using 'SAPLCOKO1' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-AUFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'CAUFVD-AUFNR'
    itab-AUFNR.
    perform bdc_field using 'R62CLORD-FLG_OVIEW'
    itab-FLG_OVIEW.
    perform bdc_dynpro using 'SAPLCOKO1' '0115'.
    perform bdc_field using 'BDC_OKCODE'
    '=TERM'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-GSTRP'.
    perform bdc_field using 'CAUFVD-GLTRP'
    itab-GLTRP.
    perform bdc_field using 'CAUFVD-GSTRP'
    itab-GSTRP.
    perform bdc_dynpro using 'SAPLCOKO1' '0115'.
    perform bdc_field using 'BDC_OKCODE'
    '=VGUE'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-GAMNG'.
    perform bdc_field using 'CAUFVD-GSTRP'
    itab-GSTRP.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'AFVGD-KTSCH'.
    Here is where i need to check whether the 'AFVGD-KTSCH'containing value 'SEWING' then the itab value should be placed in the below screen-field.
    perform bdc_field using 'BDC_CURSOR'
    'AFVGD-ARBPL(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'AFVGD-ARBPL(02)'
    itab-ARBPL.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_OKCODE'
    '=FREI'.
    perform bdc_field using 'BDC_CURSOR'
    'PSFC_DISP-AUFNR'.
    perform bdc_dynpro using 'SAPLSPO2' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=OPT1'.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'BDC_CURSOR'
    'PSFC_DISP-AUFNR'.
    CALL TRANSACTION 'CO02' USING bdcdata MODE 'A'.
    if sy-subrc eq 1001.
    write:/ ITAB-aufnr,ITAB-arbpl, ITAB-gstrp.
    write 'Not Updated'.
    else.
    write:/ ITAB-aufnr,ITAB-arbpl, ITAB-gstrp.
    write 'Updated Successfully'.
    endif.
    REFRESH bdcdata.
    *else.
    write 'Improper Text File Format'.
    *endif.
    endloop.

  • How to change EP used memory

    Hi all:
       We have EP 7 running on Aix.

    Hi all: 
       We have EP7 running on Aix system.
       I check in netweaver adminisator - System Management - Monitoring - Java System Reports . I found the Resource Consumption is
    3:09 PM
    AllocatedMemory MB MB     2048.0     2048.0
    AvailableMemory MB MB     2048.0     2048.0
    UsedMemory       MB MB     1252.0     1255.0
    However, my AIX server physical memory is 10G and only EP is running on it.
    I check the JVM parameters in System Information, I found
    java.max.heap.size     1024
    -Djava.security.policy=./java.policy -Djava.security.egd=file:/dev/urandom -Dorg.omg.CORBA.ORBClass=com.sap.engine.system.ORBProxy -Dorg.omg.CORBA.ORBSingletonClass=com.sap.engine.system.ORBSingletonProxy -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sap.engine.system.PortableRemoteObjectProxy -Dorg.xml.sax.driver=com.sap.engine.lib.xml.parser.SAXParser -Djco.jarm=1 -Xms1024m -verbose:gc
    -Dmemory.manager        2048M
    -Xgcpolicy:gencon        
    -Xj9      
    -Xjit:disableTailRecursion      
    -Xmn1000M      
    -Xms2048M      
    -Xmx2048M
    My questions is :
    1. is 2G memeory settings suitable for my 10G memory server ?
    2. How to change this 2G memeory settings to bigger size ?
    Thanks a lot.

  • How to change Human Task state from "Completed" back to "Assigned"

    I am working with human task through BPEL Worklist API
    There is Human Task with state “completed”. We need to change the state back to “Assigned”
    In other words or get this task with “Assigned” state or get exactly the same task with the same number (that I can use as int parameter in ITaskQueryService.getTaskDetailsByNumber method invocation) .
    Is it possible?
    I tried to use ITaskService methods but without results.
    Thanks.

    Hi ,
    This request sits in table RSBKREQUEST with processing type as 2 in data elements USTATE, TSTATE and this 2 is actually "Processed Successfully" status which is obviously wrong.
    All we need is, ask your basis person to change the status to 3 in both these data elements.Then you can delete the previous bad request . Once the request is deleted, the request status gets updated as "4" in table RSBKREQUEST.
    For manually status change you can use the function  module RSBM_GUI_CHANGE_USTATE
    Hope this helps you...
    Regards,
    Debjani...

  • How to change pdTag, using nifWriteObject

    I've got an application that I wrote in CVI that will communicate with a Foundation Fieldbus device, and allows the user to read and edit values of parameters in some of the function blocks.
    Recently the need arose to change the device tag. How do I do this? I know it requires use of the nifWriteObject call, but everything I try resuls in a -2 error.
    I'm sure this can be done, as the Fieldbus Configurator software allows the user to change the tag, and I assume Configurator, uses the same API calls.
    Any suggestions will help.
    Thanks

    Actually there is a special library for NI-FBUS Comminmications Manager including additional API functions, which support "Set PdTag", "Set Address" and "Clear Device" as well as other powerful features.
    But it is not free, you can contact "[email protected]" for more information about this library.

  • How to change all used colors to 100% black

    It's probably a dead simple answer, but I can't find it.
    Here's the thing:
    In a product brochure I had to change all product drawings to 100% black.
    What I did was select all unused colors from the palette, deleted them. Then changed all the used colors into 100% black (drag Global black swatch onto the other swatches while holding Alt).
    In the printing office it appeared that there were still elements in the drawings that weren't in 100% black. Those elements had colors that weren't in a swatch in the color palette.
    How can I change ALL the used colors, including the ones that haven't been turned into a swatch in color palette, into 100% black?
    Thanks for any help!
    (Illustrator CS3 is what I'm working with)

    James,
    I am using CS3.
    It's a bit of a complicated story.
    I get the drawings supplied from my customer. The drawings are made in an Autocad-like program (I forgot its name), then imported into Autocad (because that first piece of software doesn't have the right export-extensions) and then from Autocad it's exported to Illustrator.
    The customer wanted to do the conversion to black themselves, because it would ease my work-load, since I wouldn't have to open and adjust all those drawings again when they have it open already.
    Only they are using CS2.
    I guess they'll just have to upgrade...

  • How to change query navigational state in broadcast setting

    Dear experts,
    I have a question information broadcasting in BW 3.5
    We have the following usage of broadcast settings
    - open query with bex web
    - add special filters, drill-downs etc.
    - add this as a new broadcast setting with Mail recipients etc. - the format is "html-file"
    - schedule the setting
    This works fine.
    But, if I have to make changes to the navigational state (e.g. set additional filter) of the broadcasted query for the future - how can I do that?
    How can I open the "view" behind the setting directly?
    Best wishes
    Gregor

    I have not found a solution yet but currently I have a workaround:
    Before switching to Broadcaster I generate a bex-web-bookmark.
    Then i add this bookmark in the text of the broadcasting seeting.
    Gregor

  • How to Change or Use Browser for WebDynPro In Ubuntu(Linux)???

    Dear Experts,
                      I want to know how to use webdynpro in Ubuntu(Linux) OS, when i select 'test' it shows Browser started in Status bar but browser is not open, but when i copy and paste the URL in address bar it opens, please help me how to use in Ubuntu.
    Best Regards,
    Kavin L

    This post helped me.
    https://code.google.com/p/chromium/issues/detail?id=147510
    Basically, the "Search in Google" extension is from Safari and it can be disabled in System Preferences.
    System Preferences -> Keyboard -> Keyboard Shortcuts -> Services -> Searching and unchecking "Search with Google"
    It worked for me and I also disabled a few other right-click options that I never use.

  • How to change shipment using Invoice no??

    Hi experts,
    I have to progrmatically change/update "Bill of lading" field in the shipment using data in the excel file.
    Excel file will contain invoice numbers and data for Bill of lading.
    Please provide me the solution or name of function module....
    Thanks
    Sameer

    Hii Sameer
    I guess you have to connect the tables (shipment & billing) to do the same.
    You can connect billing to delivery by table VBFA and then from delivery to shipping again by the same table.
    By this you can connect billing directly to shipment and do the changes.
    You need to take help of some ABAPer to do the same.
    Thanks & Regards
    Gaurav Manocha

  • How to change icons using html codes.

    What are the html codes provided by apple to change its icons

    Without jailbreaking your device, you cannot do what you are asking. And no, per the Terms of Use, we can't discuss jailbreaking (which is a bad idea anyway, for a variety of reasons).

  • How to change password using apple id

    i just bought a new Macbook pro and I can't change any preferences because it wants my password and I never set one.  Any thoughts on how to go about resetting a password without an old one?

    Just remember that will leave them with no way to update any apps that have been purchased under their mother's Apple ID.

  • How to change page using JS?

    Question in subject. Thanks in advance John.T

    Hey John,
    I've wrote these two to navigate through the pages more cleanly, perhaps they may be of use, although they falter with roman numerals and other non-numerical values for the page name, the frame work is there.
    //NEXT PAGE
    if (app.selection.length == 0){
    nextpage()}
    else{app.selection = null; nextpage();};
      function nextpage(){
         var myCurPage = app.activeWindow.activePage.name;
         myCurPage++
             var myNpage = app.activeDocument.pages.item(myCurPage+"")
                 try {app.activeWindow.activePage = myNpage;
                     myzoom();}
                 catch(myError){app.activeWindow.activePage = app.activeDocument.pages.item(0);
                     myzoom();
         function myzoom(){ 
         app.activeWindow.zoom(ZoomOptions.fitPage);
    //PREVIOUS PAGE
    if (app.selection.length == 0){
    previouspage()}
    else{app.selection = null; previouspage();};
    function previouspage(){
        var myCurPage = app.activeWindow.activePage.name;myCurPage--
            var myPpage = app.activeDocument.pages.item(myCurPage+"")
                try {app.activeWindow.activePage = myPpage;
                    myzoom();}
                catch(myError){
                    var LP = app.activeDocument.pages.length;LP--
                        app.activeWindow.activePage = app.activeDocument.pages.item(LP)
                            myzoom();
        function myzoom(){ 
        app.activeWindow.zoom(ZoomOptions.fitPage);
    ~mike

Maybe you are looking for

  • Posting date option in ME2M Std report

    Hi friends, The standard Report ME2M is for displaying PO's based on the Document date .... but my requirement is to get the same output with the Posting date as the criterion ... (i.e) even if the document date is given in the selection parameters .

  • Waiting for Orchestration. What does this mean?

    I have an application being deployed to different AD sites.  I do not have my DPs for those sites set up yet, but I do have my MP which is also a DP set to a fallback DP.  I deploy this application and deployment status says Waiting for Orchestration

  • R12 : Currency between order/invoice/paymentR12

    Hello, In 11i we have the constraint to have the same currency between the PO, the invoice and the payment. I'd like to know if in R12 we can manage some special settings (for some suppliers) to avoid this constraint. e.g. can we manage a Chinese sup

  • OnChange="submit();" in flash form

    Hi, I am using a form to sort a query on my page, however I am updating all of my forms to flash now, and can't seem to get the onChange="submit();" to work on a cfselect tag. It doesn't throw an error, th epage just doesn't load. Is this an acceptab

  • Finding Service PO's partial receipt

    I was told to search for all Service PO's that have partial reciept. Service PO have a destination type of Expense. I was told i can search those via the standard reciepts form...but i haven't been able to figure that out. Thanks