2 Replies Latest reply on Sep 22, 2011 5:54 AM by whitefinger

    use a component multiple times!

    whitefinger Level 1

      I have been stuck on a issue for some time now and its coz basically i don't know what I'm doing   and it proberly didn't help that i used Flash Catalyst to over complicate my first site but it looks good

       

      Anyway my issue is if i can explain it properly is i have a component which i think is a Data-list, and the data-list shows 9 clients in one component, when the user selects one of the 9 clients another component opens showing all details of that client

       

      The first time round it works but if the user goes back to the first component and selects a different client when the second component opens it still shows the previous client!! The strange thing is if i click off the web site and then back on the site the site refreshes it self and shows the correct client!!!

       

      i have tried many ways to try and update the website after the data change but where i dont know what im doing im going round in circles  ive tried using events but the events never trigger,  ive stuck in a bit of java script to refresh the whole site but even throught that worked refreshing the whole site for one thing wont do! ive tried to refresh the array clientArray.refresh(). i have looked into invalidateProperties();

       

      i am now at a loss, am i ment to instantiate the component so that i can destroy it and the repopulate the data

       

      any suggestion would be most helpfull

        • 1. Re: use a component multiple times!
          Amy Blankenship Level 4

          Could you post the code of the second component, and a snippet of how you're setting its value from the first component?

          • 2. Re: use a component multiple times!
            whitefinger Level 1

            Well after searching for a month and thinking perhaps flex wasnt capable for dynamic web sites i decided to start again with my search

             

            Turns out that the answer was really simple as all way just had to clear my mind and think a little

             

            protected function itemrenderer1_mouseOverHandler(event:MouseEvent):void

            {   

                            Main.ClientData.ClientsID = clientIdNumber.text;

                            ScrollPanelSkinClientScrollingContentSkin.getClientResult.token = ScrollPanelSkinClientScrollingContentSkin.customerService.getClient(Main.ClientData.Clien tID);

                            trace("Trace one113 "+ Main.ClientData.ClientID);

                           

              }

             

            As all ways, how stupid do i feel