Adobe Dreamweaver Forums



Last 10 THreads :         Change html page image by the month (Last Post : Steve Zavodny - Replies : 18 - Views : 19 )           »          suggestions for a loop to load text files (Last Post : chopTheWood - Replies : 0 - Views : 1 )           »          how do I create a chain reaction? (Last Post : LostFlashGirl - Replies : 1 - Views : 2 )           »          Problems with drag (Last Post : CatBandit - Replies : 1 - Views : 3 )           »          Editing Quiz (Last Post : CatBandit - Replies : 1 - Views : 2 )           »          cross browser issue? (Last Post : bmilesp - Replies : 0 - Views : 1 )           »          Custom Preloader (Last Post : NedWebs - Replies : 1 - Views : 2 )           »          Suddenly can't see files on remote server (Last Post : GDrink9085 - Replies : 9 - Views : 10 )           »          how do I add a table to a preformed template that I got? (Last Post : Murray *ACE* - Replies : 8 - Views : 13 )           »          Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 42 - Views : 259 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: , , , ,



Reply
  #1 (permalink)  
Old 07-09-2008, 04:24 PM
webquorning
 
Posts: n/a
Diggs:
Default Reload data when chaning view state

Hi all,
I have a main application ("MTF.mxml") and two view states in the application
(myChallenges) and (responses). In the view states, I have inserted two
customized components.

The MyChallenges-component is a list of challenges and when a challenge is
selected, I switch from the myChallenges-view state to the responses-view state
using a costum event dispatcher.
So far so good,

The problem is that when I change to the responses-view state and therefore to
my responses-component, the data loading on the panel of the component is only
the request that I get when I for the first time enter the responses-component.
When I go forward in my application from the responses-view state to the
myChallenges-viewstate to pick a new challenge, the responses-view state does
not reload with the new challenge id - actually, no action script code in the
responses-component is processed at all!

I figure it has something to do with the component's loading events.
I use the creationComplete-tag property in the component to activate an
init()-function to handle my ActionScript code. But this seems to activate the
function only when the component is created for the first time!

How do I handle this? I tried using the enterState-property, but with no
succes!

Please help me, if anyone knows the answer!




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-09-2008, 05:42 PM
Sam Rowe
 
Posts: n/a
Diggs:
Default Re: Reload data when chaning view state

Hi,

I would expect the enterState event to work for what you need. e.g.

where doStuff() is the method to load the new data.

<State name='responses' enterState='doStuff'/>
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 07:55 PM
webquorning
 
Posts: n/a
Diggs:
Default Re: Reload data when chaning view state

Thank you for the quick feedback.
The enterState-property works fine, it seems that the Action Script code loads
every time.
Actually, what I really wish is that the component "reloads" every time. The
problem is that my actionscript code adds elements to the scene, edits
properties and so forth, everything depending on what challengeId there is
given to the component. When the component has completed the code once,
variable-values, elements and so forth are still kept until the state is
entered again. Is it not possible to actually reload the component - not just
making "show/hide" it, as I do now?

Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk