Can toggle@case or case@selected be calculated?

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 UTC