I'm currently working on an application that deals heavily with state
changing via a menu bar click event. Depending on what you click on the menu
is dependant of where the currentState is changed to. Now say you go to the
menu bar and click on Search -> Contacts and that state's changed and it
adds the child it needs so you are able to search the contacts. That child
has an initialize method which fires off a method to a cfc and the cfc
returnes a result which populates a combo box with all the different ways to
search for the contact (phone, email, name, etc...). But oh wait you realize
that's not where you wanted to go, you needed to search vendors so you go to
the menu and click on Search -> Vendors and once again the currentState is
changed to add the child that pertains to searching vendors. Then at some
point you need to go BACK to Search -> Contacts and search for a contact.
Now because you've already been to Search -> Contacts that intialize event
isn't going to fire therefore the combo box will not be populated with the
absolute up to date data from the MySQL database. I need a way to either A)
Force the initialize event on that component to fire again even though the
component has been created. or B) Devise a way that when currentState is
changed it completely destroys the previous child from memory and garbage
collection gets rid of it so that way next time you go to it, the initialize
is fired again. or C) Devise a way that the query is triggered on startup of
the component from within that component. Does anyone have any ideas on how
this could be done. Unfortunately I can't release much code on this project
but if anyone has any ideas I can try them and if they work post em up.

Reply via email to