<?xml version="1.0" encoding="utf-8"?> <s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="331" verticalAlign="middle"> <fx:Metadata> /** * A autocompleted input to allow for selecting a source to add * * @author Mathias Brodala */ /** * Dispatched if a source URL was entered or selected */ [Event("input", type="de.dtele.ui.components.events.SourceInputEvent")] </fx:Metadata> <fx:Script> <![CDATA[ import de.dtele.data.Assets; import de.dtele.ui.components.events.SourceInputEvent; protected function onButtonClick(e:Event):void { var value:String = (selector.selectedIndex > -1 ? selector.selectedItem.data : selector.selectedItem); dispatchEvent(new SourceInputEvent(SourceInputEvent.INPUT, value)); selector.selectedIndex = -1 selector.textInput.text = ""; } ]]> </fx:Script> <s:ComboBox id="selector" prompt="Adresse einer Quelle eingeben" width="65%" paddingTop="7" paddingBottom="7"> <s:ArrayList> <fx:Object label="http://dtm/_brodala/homepage/ringo/" data="http://dtm/_brodala/homepage/ringo/"/> <fx:Object label="http://dtm/_brodala/homepage/ichigo/" data="http://dtm/_brodala/homepage/ichigo/"/> <fx:Object label="http://www.apps-entwickler.de/_brodala/mikan/" data="http://www.apps-entwickler.de/_brodala/mikan/"/> <fx:Object label="ws://dtm:1111/suika" data="ws://dtm:1111/suika"/> </s:ArrayList> </s:ComboBox> <s:Button id="button" height="100%" width="35%" label="Hinzufügen" icon="{Assets.AddImage}" click="onButtonClick(event)"/> </s:HGroup>