|
Is it not possible to bind the enabled
attribute of a button to a property? As the property changes the state of the
button remains disabled i.e. <mx:Button id="saveButton"
label="Create Section" height="22" enabled="{ModelLocator.formSection.isValid}" click="sectionViewHelper.submitForm()"
/> FormSection reference: import
org.nevis.cairngorm.vo.ValueObject; class com.optimal.raven.vo.FormSection implements ValueObject { public static var regClass = Object.registerClass( "com.optimal.raven.application.resource.data.FormSection", com.optimal.raven.vo.FormSection
); public var code : String = ""; public var description : String = ""; public var languageDetails : Array = new Array(); public var active : Boolean = true; public function FormSection() { } //---------------------------------------------------------------------------- [ChangeEvent("change")] public function get isValid() :Boolean { if(description.length &&
languageDetails.length) { for(var i:Number=0; i <
languageDetails.length; i++) { if(!languageDetails[i].isValid){ trace("FormSection FALSE
DETAIL");
return false; } } trace("FormSection TRUE"); return true; } else { trace("FormSection FALSE"); return false; } } } Cheers, Stace -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS
|
- [flexcoders] Binding to properties? Stacy Young
- RE: [flexcoders] Binding to properties? Matt Chotin
- RE: [flexcoders] Binding to properties? Stacy Young
- RE: [flexcoders] Binding to properties? Matt Chotin

