This content has been marked as final. Show 3 replies
Has anyone ever done this? I would have thought that something like this would be something common in flex. I really need help please and thank you! Any pointers are greatly appreciated.
I believe what you are going to want to do is to implement a Command Patter. It's really not to hard to do once you understand the pattern and how it works.
Here, check this out:
The short version of how you would do it is this.
Create a ValueObject that has all the field variables you want in it with getters and setters. (Or bind to it if you wish.)
In the same VO or in another class that is aware of the VO create functions for such things as transferring your data, rolling back your data and validation before you send it off.
If the data does not validate you can trigger events that the form listens for to prompt the user.
When you instantiate your form also instantiate the ValueObject. Hint: the singelton pattern works best for the VO in most cases.
Then as the user fills in fields populate the fields in your VO.
Once the user reaches the last page and clicks submit you would then have that button trigger the function to send off your data.
Hope that helps.
PS. Replace the word function with the word Method above. Sorry about that I am a CFer. Still trying to get used to you Flexers Lingo. :D
Hm ok! Don't worry i'm PHPer and C++er so I just function not method!