Questions on WD 20011207 Targeting id's by a toggle within a repeat

Hi

I have some Questions about WD 20011207  regarding targeting id's by a
toggle within <xforms:repeat> , if we take the following :-

<xforms:model>
<xforms:instance>
    <repeat>
        <switch>
            <value1>value1</value1>
            <value2>value2</value2>
        </switch>
        <switch>
            <value1>value1</value1>
            <value2>value2</value2>
        </switch>
        <switch>
            <value1>value1</value1>
            <value2>value2</value2>
        </switch>
    </repeat>
</xforms:instance>
</xforms:model>

<xforms:repeat ref="repeat">
    <xforms:switch ref="switch">

        <xforms:case id="case1">
            <xforms:input ref="value1"/>
        </xforms:case>

        <xforms:case id="case2">
            <xforms:input ref="value2"/>
        </xforms:case>

    </xforms:switch>

</xforms:repeat>

<xforms:button>
    <xforms:caption>case1</xforms:caption>
    <xforms:toggle case="case1" />
</xforms:button>
<xforms:button>
    <xforms:caption>case2</xforms:caption>
    <xforms:toggle case="case2" />
</xforms:button>

[Q1] how are events targeted at id's handled in a repeat
now with the above I should have 3 input fields all showing value1 initially
, if I click the second button what happens in the repeat , do all 3 switch
to value2 simultaneously or only the currently selected one ?

[Q2] presumably in the case above , all of the instance data is submitted ,
the switch allows us to edit different parts of the instance data at
different times , however if the instance data is not specifically set up
would this still be the case or would just the values of the currently
selected case be submitted ?

[Q3] to follow on from the last question , how is it possible to use a
switch to on the one hand use as a 'paged' UI to allow editing of parts of
the instance data like a 'wizard' and on the other use it to provide
conditional instance data i.e. the instance data returned is only that
contained in the case selected by the switch ?

[Q4] if we have nested repeats , how is the cursor obtained by id ,

<xforms:repeat id="idrep1" ref="repeat1">
    <xforms:group>
    <xforms:repeat id="idrep2" ref="repeat2">
        <xforms:input ref="value1"/>
    </xforms:repeat>
    </xforms:group>
</xforms:repeat>
<xforms:button>
    <xforms:insert nodeset="repeat1" at="cursor('idrep2')"
position="after"/>
</xforms:button>

again is it the currently selected inner repeat that is targeted ? and to
target another UI section of the outer repeat would we have to change the
outer repeats cursor first or is there another way?

Regards and thanks in advance

    Mark.

Received on Tuesday, 11 December 2001 18:19:02 UTC