W3C home > Mailing lists > Public > www-forms@w3.org > August 2006

Can toggle@case or case@selected be calculated?

From: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
Date: Thu, 10 Aug 2006 12:19:17 +0100
Message-ID: <595299DD7F30014BBCE48B93DCB6065204697670@EXCHAQ2.nhsia.nhs.uk>
To: <www-forms@w3.org>

Dear All,

I am trying to switch a form between being made up of a group of output
elements & a group of input elements, dependant upoon a value contained
in an instance which says if the data is readonly or not. The Value is
carried in an element called OID_key & if it is 0 then it is readonly &
if 1 then it is read/write.

Basically what I want to say is "If OID_key = 0 then use the NoEdit Case
& thus group of controls & if 1 then use the Edit case/group of
controls"


I have tried using a calculated value for both toggle@case and
case@selected to no effect. See below for the 2 examples where the
commented out part is the attempt at getting a calculated value.


<xforms:toggle ev:event="xforms-ready" case="Edit"/>
<!--<xforms:toggle ev:event="xforms-ready" case="if(OID_key =
0,NoEdit,Edit)"/>  -->


<xforms:switch>
<xforms:case id="Edit" selected="true">
<!-- <xforms:case id="Edit" selected="if(OID_key = 0,false(),true())">
-->


Given I wish to keep the instance & simply display the information
differently, the "relevant=" model switching is not of use so.....if
there any way I can get an Xpath/function based value into either
toggle@case or case@selected?

Adam
  


This e-mail is confidential and privileged. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation.
Received on Thursday, 10 August 2006 11:19:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:06 GMT