Changeset 268


Ignore:
Timestamp:
03/22/10 13:37:57 (14 years ago)
Author:
patdui
Message:
  • fixed some little bugs
Location:
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/AttributeListEdit.as

    r264 r268  
    33        import clarin.cmdi.componentregistry.editor.model.CMDAttribute;
    44        import clarin.cmdi.componentregistry.editor.model.ValueSchemeInterface;
    5        
     5
    66        import flash.events.Event;
    77        import flash.events.MouseEvent;
    8        
    9         import mx.binding.utils.BindingUtils;
     8
     9        import mx.binding.utils.ChangeWatcher;
    1010        import mx.collections.ArrayCollection;
    1111        import mx.collections.XMLListCollection;
     
    5454                }
    5555
    56         /**
    57         * Public utility method to create ValueScheme Component. By lack of better placed put in this class
    58         **/
     56                /**
     57                * Public utility method to create ValueScheme Component. By lack of better placed put in this class
     58                 **/
    5959                public static function createAndAddValueScheme(valueScheme:ValueSchemeInterface):UIComponent {
    6060                        var valueSchemeInput:ValueSchemeInput = new ValueSchemeInput("Type");
     
    6868                                valueSchemeInput.valueSchemeEnumeration = valueScheme.valueSchemeEnumeration;
    6969                        }
    70                         BindingUtils.bindSetter(function(val:String):void {
     70                        ChangeWatcher.watch(valueSchemeInput, "valueSchemeSimple", function(val:String):void {
     71                                        valueScheme.valueSchemeSimple = val;
     72                                        valueScheme.valueSchemePattern = "";
     73                                        valueScheme.valueSchemeEnumeration = null;
     74                                });
     75                        ChangeWatcher.watch(valueSchemeInput, "valueSchemePattern", function(val:String):void {
    7176                                        valueScheme.valueSchemePattern = val;
    7277                                        valueScheme.valueSchemeEnumeration = null;
    7378                                        valueScheme.valueSchemeSimple = "";
    74                                 }, valueSchemeInput, "valueSchemePattern");
    75                         BindingUtils.bindSetter(function(val:String):void {
    76                                         valueScheme.valueSchemeSimple = val;
    77                                         valueScheme.valueSchemePattern ="";
    78                                         valueScheme.valueSchemeEnumeration = null;
    79                                 }, valueSchemeInput, "valueSchemeSimple");
    80                         BindingUtils.bindSetter(function(val:XMLListCollection):void {
     79                                });
     80                        ChangeWatcher.watch(valueSchemeInput, "valueSchemeEnumeration", function(val:XMLListCollection):void {
    8181                                        valueScheme.valueSchemeEnumeration = val;
    8282                                        valueScheme.valueSchemeSimple = "";
    8383                                        valueScheme.valueSchemePattern = "";
    84                                 }, valueSchemeInput, "valueSchemeEnumeration");
     84                                });
    8585                        return valueSchemeInput;
    8686                }
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as

    r238 r268  
    3535                        _parent = parent;
    3636                        styleName = StyleConstants.XMLBROWSER;
    37                         if (component.componentId == null) { // new empty component, otherwise it would be an already existed component which cannot be edited.
     37                        if (!component.componentId) { // new empty component, otherwise it would be an already existed component which cannot be edited.
    3838                                addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler);
    3939                                addEventListener(DragEvent.DRAG_OVER, dragOverHandler);
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/UploadService.as

    r242 r268  
    22        import clarin.cmdi.componentregistry.common.ItemDescription;
    33        import clarin.cmdi.componentregistry.importer.UploadCompleteEvent;
    4 
     4       
    55        import com.adobe.net.URI;
    66        import com.hurlant.util.Base64;
    7 
     7       
    88        import flash.events.DataEvent;
    99        import flash.events.ErrorEvent;
     
    1414        import flash.net.FileFilter;
    1515        import flash.net.FileReference;
    16         import flash.net.URLVariables;
    17 
     16       
    1817        import mx.controls.ProgressBar;
    19 
     18        import mx.managers.CursorManager;
     19       
    2020        import org.httpclient.HttpClient;
    2121        import org.httpclient.events.HttpDataEvent;
     
    4545
    4646                private function createAndInitRequest():void {
     47                        CursorManager.setBusyCursor();
    4748                        httpClient = new HttpClient();
    4849                        httpClient.listener.onError = httpclientErrorHandler;
     
    111112                        } catch (error:Error) {
    112113                                trace("Unable to upload file. Error: " + error);
     114                                CursorManager.removeBusyCursor();
    113115                                throw error;
    114116                        }
     
    131133                                addToMessage("Server Failed to handle registration. Unexpected error, try again later. (httpstatus code was: " + event.response.code + ")\n");
    132134                        }
     135            CursorManager.removeBusyCursor();
    133136                        httpClient.close();
    134137                }
Note: See TracChangeset for help on using the changeset viewer.