W3C home > Mailing lists > Public > www-forms@w3.org > March 2005

Re: xforms:choose/if?

From: Alexander Anokhin <ava@vaz.ru>
Date: Thu, 31 Mar 2005 09:12:00 +0500
Message-ID: <424B7890.8030300@vaz.ru>
To: avernet@orbeon.com
CC: www-forms@w3.org
Alessandro Vernet wrote:
> Hi Alexander,
> Could you clarify what you mean by "Now i need to do something (toggle
> some switch, send some data somewhere, etc..) depends on received
> number."?
> You can compute the integer with a bind/calculate and store it in the
> instance.

My integer is an sql count(*) operation result from database, for 
example and i can't compute it locally.

  Then if you want to display or hide something in the view based
> on that he can use a bind/relevant. But I am not sure this is what you are
> looking for.

I don't wand to show/hide something (with CSS & bind/relevant) but do 
some action. The wanted feature like in XSLT:

<xforms:action ev:event="DOMActivate">
         <xforms:when test="instance('first_step')//count_result = 0">
             <xforms:send submission="ws_1"/>
         </xforms:when test="instance('first_step')//count_result = 1">
         <xforms:when test="instance('first_step')">
             <xforms:send submission="ws_2"/>
             <xforms:toggle case="case3"/>

  Just let us know, so people on the list can elaborate
> further.

Thanx for answer anyway and sorry for my casual english.

> --- Alexander Anokhin <ava@vaz.ru> wrote:
>>Hi, all...
>>Q: How can i achieve some kind of "choose/if" functionality in XForms?
>>The use case is:
>>1. User input some data and press "Proceed";
>>2. XForms send it to server (with replace="instance");
>>3. The answer is a some integer number;
>>4. Now i need to do something (toggle some switch, send some data 
>>somewhere, etc..) depends on received number.
>>Is it possible?

Alexander Anokhin
email: ava@vaz.ru
icq: 123275798

Received on Thursday, 31 March 2005 04:22:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:14 UTC