Re: Confirmation window with XForms

  <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 Ruíz 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

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