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..
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?)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?
The best thing is to keep the credentials in the CreateSessionEvent class. You can then dispatch the event, the controller will pick it up and execute the corresponding command. In your command, you should invoke a business delegate that will make the httpservice call and respond back to the command. If you ever change the server communication to for instance Remoting, you can create another business delegate that knows how to handle remote object calls.