Hallo ich wollte fragen wie man am besten eine IF-Anweisung schreibt, um zu überprüfen ob der Name in der Tabelle vorhanden ist, bevor es über ein popup in eine Liste eingetragen(editiert) wird.

hier mein bisheriger Versuch

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<mx:Script>
        <![CDATA[
            import com.crossmedia_solutions.mamBackendConfig.vo.ConversionTypesTypeVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.ConversionTypesVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.FileConversionSettingsVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.MAMBackendConfigVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.SetupDefinitionVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.SetupVO;
            import com.crossmedia_solutions.mamBackendConfig.vo.TypeVO;
            
            import mx.controls.Alert;
            import mx.managers.PopUpManager;
            
            import views.ConversionTypesView;
            
            [Bindable]public var setupVO:SetupVO;
            [Bindable]public var conversiontypestypeVO:ConversionTypesTypeVO;
            
            private function close():void {
                PopUpManager.removePopUp(this);
            }
            
            
            
            protected function edit_clickHandler(event:MouseEvent):void
            {
                for each (var i:int in array) 
                {
                    if(setupVO.nameValue != conversiontypestypeVO.value){
                        Alert.show("Der Name ist nicht vorhanden.");
                        return;
                    }
                }
                    
                setupVO.nameValue = nameCol.text;
                setupVO.availableVO.value = (avaibleCol.selected)?"true":null;
                setupVO.descriptionVO.value = descriptionCol.text;
                setupVO.templateVO.value = templateCol.text;
                setupVO.typeVO.value = typeCol.text;
                setupVO.setupDefinitionVO.locationFilesystemVO.value = (location_filesystemCol.selected)?"true":null;
                setupVO.setupDefinitionVO.mimetypeFallbackVO.value = (mimetype_fallbackCol.selected)?"true":null;
                setupVO.setupDefinitionVO.databinaryMimetypeVO.value = databinary_mimetypeCol.text;
                setupVO.setupDefinitionVO.fileExtensionVO.value = file_extensionnCol.text;
                setupVO.setupDefinitionVO.databinaryCachecontrolVO.value = databinary_cachcontrolCol.text;
                
                close();
                
            }
            
        ]]>
    </mx:Script>

Falls jemand das gesamte Projekt braucht um mehr Überblick zu haben hier:

http://www.fileuploadx.de/600813

Danke im Vorraus

Gruß

Max