Let's say I have my command class as follows:
public function onResult( event : Object ) : Void
{
ModelLocator.workflowState = ModelLocator.VIEWING_MANAGER_SCREEN;
var viewHelper = ViewLocator.getInstance().getViewHelper( "managerViewHelper" );
viewHelper.setManagerForm(event.result);
}
I then have my respective VO:
import org.nevis.cairngorm.vo.ValueObject;
class com.mydomain.admin.vo.ManagerVO implements ValueObject
{
public var ID : Number;
public var firstName;
public var lastName;
public static var registered:Boolean = Object.registerClass( "com.mydomain.admin.vo. ManagerVO", Manager VO );
}
and then we have my viewHelper
public function setManagerForm ( result : Object ) : Void
{
view.tiFirstName.text = result.FIRSTNAME;
view.tiLastName.text = result.LASTNAME;
}
- Should
I set the ValueObject by calling it from the onResult handler. Is there
a more direct way to set and populate values in both the form AND the
VO? Right now, I'm calling the Helper and I somehow think I'm missing
something with the VO....
- Should I include the MX Databinding (do i have to?) and if so, should I include it in the VO class or as part of the viewHelper class?
- Should I set and get individual fields (firstname, lastname, email) or should I use one big function that acts as a setter and getter for a whole form to populate the VO?
- Is it better to set the VOs inline (ex: text={delegate.setFirstName (vo.firstname)} or should I call a function that gets and sets the values?
Dave
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

