One clarification, "...a local XML model (mx:Model)...". mx:Model is not
XML.  It converts XML into a nested object structure.  Use mx:XML if you
want an xml-based "model"

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Monday, October 01, 2007 4:07 PM
To: [email protected]
Subject: [flexcoders] Forms - best practices

 

I'm starting on my first forms UI, and was thinking of the following,
assuming separate MXML components for each form.

- each form has an associated VO
- the way in: the form has a bindable model property containing an
instance of the vo or something that contains one. The form controls
are bound {} to VO properties
- if the form is in "create" mode, the model may be null
- the way out: as described in the docs the form also has a local XML
model (mx:Model) whose elements are bound to the form controls.
Presumably this is mostly for text controls, not sliders etc.
- after validation, the form dispatches a custom event (eg.
AccountEditEvent) containing an instance of the vo and perhaps a flag
indicating whether it's a "create" or an "update"

Comments?

 

Reply via email to