The form is in a component lauched as a popUp, form data consists in:
login:String
password:String
I thought of a few different ways, but I don't like them..
- in the popUp, send button triggers a function that gets the form values and stores them in an Object, then saves the Object in the model, then dispatches a CreateSessionEvent. The CreateSessionCommand execute method is called, and it send the
HTTPService
passing the object from the model. (but then what if the model somehow doesn't get update and I send the same request twice?) - I could try to get the form data from the command execute method itself.. how can I access them though, since it is a popUp (created with
PopUpManager.createPopUp(this, LoginDialog),true)
)
I need some better Idea... I'd love to see an example flex+rail with restful xml application by the way, know of any?