Nested fr:databound-switch Problem in 4.0.0M2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Nested fr:databound-switch Problem in 4.0.0M2

JeffL
The snippet below fails with a duplicate id OPTION_1

Is this because nested databound switches are not supported?

Or, is my scripting incorrect.

Any thoughts

Regards

Jeff

<fr:databound-switch ref="instance('modelx')/listType">
    <xf:case id="standardList"></xf:case>
    <xf:case id="TYPE_1">                                               
        <div>
            <xf:select1 ref="instance('modelx')/option" appearance="full" incremental="false">
                <xf:choices>
                    <xf:item>
                        <xf:label>Option 1</xf:label>
                        <xf:value>OPTION_1</xf:value>
                    </xf:item>
                    <xf:item>
                        <xf:label>Option 2</xf:label>
                        <xf:value>OPTION_2</xf:value>
                    </xf:item>
                </xf:choices>
       </xf:select1>
                                                               
            <fr:databound-switch ref="instance('modelx')/option">
                <xf:case id="OPTION_1">
                    <div>
                        <xf:output value="concat(instance('person')/fname,' ',instance('person')/lastname)" />
                    </div>
                </xf:case>
                <xf:case id="OPTION_2">
                    <div>
                    </div>
                </xf:case>
            </fr:databound-switch>                                                               
        </div>
    </xf:case>
</fr:databound-switch>
Reply | Threaded
Open this post in threaded view
|

Re: Nested fr:databound-switch Problem in 4.0.0M2

JeffL
Sorry, I have found the problem, it was self inflicted. An id="" must be added to each element. Without this, the control generates the same id. Regards jeff