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

disabled controls bindset failure

From: e-letter <inpost@gmail.com>
Date: Tue, 31 Aug 2010 09:23:06 +0100
Message-ID: <AANLkTinEEhWvM-k5aNYsOsA5VOo7x4NgvZWOvEUbGdjQ@mail.gmail.com>
To: www-forms@w3.org
Readers,

According to the document 'xforms for authors part 1', it is possible
to disable control elements depending on values selected by the user.
I have tried the following:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'
xmlns:xf='http://www.w3.org/2002/xforms'>
        <head>
                <meta http-equiv='content-type' content='text/html;
charset=UTF-8' />
                <style type='text/css' id='internalstylesheet'>
                        code {text-color:black; background:white;
font-family:verdana, sans-serif}
                </style>
                <xf:model>
                        <xf:instance>
                                <generalinformation xmlns=''>
                                        <purpose />
                                        <stage />
                                </generalinformation>
                        </xf:instance>
                                <bind nodeset='stage'
relevant='../purpose="ewbrl"' />
                                <bind nodeset='stage'
relevant='../purpose="nibrf"' />
                        <xf:submission
                                resource='file:testsubmit.xml'
                                method='put'
                                id='gi'
                        />
                </xf:model>
                <title>
                </title>
        </head>
        <body>
                <p>
                        <xf:select1 appearance='minimal' ref='purpose'>
                                <xf:label>purpose of analysis
                                </xf:label>
                                <xf:item>
                                        <xf:label>
                                                England and Wales
Building Regulations part L
                                        </xf:label>
                                        <xf:value>ewbrl
                                        </xf:value>
                                </xf:item>
                                <xf:item>
                                        <xf:label>
                                                Scottish Building Regulations
                                        </xf:label>
                                        <xf:value>
                                                sbr
                                        </xf:value>
                                </xf:item>
                                <xf:item>
                                        <xf:label>
                                                Northern Ireland
Building Regulations part F
                                        </xf:label>
                                        <xf:value>
                                                nibrf
                                        </xf:value>
                                </xf:item>
                        </xf:select1>
                </p>
                <p>
                        <xf:select1 appearance='minimal' ref='stage'>
                                <!--should be disabled for purpose value sbr
                                -->
                                <xf:label>
                                        Stage of analysis
                                </xf:label>
                                <xf:item>
                                        <xf:label>
                                                As built
                                        </xf:label>
                                        <xf:value>
                                                asbuilt
                                        </xf:value>
                                </xf:item>
                                <xf:item>
                                        <xf:label>
                                                As designed
                                        </xf:label>
                                        <xf:value>
                                                asdesigned
                                        </xf:value>
                                </xf:item>
                        </xf:select1>
                </p>
                <xf:submit submission='gi'>
                <xf:label>
                Save
                </xf:label>
                </xf:submit>
        </body>
</html>

The required behaviour is that when the user selects 'scottish...',
the subsequent list menu should be greyed out, but in the browser
(firefox 20020, xforms 86ff2), the list menu 'stage of analysis'
continues to be visible. This form does not work with firefox 368,
xforms 87. Any help please?
Received on Tuesday, 31 August 2010 08:23:38 GMT

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