Another New-user question on initialization of component on main application page

Affichage des 3 messages de 2 personnes.
Message n° 1
Debra a écritle 4 novembre 2009 à 05:05
Hi, I am a new Flex user working on my first real application. I am having difficulty referencing an application field in a component because I believe that the component is initialized before the field is filled in (User Interface, text box) and I can't seem to find a way to refresh or control the initialization of the component.
What is happening is that I have my application page that contains basic information and one text box where a user would enter a year, then, based on a change of state, database information will be displayed relating to the year entered. What appears to be happening now is that the component with the detailed information is being initialized and the http listener started when the application is opened.

Does anyone have a good way to control the process so that the component doesn't get the information until the text box contains information?

Or am I making things more difficult than they should be? Any suggestions on how to best accomplish the task at hand? I know this should be simple...I must be missing something.

Thanks.

Deb
Message n° 2
Alan a écritle 7 novembre 2009 à 12:55
You can use event listener to listen to the textbox's input, or key press, or a button press, then , do what you want to do in that event.
Message n° 3
Debra a écritle 9 novembre 2009 à 04:49
Thanks, after a few bumps, that is what I did to solve my issue, and the code is more efficient (I am not loading the data until I have a valid parameter.

I appreciate your suggestion!