You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michel Erard <er...@hta-bi.bfh.ch> on 2005/05/25 10:17:56 UTC
date convertor in binding
Hello,
I've the problem that the convertor in my binding only works in one
direction (Object --> Form). When I save back the input from my form
into the object, the Date is passed as String like 01.01.2005 and not as
Date Object.
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
path="." >
<fb:struct id='section1' path=".">
<fb:value id="00001" path="questions[@name='00001']/response"/>
<fb:value id="00002" path="questions[@name='00002']/response"/>
<fb:value id="00003" path="questions[@name='00003']/response">
<fd:convertor datatype="date">
<fd:patterns>
<fd:pattern>dd.MM.yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fb:value>
</fb:struct>
<fb:struct id="section2" path=".">
<fb:value id="00004" path="questions[@name='00004']/response"/>
<fb:value id="00005" path="questions[@name='00005']/response"/>
</fb:struct>
</fb:context>
The field response is type of Object. But this cannot be the misstake,
because in the other direction it's working fine.
Does someone has a solution?
Regards,
Mike