Changeset 1249
- Timestamp:
- 04/27/11 12:42:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/CMDComponentXMLEditor.as
r1248 r1249 10 10 import clarin.cmdi.componentregistry.editor.model.CMDComponentElement; 11 11 import clarin.cmdi.componentregistry.editor.model.CMDSpec; 12 12 13 13 import flash.display.DisplayObject; 14 14 import flash.events.Event; … … 16 16 import flash.utils.Dictionary; 17 17 import flash.utils.getTimer; 18 19 import mx.binding.utils.BindingUtils; 18 20 19 import mx.collections.ArrayCollection; 21 20 import mx.containers.Form; … … 182 181 _firstComponent = components.getItemAt(0) as CMDComponent; 183 182 if (_firstComponent.componentId != "" && _firstComponent.componentId != null) { 184 185 186 187 188 183 _firstComponent = new CMDComponent(); 184 _firstComponent.name = _spec.headerName; 185 _firstComponent.cmdComponents = _spec.cmdComponents; 186 _spec.cmdComponents = new ArrayCollection(); 187 _spec.cmdComponents.addItem(_firstComponent); 189 188 } 190 189 } … … 204 203 head.addChild(startOverLabel); 205 204 addChild(head); 205 206 206 var groupNameInput:FormItemInputLine = new FormItemInputLine(LabelConstants.GROUP_NAME, spec.groupName, function(val:String):void { 207 207 spec.groupName = val; 208 } , true, InputValidators.getIsRequiredValidator());208 }); // editable, not required 209 209 addChild(groupNameInput); 210 210 211 var descriptionInput:FormItemInputText = new FormItemInputText(LabelConstants.DESCRIPTION, spec.headerDescription, function(val:String):void { 211 212 spec.headerDescription = val; 212 }, InputValidators.getIsRequiredValidator()); 213 }, InputValidators.getIsRequiredValidator()); //editable, required 213 214 addChild(descriptionInput); 215 214 216 var nameInput:NameInputLine = new NameInputLine(_firstComponent.name, function(val:String):void { 215 217 _firstComponent.name = val; 216 218 _spec.headerName = val; 217 }) 219 }); // editable, not required 218 220 addChild(nameInput); 219 addChild(new ComboBoxInputLine(LabelConstants.DOMAIN_NAME, _spec.domainName, LabelConstants.DOMAIN_NAME_DATA, LabelConstants.DOMAIN_NAME_PROMPT, function(val:Object):void { 221 222 var domainInput:ComboBoxInputLine = new ComboBoxInputLine(LabelConstants.DOMAIN_NAME, _spec.domainName, LabelConstants.DOMAIN_NAME_DATA, LabelConstants.DOMAIN_NAME_PROMPT, function(val:Object):void { 220 223 if (val) { 221 224 _spec.domainName = val.data; 222 225 } 223 })); 226 }); // editable, not required 227 addChild(domainInput); 224 228 225 229 // var idInput:FormItemInputLine = new FormItemInputLine(XMLBrowser:"Id", spec.headerId, function(val:String):void { … … 269 273 } 270 274 271 272 273 274 275 276 277 278 279 } */275 /* private function createOptionalGroupNameInput(spec:CMDSpec):FormItem { 276 var result:FormItemInputLine = new FormItemInputLine(LabelConstants.GROUP_NAME, spec.groupName, function(val:String):void { 277 spec.groupName = val; 278 }, true, InputValidators.getIsRequiredValidator()); 279 BindingUtils.bindSetter(function(val:Boolean):void { 280 result.visible = !val; 281 }, spec, "isProfile"); 282 return result; 283 } */ 280 284 281 285 private function handleComponents(components:ArrayCollection):void {
Note: See TracChangeset
for help on using the changeset viewer.