cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beatejung <beatej...@online.de>
Subject Re: booleanfield and binding
Date Sun, 13 Mar 2005 18:41:28 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message