hi claus,

Am Sonntag, 13. MÃrz 2005 12:50 schrieb Claus Straube:
> Hello,
>
> IÂve 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"/>

i think you should use a convertor here:

                        <fb:value id="upi" path="upi">
                          <fd:convertor datatype="boolean" >
                                </fd:convertor>
                        </fb:value>

just to define a booleanfield does not seem enough.

>             <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.
>
> IÂve created those values by a form, got them via binding into a xml
> document, but if IÂll 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

hope this helps
beate

-- 
þíþí

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to