Apache OpenOffice (AOO) Bugzilla – Issue 36605
[CWS eforms2] "Read Only" setting of an binding not properly propagated to the control
Last modified: 2013-08-07 14:41:36 UTC
open the attached bug doc It contains two text controls, bound to an XML element resp. one of its attributes (address and address/@city). Additionally, it contains a checkbox, which is bound to control/@readonly, a boolean attribute of another element. Additionally, the "Readonly" property of the address binding is set to "/instanceData/control/@readOnly". You can see this when editing the binding properties in the data navigator, or when opening the property browser for the "address" text field on the "Data" tab page. So, as a result, you would expect that the "address" text field is readonly if and only if the check box is checked, while the "address/@city" text field is never readonly. Switch off the design mode. Try to enter text in either of the two controls => this doesn't work. Obviously both controls are readonly. This does not depend on the check box state at all - no matter whether it's checked or not, both controls are readonly all the time.
Created attachment 18884 [details] document to reproduce the bug case
dvo: Two problems: 1) XAttribute::setNodeValue doesn't notify any changes, and therefore the XForms model doesn't get any notice that something has changed. I have a patch for this, but can't currently commit due to the ongoing resync. 2) According to the XForms/XPath standard, the expression evaluations to a node-set. A node-set interpreted as a boolean is true if (and only if) the node-set it not empty. In other words, the given expression tests whether the attribute is present (which it always is), and not whether its string value is 'true'. To do so, use the boolean-from-string(..) function defined in XPath. Probably surprising, but unfortunately true.
dvo->mbu: Please have a look at this.
issue resolved,added MIP propagation to /forms/xforms/binding.cxx - distributeMIP(). note that the bugdoc itself does not work as expected because the binding-expression for the readonly-condition should read 'boolean-from-string(/instanceData/control/@readonly)'. see http://www.w3.org/TR/2002/WD-xforms-20020118/slice7.html for further informations.
Created attachment 20771 [details] document to reproduce the bug case
I attached a new (XForms conformant) document to ease verification of the fix
Created attachment 21749 [details] changed mime-type of test document
reopen to assign to QA
please verify.
set to state 'resolved/fixed'
verified in cws eforms4
Hi, fixed in current developer build -> close. The current developer build can be found at http://download.openoffice.org/680/index.html Feel free to reopen if this issue is not fixed in the developer build. Bye Marc