エラー:祖先は「唯一の変数」から除外されているため、「唯一の変数」内でコンポーネントを実現できませんか?

StackOverflow https://stackoverflow.com/questions/6809777

  •  25-10-2019
  •  | 
  •  

質問

以下にコンポーネントがあります。 VGroupコンポーネントには、2つのフォームコンポーネントがあり、1つは「初期」状態に、もう1つは「唯一の変数」状態です。

"Component cannot be realized within state 'onlyVariable' because an ancestor is     
excluded from 'onlyVariable".

誰かがこのエラーの意味を教えてくれますか?

ありがとう

<s:VGroup width="217" height="270" gap="3">

        <s:Form width="334" height="235" includeIn="initial">
            <s:layout>
                <s:FormLayout gap="0" />
            </s:layout>
            <s:FormItem width="137" label="Description:" height="25">
                <s:TextInput id="descTI" width="228" height="23"/>
            </s:FormItem>
            <s:FormItem width="137" label="Name:" height="25">
                <s:TextInput id="nameTI" width="227"/>
            </s:FormItem>
            <s:FormItem width="193" label="ModelType:">
                <s:DropDownList id="modelDDL" width="153"></s:DropDownList>
            </s:FormItem>
            <s:FormItem >
                <s:CheckBox x="-35" y="-32" width="92" id="chkBoxId" label="All variables" click="checkbox_clickHandler(event)"/>
            </s:FormItem>



            <s:FormItem label="Only variable:" includeIn="onlyVariable">

                <datasheet:SparkDataSheet
                    id="geoTableDG"
                    selectionMode="multipleRows"
                    width="226"
                    height="100"
                    dataFactory="{new ClassFactory(XML)}"
                    editable="true"
                    >
                    <datasheet:rendererMap>
                        <datasheet:CellMap>
                            <datasheet:types>
                                <datasheet:TypeMap
                                    type="text">
                                    <datasheet:rendererFactory>
                                        <cells:CellFactory productClass="{DefaultGridItemRenderer}"/>
                                    </datasheet:rendererFactory>
                                    <datasheet:editorFactory>
                                        <cells:CellFactory productClass="{XmlItemEditor}"/>
                                    </datasheet:editorFactory>  
                                </datasheet:TypeMap>
                                <datasheet:TypeMap
                                    type="text">
                                    <datasheet:rendererFactory>
                                        <cells:CellFactory productClass="{DefaultGridItemRenderer}"/>
                                    </datasheet:rendererFactory>
                                    <datasheet:editorFactory>
                                        <cells:CellFactory productClass="{XmlItemEditor}"/>
                                    </datasheet:editorFactory>  
                                </datasheet:TypeMap>
                            </datasheet:types>
                        </datasheet:CellMap>
                    </datasheet:rendererMap>
                    <datasheet:dataDescriptor>
                        <descriptor:ComplexVarDescriptor id="geoTabDescriptor">
                            <descriptor:properties>
                                <descriptor:TextVarDescriptor name="variable" type="text" >
                                    <descriptor:groupOptions>
                                        <descriptor:Option name="headerText" value="{resourceManager.getString('modelChainUI','variable')}"/>
                                    </descriptor:groupOptions>
                                </descriptor:TextVarDescriptor>
                                <descriptor:TextVarDescriptor name="level" type="text" >
                                    <descriptor:groupOptions>
                                        <descriptor:Option name="headerText" value="{resourceManager.getString('modelChainUI','level')}"/>
                                    </descriptor:groupOptions>
                                </descriptor:TextVarDescriptor>
                            </descriptor:properties>
                        </descriptor:ComplexVarDescriptor>
                    </datasheet:dataDescriptor>
                </datasheet:SparkDataSheet>
            </s:FormItem>

        </s:Form>   
    </s:VGroup>
役に立ちましたか?

解決

あなたはそのs:フォーム要素を持っている方法がわかりますか?

<s:Form width="334" height="235" includeIn="initial">

それは、s:formitem要素の祖先(親、祖父母、根本までずっと)の1つです。 s:formitemは、「唯一の変数」状態にのみ含まれるように設定されていますが、祖先は「初期」状態にのみ含まれるように設定されています。これを修正するには、S:Form要素を変更して、初期および唯一の状態の両方に含まれます。

<s:Form width="334" height="235" includeIn="initial,onlyVariable">
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top