Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
- {
- // clears the filter box in case its filtering the view
- filterTxt.text = "";
- scontroller = ApplicationStore.services["syscontroller"];
- var tracker:AnalyticsTracker = ApplicationStore.services["tracker"];
- if (! scontroller){
- scontroller = new SystemsController();
- ApplicationStore.services["syscontroller"] = scontroller;
- }
- this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
- scontroller.addEventListener(CollectionEvent.COLLECTION_CHANGE, onCollectionChange);
- if (scontroller.hosts.length < 1){
- scontroller.refreshhosts();
- tracker.trackPageview("/Systems");
- }
- else if (scontroller.hosts.length > 0){
- onCollectionChange(null);
- trace("hosts array already exists");
- }
- //tracker.trackEvent("Usage Stats", "Systems", "Number of hosts", scontroller.hosts.length);
- //this is needed to make sure all the hosts appear after setting the search field blank
- scontroller.hosts.refresh();
- // lets go ahead and get this information and cache it
- var classcontroller:ClassController;
- if (ApplicationStore.services["classcontroller"]){
- classcontroller = ApplicationStore.services["classcontroller"];
- }
- else{
- classcontroller = new ClassController();
- ApplicationStore.services["classcontroller"] = classcontroller;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement