Re: toggle on a switch with caseref

Hello Steven,

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

That’s both logical and consistent.


Philip



On 20/10/2016 14:14, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:

    In the context of
    
      <switch ref="payment/details" caseref="@method">
       <case name="creditCard" label="Credit Card Details">
         ...
       </case>
       <case name="cash" label="Cash">
         ...
       </case>
       ...
      </switch>
    
    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.
    
    Steven
    
    

Received on Friday, 21 October 2016 07:24:38 UTC