W3C home > Mailing lists > Public > public-xformsusers@w3.org > October 2016

toggle on a switch with caseref

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Thu, 20 Oct 2016 15:14:56 +0200
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <op.ypmu26e2smjzpq@steven-aspire-s7>
In the context of

  <switch ref="payment/details" caseref="@method">
   <case name="creditCard" label="Credit Card Details">
   <case name="cash" label="Cash">

if I do

  <setvalue "payment/details@method">cash</setvalue>

then the cash case will be selected.

If I do

  <toggle case="cash"/>

do we agree that @method gets the value "cash" assigned?

The current text is rather opaque:

"If the switch that contains the identified case specifies the caseref  
attribute, then the behavior of this action is associated with the ability  
to successfully perform a setvalue on the node indicated by the caseref.  
If the caseref does not indicate a node or if the node is readonly, then  
this action has no effect. Otherwise, the node value is changed to the  
IDREF value obtained above, which then results in the three toggle steps  
described above."

I intend to rewrite this, once I'm sure we agree on the effect.

Received on Thursday, 20 October 2016 13:15:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:46 UTC