On change statement problem

Hi All,
I am craeting program for automatic sending mail..... in that program i have write body part with header and line item.....
present my output is like below:
Controling Area | Cost center | Company Code
5000                | 159040        | 040
Cost element    | Description                       | Allocation change
0000600100      | SALARIES                       | No
6475FC            |  647500 AIGOSS              | No
Controling Area | Cost center | Company Code
5000            | 361001      | 001
Cost element    | Description                    | Allocation change
0000600100      | SALARIES                       | No
Controling Area | Cost center | Company Code
5000            | 361040      | 040
Cost element    | Description                       | Allocation change
0000600100      | SALARIES                       | No
6475FC            |  647500 AIGOSS              | No
But i want space between each cost center
when my cost center(ex: 159040 ,361001,361004) l want space
like below i want output:
Controling Area | Cost center | Company Code
5000                | 159040        | 040
Cost element    | Description                       | Allocation change
0000600100      | SALARIES                       | No
6475FC            |  647500 AIGOSS              | No
Controling Area | Cost center | Company Code
5000            | 361001      | 001
Cost element    | Description                    | Allocation change
0000600100      | SALARIES                       | No
Controling Area | Cost center | Company Code
5000            | 361040      | 040
Cost element    | Description                       | Allocation change
0000600100      | SALARIES                       | No
6475FC            |  647500 AIGOSS              | No
I use on change statement also
like below:
on change of costcenter
      space
endof.
but very first time its left the space for each costcenter...
Please help me..... give me some idea
thanks
Jigar

Hi Vijay,
I used at new costcenter statement its working fine but for one user, i have to send many user in one time. in my loop so many email id is there, for first user its working fine its left the space...... between each cost center but for other user its not working i check in debug mode also every time its not entered in space statement
my code is below:
loop at emailid
    loop at all costcenter where emailid = email
       at new costcenter
           space
        endat.
    endloop.
endloop.
its working for first email id
its not working for rest of user id
can i change anything here?
Please guide me
Thanks
Jigar

Similar Messages

  • PSD Rollover Button with image in front stops button from changing state

    I have a wide PSD button that changes state when rolled over. I would like to place a PNG image with transparency in some areas over the top of it so that the rollover button shows through the transparent areas of the PNG.
    How can you get it to do the rollover effect when the user mouses over the bit of the button that the image is in front of? Is ther a way of making the PNG 'invisible' to the mouse?
    I know I could redesign the button so that it includes the image but I'm trying to keep file sizes and load times to a minimum, I use this button a lot on my website with a different on each, and having that number of individual buttons would result in a bloated, slow-loading website.

    Hi Abhishek
    Thanks for your reply. I was able to achieve the effect I wanted by having the PNG and the PSD Button with the same link and then grouping them. This means I can mouse over the PNG and still get the PSD rollover effect, which is perfect.
    However I also have another similar problem. I have some different PSD Rollover Buttons which have some text in front of them (basically it's the button label). On some of these buttons when you roll over the text it prevents the rollover state of the button, and on other buttons the rollover effect occurs as it should, and there doesn't appear to be any consistency about which does what. Grouping or ungrouping doesn't appear to make a difference. Can you help?

  • %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to down

    Hello,
    On a 4402 wireless controller (7.0.220.0) with LAP1242AG-E-K9 and LAP1252AG-E-K9 access points I receive lots of messages like this:
    Dec  9 12:55:16 ap-a1 1466: AP:001a.2f58.d4d6: *Dec  9 11:55:16.174: %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to down
    Dec  9 12:55:17 ap-a1 1467: AP:001a.2f58.d4d6: *Dec  9 11:55:16.211: %LINK-3-UPDOWN: Interface Dot11Radio0, changed state to up
    what is a little bit annoying, in particular for voice communications.
    Is there a way to get more information from any logs or is there a similar problem discussion anywhere on this forum?
    Thanks.

    Hi Konstantin,
    Unfortunately I do not think we have the radio status codes published, but I'll comment on them here:
    Status 51: Reset on transmit completion. I'm not 100%, but I think this means the radio was supposed to reset (due to another reason) but had data to transmit, so it completed TX and then reset.
    Status 52: Reset on completion of multicast packets. Similar to above, just with multicast traffic being queued up.
    Status 37: Generic interface reset (up/down), often seen during bootup or on configuration changes.
    Status 54: Radio interface was shutdown -- either configured by the user or perhaps part of the boot process.
    Status 67: Reset after changing hostname on the AP. This also would occur on bootup once the config is loaded.
    Status 71: Reset to update radio status on WLC. Also usually done upon AP joining the WLC after bootup.
    -Pat

  • Restarting too quickly, changing state to maintenance

    I'm trying to add a new resource to stop/start at reboot time. It's a single process that needs to be started, but everytime I enable the resource it keeps stopping and starting it until eventually it goes into maintenance saying "Restarting too quickly, changing state to maintenance".
    I have the following in the /lib/svc/method (start) file :
    #!/sbin/sh -xv
    # Start method script for the xcom service
    . /lib/svc/share/smf_include.sh
    case "$1" in
    'start')
    if [ `pgrep xcomd` ]
    then
    echo "$0: XCOM is already running..."
    exit $SMF_EXIT_ERR_NOSMF
    fi
    if [ -x /etc/xcomd ]
    then
    echo "Starting XCOM..."
    /etc/xcomd
    else
    echo "XCOM is not installed or not executable..."
    exit $SMF_EXIT_ERR_NOSMF
    fi
    'stop')
    if [ `pgrep xcomd` ]
    then
    echo "Stopping XCOM..."
    /etc/xcomd -s
    else
    echo "XCOM is not running..."
    fi
    esac
    exit $SMF_EXIT_OK
    And the following in /var/svc/manifest/application/xcom.xml :
    <?xml version='1.0'?>
    <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
    <service_bundle type='manifest' name='export'>
    <service name='application/xcomd' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>
    <dependency name='usr' grouping='require_all' restart_on='none' type='service'>
    <service_fmri value='/system/filesystem/minimal'/>
    </dependency>
    <exec_method name='start' type='method' exec='/lib/svc/method/xcomd %m' timeout_seconds='60'>
    <method_context/>
    </exec_method>
    <exec_method name='stop' type='method' exec='/lib/svc/method/xcomd %m' timeout_seconds='60'>
    <method_context/>
    </exec_method>
    <stability value='Unstable'/>
    <template>
    <common_name>
    <loctext xml:lang='C'>XCOM file transfer program</loctext>
    </common_name>
    <documentation>
    <manpage title='xcomd' section='8'/>
    <manpage title='xcomcfg' section='8'/>
    </documentation>
    </template>
    </service>
    </service_bundle>
    Any ideas where this is going wrong??? I've pulled the manifest file togeher looking at other things so I'm not surprised if there's errors in there. Any help greatly appreciated.

    Change the name of the script to be anything other
    than 'xcomd' or 'svc-xcomd' and it would work. That's
    what I've done now. The start/exec and stop/exec now
    call a different script. One problem I had with this
    was even though when doing a 'listprop' it showed it
    had taken the change, and I'd exported it out to the
    manifest file, when trying to enable the resource it
    would complain that it couldn't find the old script
    [ Feb 15 18:12:53 Executing start method ("/lib/svc/method/svc-xcomd") ]
    /sbin/sh: /lib/svc/method/svc-xcomd: not found
    [ Feb 15 18:12:53 Method "start" exited with status 1]
    Is there a way of refreshing things one you make a
    change??? When I'm exiting out I'm either using 'end'
    or 'exit'.Yes, you have to run "svcadm refresh xcomd". This is
    because svc.startd uses the property values from the
    "running" snapshot of the service. svcprop does that by
    default as well. A plain listprop in svccfg, though, will only
    show you the current values of the properties. (You can use
    selectsnap to select the running snapshot and examine its
    property values with listprop.) svcadm refresh updates the
    running snapshot with the current property values, so that must
    be done after changing properties.

  • The Fe0/0 on 2801 show some "change state to up"

    hi
    i have an Issue with my cisco 2801.
    in the logs shown me the interface FE0/0 cames up some times but never show the down state, I receive my internet service on this interface but never lost the conection, just this logs information
    Oct 7 18:39:32.412: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 7 18:39:41.448: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 7 21:57:20.775: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 8 02:29:31.350: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 8 02:55:12.362: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 8 13:02:21.824: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 8 13:05:30.076: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 01:49:25.864: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 01:49:58.616: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 01:54:11.708: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 03:26:23.080: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 05:59:39.519: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 11:27:14.246: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    Oct 9 14:59:02.057: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    the IOS Version that is running is
    flash:c2801-adventerprisek9-mz.124-24.T1.bin
    what could be the problem?
    thank you
    Roland

    Hello,
    Any idea how to troubleshoot/resolve this issue? We have a old 2801 which started displaying the same problem and i see both FE0/0, FE0/1 link messages.
    Oct 29 01:28:57.091 PST: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
    .Oct 29 01:29:03.839 PST: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
    .Oct 29 01:29:29.747 PST: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    .Oct 29 01:29:42.283 PST: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
    .Oct 29 01:29:48.923 PST: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
    .Oct 29 01:30:01.343 PST: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up

  • Auto DHCP renew when tracking change state

    I looking to find a way to do a shut and no shut until the tracking change state. For spoke router using a DHCP connection to the Internet. When there is a problem with the connection, the modem will give a private ip adresse and by just doing a shut and then a no shut it fix the issue but I would like to do it automaticaly. I have already tried with a event manager applet but when the tracking change state it will execute only the commands only once but I would like it to do it every 10 minutes until the tracking change state again. Maybe with tcl script but don't realy know where to start.

    You can do what you want using three applets (two top-level applets, and one nested applet).
    event manager environment quote "event manager applet track-down event track 1 state down action 001 cli command "enable" action 002 cli command "config t" action 003 cli command "event manager applet track-timer" action 004 cli command "event timer watchdog time 180 name track_timer" action 005 cli command "action 1.0 cli command enable" action 006 cli command "action 2.0 cli command $quote config t$quote" action 007 cli command "action 3.0 cli command $quote interface Fa0/0$quote" action 008 cli command "action 4.0 cli command shut" action 009 cli command "action 5.0 cli command $quote no shut$quote" action 010 cli command "action 6.0 cli command end"event manager applet track-up event track 1 state up action 1.0 cli command "enable" action 2.0 cli command "config t" action 3.0 cli command "no event manager applet track-timer" action 4.0 cli command "end"
    The above config will periodically shut/no shut interface Fa0/0 every three minutes until the tracked object comes back up.

  • Changing states from within a component

    Let's say that I have a TileList that is rendering data in a
    VBox. Eventually the TileList fills up and starts scrolling. I want
    to change states when clicking on item in the TileList.
    I don't want to place the click-attribute in the TileList,
    because it will change states when I am scrolling the list without
    actually selecting anything.
    I want to say click="currentState='state2'" inside the VBox,
    but that does not work because state2 is at the root level, and I
    don't know how to get to the root-level (in lack of a better word)
    from withing the component.
    This is not the proper syntax, so misunderstand me the right
    way here... Is there an equivallence to
    click="currentState='_root.state2'" in mxml?
    Thanks for any suggestions or best practices. I want the easy
    way out.
    This is the general structure...
    <mx:Application>
    <mx:states>
    <mx:State id="state1"/>
    <mx:State id="state2"/>
    <mx:State id="state3"/>
    </mx:states>
    <mx:TileList dataprovider="{...}">
    <mx:itemRenderer>
    <mx:component>
    <mx:VBox id="ClickThisBoxToChangeStates">
    <mx:Image/>
    <mx:Label/>
    </mx:Vbox>
    </mx:component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

    Your assumption is right.
    It doesn't work because there is no state2-state defined
    within the mx:component.
    In the documentation about changing states it says that I can
    go from application level and change states within a component;
    like this: click="currentState='mycomponent.anotherstate'" but not
    how I can change a state at application level from within a state.
    When I try, it says (at runtime) that the state is not defined.
    So I don't know why <mx:VBox
    click="currentState='state2'"/> doesn't work.
    I apprechiate your expertese a lot.

  • How to change state of a constraint from DEFERABLE to IMMEDIATE?

    Hi,
    I am runnig 10gR2 and would like to change state of a constraint from
    DEFERABLE to IMMEDIATE without recreating it.
    The change is working at the session level with
    SET CONSTRAINT <constraint name> IMMEDIATE;
    But this is not visible for other users.
    So my question is, if there is any other way to do it, so the change would be visible for every user.
    Here is what I have done:
    CREATE TABLE TEST_TBL
    ID NUMBER
    ALTER TABLE TEST_TBL ADD CONSTRAINT pk_test_tbl PRIMARY KEY(ID)
    INITIALLY DEFERRED DEFERRABLE;
    SQL> INSERT INTO test_tbl VALUES(1);
    1 row created.
    SQL> INSERT INTO test_tbl VALUES(1);
    1 row created.
    SQL> INSERT INTO test_tbl VALUES(1);
    1 row created.
    SQL> COMMIT;
    COMMIT
    ERROR at line 1:
    ORA-02091: transaction rolled back
    ORA-00001: unique constraint (TEST_SCHEMA.PK_TEST_TBL) violated
    The constraint is checked only at commit,
    To change this:
    SQL> SET CONSTRAINT pk_test_tbl IMMEDIATE;
    Constraint set.
    SQL> INSERT INTO test_tbl VALUES(1);
    1 row created.
    SQL> INSERT INTO test_tbl VALUES(1);
    INSERT INTO test_tbl VALUES(1)
    ERROR at line 1:
    ORA-00001: unique constraint (TEST_SCHEMA.PK_TEST_TBL) violated
    But if I would connect with user B, I would be able to do multiple inserts with value 1.
    Thanks

    I am runnig 10gR2 and would like to change state of a constraint from
    DEFERABLE to IMMEDIATE without recreating it.From Oracle Constraints:
    Note: A non-deferrable constraint is generally policed by a unique index (a unique index is created
    unless a suitable index already exists). A deferrable constraint must be policed by a non-unique index
    (as it's possible for a point of time during a transaction for duplicate values to exist). This is why
    it is not possible to alter a constraint from non-deferrable to deferrable. Doing so would require
    Oracle to drop and recreate the index.
    A PK enforces uniqueness procedurally without relying on a unique index. The main advantage
    of a non-unique index is the constraint can be disabled and re-enabled without the index being dropped and recreated.

  • Switch statement problem

    I am doing a question in which I have to make a simple ATM program that can withraw and deposit money as many times as the user wants. To exit the program the user has to hit "x". I have to use a switch statement. Im getting incompatible type errors after compiling it. Can anyone help me? Sorry if the formattings not too good.
    //ATM.java
    //This program reads in a user's opening balance and performs a withdrawal or a deposit at the request of the user
    import java.text.*;
         public class ATM
         public static void main(String args[])
              int      balance;
              char      withdrawal, deposit, choice;
              //Ask for the opening balance
              System.out.print("Please enter your opening balance");
              balance=UserInput.getInt();
              //Find out what the user wants done
              System.out.print("What would you like to do? (Withdrawal, Depositor Exit(x))");
              choice=UserInput.getChar();
                                                                          switch(choice){     
    case "w":
                                                                          while(balance>0)
                                                                                              System.out.print("How much would you like to withdraw?");
                                                                                              withdrawal=UserInput.getChar();
                                                                                              balance=balance-withdrawal;
                                                                                              System.out.print("Your remaining balance is " + balance);
                                                                                              break;
    case "d":     
    while(balance>0)
                                                                                              System.out.print("How much do you wish to deposit?");
                                                                                              deposit=UserInput.getChar();
                                                                                              balance=balance+deposit;
                                                                                              System.out.print("Your new balance is " + balance);
                                                                                              break;
    case "x":          
                                                                System.out.print("Goodbye and thank you for using this program");
                                                                                              break;
    default:     
                                                                     System.out.print("We were not able to process your request, please try again");
                                                                                              break;
    }

    Type a reply to the topic using the form below. When finished, you can optionally preview your reply by clicking on the "Preview" button. Otherwise, click the "Post" button to submit your message immediately.
    Subject:
    Click for bold      Click for italics      Click for underline           Click for code tags      
      Formatting tips
    Message:
    Add topic to Watchlist:
    Original Message:
    Switch statement problem
    Xivilai Registered: Mar 3, 2007 9:52 AM      Mar 3, 2007 10:06 AM
    I am doing a question in which I have to make a simple ATM program that can withraw and deposit money as many times as the user wants. To exit the program the user has to hit "x". I have to use a switch statement. Im getting incompatible type errors after compiling it. Can anyone help me? Sorry if the formattings not too good.
    //ATM.java
    //This program reads in a user's opening balance and performs a withdrawal or a deposit at the request of the user
    import java.text.*;
    public class ATM
    public static void main(String args[])
    int balance;
    char withdrawal, deposit, choice;
    //Ask for the opening balance
    System.out.print("Please enter your opening balance");
    balance=UserInput.getInt();
    //Find out what the user wants done
    System.out.print("What would you like to do? (Withdrawal, Depositor Exit(x))");
    choice=UserInput.getChar();
    switch(choice){
    case 'w':
    while(balance>0)
    System.out.print("How much would you like to withdraw?");
    withdrawal=UserInput.getChar();
    balance=balance-withdrawal;
    System.out.print("Your remaining balance is " + balance);
    break;
    case 'd':
    while(balance>0)
    System.out.print("How much do you wish to deposit?");
    deposit=UserInput.getChar();
    balance=balance+deposit;
    System.out.print("Your new balance is " + balance);
    break;
    case 'x':
    System.out.print("Goodbye and thank you for using this program");
    break;
    default:
    System.out.print("We were not able to process your request, please try again");
    break;
    }

  • Changing state of application from within a custom component

    Hello, I have several custom components all of which are included in the parent application.
    When I try to change state from a custom component, I get an error  saying "undefined state: state name". How do I change the state of the  application from within a custom component ? All the states are defined in the parent application.

    @linrsvp,
    If you are using Flex3 try Application.application.currentState = "somestate";
    If you are using Flex4 try FlexGlobas.topLevelApplication.currentState = "somestate";
    Don't forget to import the corresponding namespaces for the above.
    Thanks,
    Bhasker

  • Change States in component from main view

    The scenario like this:
    The main view includes many component views. On my main view
    there have a radio button to choice different role type, for
    example: admin and user. For different role have different views.
    But they don’t have big difference.
    My question is how could I implement my component view change
    states when I click button on the main view? I don’t want do
    change states in main view since I need create two component views
    for different roles.
    Thanks.

    Consider adding a second state to your application, even if
    you don't put anything into it.
    In each of the components that should change state when the
    role is changed, add a listener on the application for the state
    change event ("currentStateChange"). When this event is fired,
    query the application for its current state:
    var appState:String = (Application.application as
    Application).currentState;
    Use that to change the state of the component. Remember
    you'll also need to do this when your component is first
    created.

  • Change state option in SM51

    Hello,
    I would like to know if activate/deactivate option in SM51 (see below)
    menu--->edit -
    >change state -
    >activate/deactivate
    is used for activating and deactivating servers? If not what is its functionality?
    mm

    Hi,
    There are the following application server states -
    initial  - The application server has logged on to the message server. When the server is in this state, it cannot be accessed.
    starting  - The application server starts the work process and initializes all required services. Requests cannot be processed in this phase.
    active - This is the "normal" state of the application server. It receives and processes requests, and creates and sends requests to other servers.
    passive - In this state, the application server can continue to process received requests or create requests itself. However, no new requests should be sent to the server. The purpose of this state is to "logically" remove from the system a server that has to be stopped during productive operation. The server finishes processing its existing requests, but does not accept any new requests and can be terminated without having to interrupt any relevant requests such as updates or batch jobs. This state can be changed to the "active" state.
    shutdown - The application server is in the shutdown phase, that is, it will be terminated. This state is similar to the "passive" state, but cannot be changed to the "active" state. This state or phase ends with the termination of the server.
    stop - The application server has terminated the connection to the message server and can no longer be accessed.
    Use
    The server functions are used to deactivate or close down SAP servers without jeopardizing the requests the server is currently processing. They enable the server to complete all the requests it is currently processing without accepting any new requests.
    Integration
    These functions allow the state of an SAP server to be changed. The possible server states are described under SAP Application Server States.
    Prerequisites
    The functions in question are system administration functions that may only be used when a valid username and password are given.
    Features
    The following functions can be used on the selected servers.
    Hard-terminate server
    A hard termination is equivalent to a signal 2 on the operating system level. The dispatcher and all its work processes are terminated; requests in the queue are ignored; and requests that are currently being processed are terminated.
    Soft-terminate server
    All services that the application server provides (updates, batch, and so on) are no longer available, but all requests that are still in the queue are completed by the work processes. Once all requests are completed, the application server terminates.
    The server state is then shutdown.
    The activate function can no longer be used to activate the server.
    Close connection
    In this case, the connection between the selected server and the message server is terminated. No more requests from other application servers can reach the server.
    This function tests the connection to the message server, because normally the connection has to be re-established.
    Deactivate
    This has the same effect as soft terminate, except that the server does not shut down when it has finished processing all requests. Instead, it enters the passive state and can be re-started at any time by means of the activate function.
    Activate
    This is used to re-activate servers in the passive state. The state then returns to active.
    Activities
    In the initial screen of the Message Server Monitor (transaction SMMS), choose Go To -> Expert Functions -> Server.
    Hope this would help you in understanding the concepts.
    Please award points if useful.
    Regards,
    Sree

  • Difference between At new and on change statement?

    What is the difference between at new and on change statement? Please explain with an example.

    hi
    on change of differs from at new in the following respects:
    It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    You can use else between on change of and endon.
    You can use it with loop at it where . . ..
    You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    REGARDS
    PRASANTH

  • Flex List ItemRenderer : Change States from parent ?

    Hai there,
    So i created a list that uses an arrayCollection as dataProvider and an itemRenderer with 2 states : LabelState and ProgressState, the labelState is the start state and shows a Filename, the progressState is the state i need to change to when i press a "Start Upload" Button.
    This is the itemrenderer :
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    autoDrawBackground="true" currentState="LabelState" width="800">
    <s:states>
    <s:State name="LabelState" />
    <s:State name="ProgressState" />
    </s:states>
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    public function changeState():void
    trace("changing state for " + label_field.text);
    this.currentState = "ProgressState";
    trace(this.currentState);
    ]]>
    </fx:Script>
    <s:Label name="label_field" paddingLeft="10" maxHeight="40" paddingTop="10" paddingBottom="10" id="label_field" width="800" color="#333333" includeIn="LabelState" text="{data.label}"/>
    <mx:ProgressBar id="progress_field" left="3" top="3" bottom="3" mode="manual" chromeColor="#0096FF" includeIn="ProgressState" textAlign="center" labelPlacement="center" maximum="100" color="#FFFFFF" right="3"/>
    </s:ItemRenderer>
    This is the code for the List :
    <s:List keyUp="lst_selected_files_keyUpHandler(event)" skinClass="styles.skins.ListSkinNoHorizontal"
    borderVisible="false"
    contentBackgroundColor="#c9c9c9" contentBackgroundAlpha="1"
    id="lst_selected_files"
    width="100%" height="100%"
    alternatingItemColors="[#EAEAEA,#FAFAFA]" color="#000000"
    itemRenderer="components.ProgressLabel" dataProvider="{arr_items}" />
    <components:RemoveBar nr_of_items="{arr_items.length}" id="cmp_removeBar" hermesRYA="cmp_removeBar_hermesRYAHandler(event)" bottom="-35" width="100%" height="35" />
    This is the function that changes the states for the current "to be uploaded file":
    protected function uploadNextFile():void
    if(uploadingFile!=null) uploadingFile==null;
    popup = null;
    popup = new ProgressPanel();
    lst_selected_files.selectedIndex = currentUploadNr;
    current_progressItem = lst_selected_files.dataGroup.getElementAt(currentUploadNr) as ProgressLabel;
    current_progressItem.changeState();
    lst_selected_files.validateNow();
    For some reason the states change ... but the elements aren't visually updated, ... meaning that i still see the label and the progressbar isn't visible :/
    anyone ?

    This seems to work for me:
    <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/mx" >
        <s:controlBarContent>
            <s:Button label="test" click="(list1.dataGroup.getElementAt(0) as Object).test()" />
        </s:controlBarContent>
        <s:List id="list1">
            <s:dataProvider>
                <s:ArrayList>
                    <fx:Array>
                        [0,1,2]
                    </fx:Array>
                </s:ArrayList>
            </s:dataProvider>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <fx:Script>
                            <![CDATA[
                                public function test():void {
                                    currentState = 'state2';
                            ]]>
                        </fx:Script>
                        <s:states>
                            <s:State name="state1" />
                            <s:State name="state2" />
                        </s:states>
                        <s:Rect width="50" height="50">
                           <s:fill>
                               <s:SolidColor color.state1="red" color.state2="green" />
                           </s:fill>
                        </s:Rect>
                        <mx:ProgressBar includeIn="state2" />
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:Application>
    You will probably want to override getCurrentRendererState() to do this properly tho.  This post demonstrates how to use DataRenderer instead if you would rather: http://flexponential.com/2010/02/07/using-datarenderer-to-add-custom-states-to-a-spark-lis t-renderer/
    In general you shouldn't interact with the renderers of a List directly (via getElementAt), but rather by changing the data in the List and building an ItemRenderer that reacts to those changes.  So it would be better if you did something like list1.dataProvider.getItemAt(0).changeState = true and then in your renderer override the data setter to change the state if that variable is set.

  • Hello, Trousseau session asks the password many times in a day.  What to do to change this problem? Mfrance iMac, Mac OS X (10.7.3)

    Hello,
    Trousseau session asks the password many times in a day.
    What to do to change this problem? Mfrance
    iMac, Mac OS X (10.7.3)

    ...I wonder how your question solved their question.

Maybe you are looking for

  • EBS R12 XML Gateway Integration - Supplier information sync with MAXIMO

    Hello Guys. Recently I'm working on a EBS R12 implementation project, as customer already has MAXIMO application, they would like keep it ask "supplier" information syncronization between Oracle EBS R12 and MAXIMO through Oracle SOA Suite 10.1.3 For

  • IDVD 6 Burn Problem , still

    Still having trouble. I have been trying to burn a 2 hour 20 minute DVD for three weeks. I have tried in iDVD 5 , where the progress bar would get to an 1/8 of an inch from the end and it would stop responding, with no success and now trying iDVD 6 t

  • Strange error in F-06

    Dear all , One of my end user got a strange error in SAP , he is  trying to clear  Cash collection entry with T code F-06 . when he is selecting the store (Retail project) cash GL SAP screen (F-06) will get automatically closed , then again he tried

  • Does the iPhone support "Disk Use"

    Does the iPhone support "Disk Use" like the iPod?

  • PDF images open as Gray Boxes on pc

    Sent PDF file to two people w Macs and a friend who also has a pc--both images display fine for them but not on my pc. Can't find a setting to change so I can view images in a PDF that is sent by hotmail (outlook) and wondering if file is too large.