You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Claus Straube <cl...@xdoo.de> on 2005/03/13 12:50:35 UTC
booleanfield and binding
Hello,
Ive got a source file that looks like this:
<catalog_rules>
<catalog>UniqueProductID</catalog>
<upi>true</upi>
<price/>
<pvd>false</pvd>
<price/>
<psc>false</psc>
</catalog_rules>
I want to bind the Boolean values back to a form (I created them with the
same form). The binding file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" path="/" >
<fb:context path="catalog_rules">
<fb:value id="upi" path="upi"/>
<fb:value id="pvd" path="pvd"/>
<fb:value id="psc" path="psc"/>
</fb:context>
</fb:context>
But if I try the get the booleans out of the file, this error message
occurs: Cannot set value of boolean field "upi" to a non-Boolean value.
Ive created those values by a form, got them via binding into a xml
document, but if Ill try to get the same values back to the form, they are
suddenly not Boolean anymore? How can I get them back?
The Form definition looks like this:
<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
<fd:widgets>
<fd:booleanfield id="upi">
<fd:label>Bla:</fd:label>
</fd:booleanfield>
<fd:booleanfield id="pvd">
<fd:label>Bla:</fd:label>
</fd:booleanfield>
<fd:booleanfield id="psc">
<fd:label>Bla:</fd:label>
</fd:booleanfield>
</fd:widgets>
</fd:form>
Thank you and best regards - Claus
__________________________________________
Claus Straube
Francéstrasse 31
80997 München
+49 (089) 14 16 682