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

Re: Confirmation window with XForms

From: Rafael Benito <rbenito@satec.es>
Date: Mon, 3 Oct 2005 15:55:38 +0200
To: <www-forms@w3.org>
Message-ID: <E1EMQn8-0003ts-2y@maggie.w3.org>
  <http://www.satec.es/plant_correo/img/Logo_sistemas.gif> 	

Hi,

since nobody contributed :-( , let me show you what I am working out:

<model id="my_test">

    <instance id="popup_flag">

        <root>

            <popup_flag>

                closed

            </popup_flag>

        </root>

    </instance>

    <instance id="input">

        <root>

            <user_input>

            </user_input>

        </root>

    </instance>

    <bind id="open_window" nodeset="instance('popup_flag')/popup_flag"
relevant="instance('popup_flag')/popup_flag='open'"/>

</model>

<group id="confirm_window" bind="open_window" appearance="popup_window">

    <label>Please, confirm the value entered</label>

    <trigger>

        <label>Accept</label>

        <action ev:event="DOMActivate">

            <setvalue ref="instance('popup_flag')/popup_flag"
value="closed"/>

        </action>

    </trigger>

    <trigger>

        <label>Cancel</label>

            <action ev:event="DOMActivate">

                <setvalue ref="instance('input')/user_input" value=""/>

                <setvalue ref="instance('popup_flag')/popup_flag"
value="closed"/>

            </action>

    </trigger>

</group>

<group id="input_test">

    <input ref="instance('input')/user_input">

        <label>Input to check confirm</label>

        <setvalue ev:event="xforms-value-changed"
ref="instance('popup_flag')/popup_flag" value="open"/>

    </input>

 </group>

 

I am assuming that appearance="popup_window" is interpreted by a processor
appropriately. The rest consist in making relevent the group when the user
fills out the input, and making it irrelevant when any of the triggers is
activated. The value entered by the user is kept unchanged if "Accept" is
activated and changed to empty when the user activates "Cancel".

Is this OK?

Kind regards,

Rafael Benito Ruz de Villa
e-business Manager
Mobile (+34) 617 314 293
rbenito@satec.es

http://www.datamovil.info

MADRID <http://www.satec.es> 
Avda. Europa, 34 A
28023 Aravaca
Telf.: (+34) 91 708 90 00 / 91 211 03 00
Fax: (+34) 91 708 90 90 / 91 211 03 90





Logo_sistemas.gif
(image/gif attachment: Logo_sistemas.gif)

logosatecwww2.gif
(image/gif attachment: logosatecwww2.gif)

Received on Monday, 3 October 2005 13:55:51 GMT

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