Yes, if you use an architectural framework(e.g Cairngorm, Parsley, PureMVC...), you would have ProductVo in a model and Save would be implemented as a Command.
An event to trigger a command can be dispatched from anywhere, including a popup window.
I just looked at the parsley framework and saw this code:
private function save():void
contact.firstName = firstName.text;
contact.lastName = lastName.text;
contact.email = email.text;
}So, it is doing the same thing I'm doing.I'm using Spring and hibernate on the server level, it is my own framework.
Yes, but in the case of Parsley, you could have save be the handler for a command execution (I renamed save to execute as it's now in a command, although you could keep the name if you want):
public function execute(event:SaveEvent):AsyncToken
The SaveEvent class would have a property of type ProductVO in which you pass all the details of the product from the controls in your popup.