Re: Switch inside a repeat in XForms 1.1 [was switch & repeat controls]

Hi Erik,

what do you mean by an instance node, which has "a repeat iteration with 
switch associated with it ".

Note that:

a) an instance node can be used in multiple repeats simultaneously
b) the xforms 1.1 version of insert allows copying nodes from anywhere 
in the instance data
c) you can always use model-based switching if you want to keep the 
state of the switches in the model. Use relevant MIP or <group 
ref="@attr='testvalue'"/>, which will be hidden if @attr!="testvalue".

-mikko

Erik Bruchez wrote:
>
> 1. What happens upon deletion, insertion or cloning of nodes in a
>    node-set addressed by an xforms:repeat with regard to the enclosed
>    switches?
>
>    I would expect the state of the switches to somehow stay associated
>    with the nodes the enclosing repeats are bound to, so that
>    visually, if a user deletes a row in a table, then the switches
>    update correctly.
>
>    Same thing upon insertion, and here I see two case:
>
>    o The insertion duplicates a node that does not have a repeat
>      iteration with switch associated with it (e.g. by using
>      xforms:insert/@origin. In this case, I expect the state of the
>      new switch to be the default state.
>
>    o The insertion duplicates one of the nodes that current has a
>      repeat iteration associated with it and an associated switch
>      (typical way xforms:insert works by cloning the last element of
>      the node-set). In this case, I would expect the state of the
>      switch to be the same as that of the switch associated with the
>      origin node.
>
>    Note that this is what we implement in OPS right now.
>

Received on Friday, 2 June 2006 15:19:17 UTC