<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <display-name></display-name> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>HttpService01</servlet-name> <servlet-class>com.wle.flex.HttpService01</servlet-class> </servlet>
private function faultHandler(event:FaultEvent):void { Alert.show(event.fault.faultString, event.fault.message); }
// Function to filter out all items with gender private function maleFilterFunc(item:Object):Boolean { return item.gender == 1; }
// Function to apply the filter function the ICollectionView. private function filterMale():void { myAC.filterFunction = maleFilterFunc; //Refresh the collection view to apply the filter. myAC.refresh(); }
// Function to filter out all items with gender private function femaleFilterFunc(item:Object):Boolean { return item.gender == 0; }
// Function to apply the filter function the ICollectionView. private function filterFemale():void { myAC.filterFunction = femaleFilterFunc; //Refresh the collection view to apply the filter. myAC.refresh(); }
// Function to Reset the view to its original state. private function resetAC():void { myAC.filterFunction = null; //Refresh the collection view. myAC.refresh(); }
// Event handler function to display the selected button private function filterHandler(event:ItemClickEvent):void { switch(event.currentTarget.selectedValue){ case 1: filterMale(); break; case 0: filterFemale(); break; case 2: resetAC(); break; default: break; }
}
protected function bt1_clickHandler():void { myService.send(); }