2 Replies Latest reply on Nov 11, 2009 7:47 AM by RayIT

    Need some help.. use component files, refresh data...

    RayIT Level 1

      I am struggling for some hours now with a problem,

      I use some component files for a viewstack, now I change the data in 1 component and the data should refresh in the other component.

      Should be easy, could somebody point me in the good direction.

      <mx:ViewStack id="viewStack" right="10" left="10" top="109" bottom="11">
      
      
      <!-- GEBRUIKER -->
      
      <mx:Canvas id="gebruiker" label="gebruiker" width="100%" height="100%" backgroundColor="#f6f6f6" showEffect="WipeDown" hideEffect="WipeUp">
      
      <comp:user id="user_comp" height="100%" width="100%" /> 
      
      </mx:Canvas>
      
      <!-- CATEGORIE --> 
      
      <mx:Canvas id="categorie" label="categorie" width="100%" height="100%" backgroundColor="#f6f6f6" showEffect="WipeDown" hideEffect="WipeUp">
      
      <comp:category id="category_comp" width="100%" height="100%" /> 
      
      </mx:Canvas>
      
      
      
      

       

      If I insert data in the database from the first canvas and I go to the second canvas this data is not refreshes/changed.

       

      How to trigger this.

       

      Many thanks

      Raymond

        • 1. Re: Need some help.. use component files, refresh data...
          Arsohoh Level 1

          hi,

           

          Just trying assigning the data from database to some bindable variable and try assigning that variable to the canvas. Am not sure if it works. Pls try..

          1 person found this helpful
          • 2. Re: Need some help.. use component files, refresh data...
            RayIT Level 1

            I found a nice sollution which after looking now to it is very simple...

             

            I just used following to refresh the httpservices in the different components!

             

            category_comp is the id of the component and the mainCategoryService is the database retrieve service I need to refresh...

             

            Application.application.category_comp.mainCategoryService.send();
            Application.application.foto_beheer_comp.mainCategoryService.send();

             

            Now if some one clicks on the menu to go to an other component file I just refresh them.

             

             

            many thanks

             

            Raymond