Changeset 281 for ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BrowserService.as
- Timestamp:
- 03/25/10 08:50:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BrowserService.as
r260 r281 1 1 package clarin.cmdi.componentregistry.services { 2 2 import clarin.cmdi.componentregistry.common.ItemDescription; 3 3 4 4 import mx.collections.ArrayCollection; 5 5 import mx.controls.Alert; … … 22 22 [ArrayElementType("ItemDescription")] 23 23 public var itemDescriptions:ArrayCollection; 24 24 25 25 private var serviceUrl:String; 26 26 27 28 protected var unFilteredItemDescriptions:ArrayCollection; 27 // Not bindable needed for lookups over the whole collections of itemDescriptions 28 protected var unFilteredItemDescriptions:ArrayCollection; 29 29 30 30 31 31 public function BrowserService(restUrl:String) { 32 32 this.serviceUrl = restUrl; 33 33 service = new HTTPService(); 34 34 service.method = HTTPRequestMessage.GET_METHOD; 35 35 service.resultFormat = HTTPService.RESULT_FORMAT_E4X; 36 36 } 37 37 38 38 private function initService():void { 39 service.url = serviceUrl + "?" +new Date().getTime();39 service.url = serviceUrl + "?" + new Date().getTime();// +";JSESSIONID="+Config.instance.sessionId; 40 40 } 41 41 42 42 public function load():void { 43 43 initService(); 44 44 var token:AsyncToken = this.service.send(); 45 45 token.addResponder(new Responder(result, fault)); … … 53 53 54 54 public function fault(faultEvent:FaultEvent):void { 55 var errorMessage:String = StringUtil.substitute("Error in {0}: {1} - {2}", this, faultEvent.fault.faultString, faultEvent.fault.faultDetail);55 var errorMessage:String = StringUtil.substitute("Error in {0}: Message: {1} \n Fault: {2} - {3}", this, faultEvent.message, faultEvent.fault.faultString, faultEvent.fault.faultDetail); 56 56 Alert.show(errorMessage); 57 57 } … … 61 61 unFilteredItemDescriptions = new ArrayCollection(); //create a copy 62 62 for each (var item:Object in items) { 63 unFilteredItemDescriptions.addItem(item); 63 unFilteredItemDescriptions.addItem(item); 64 64 } 65 65 }
Note: See TracChangeset
for help on using the changeset viewer.