Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
On 10.05.2004 17:50, Bruno Dumon wrote: I made a little error in my change, it simply needs an "else value = null" added. I'll fix it after the code freeze. Why after? Surely the code freeze is intended to be a time for fixing bugs (but not for committing 'innovations')? Code freeze is for fixing showstopper bugs. The above issue may fall into that category, especially since a user noticed and reported it, and that it was working before. I'll try to fix it one of the next days. I don't want to discuss now what's allowed during code freeze extensively, but IMO it's just a evaluation of benefit and risk of a patch. In this case I guess the risk to break something is very low. Joerg
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
On Sun, 2004-05-09 at 14:20, Upayavira wrote: > Bruno Dumon wrote: > > >On Sun, 2004-05-09 at 12:07, roy huang wrote: > > > > > >>Hi All: > >> If I user xml as data to binding cocoon forms,I must using DateConvertor to > >> convert string to date like: > >> >>path="date" > > >> > >> > >>-MM-dd > >> > >> > >> > >> > >>the data may looks like: > >>1971-05-06 > >> > >>But if the data is it will error like: > >>org.apache.avalon.framework.CascadingRuntimeException: > >>"resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 160: uncaught > >>JavaScript exception: at bindingSample > >>(file:/D:/eclipse/workspace/cocoon-2.1/build/webapp/samples/blocks/forms/flow/bindings.js, > >> Line 73) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line > >>160): java.lang.RuntimeException: Incorrect value type for "date" (expected class > >>java.util.Date, got class java.lang.String. > >> > >>But it works only several days ago,so I check the cvs and believe is Bruno's > >>change in 5.6 makes it. Here's what he said in cvs comments: > >> > >>Made Convertor.convertFromString contract more solid by letting it > >>return a ConversionResult object (instead of null/not-null to indicate > >>successful conversion). This also moves the responsibility > >>of creating the ValidationError to the Convertor, allowing convertors > >>to set more specialised messages in them. > >> > >>What can I do to convert an blank ("") string to Date type? Or this should be > >>considered in the FormattingDateConvert.java?I believe this function is need > >>because date may be blank. > >> > >>WDYT? > >> > >> > > > >I made a little error in my change, it simply needs an "else value = > >null" added. I'll fix it after the code freeze. > > > > > Why after? Surely the code freeze is intended to be a time for fixing > bugs (but not for committing 'innovations')? Code freeze is for fixing showstopper bugs. The above issue may fall into that category, especially since a user noticed and reported it, and that it was working before. I'll try to fix it one of the next days. > Otherwise, this bug will be > enshrined in 2.1.5, which would be a shame. > > Regards, Upayavira -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
Joerg Heinicke wrote: On 09.05.2004 14:20, Upayavira wrote: I made a little error in my change, it simply needs an "else value = null" added. I'll fix it after the code freeze. Why after? Surely the code freeze is intended to be a time for fixing bugs +1 That's what the code freeze is about. Otherwise we wouldn't need it and could release today as it is. +1 ! Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
+1 - Original Message - From: "Joerg Heinicke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 09, 2004 9:05 PM Subject: Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version. > On 09.05.2004 14:20, Upayavira wrote: > > >> I made a little error in my change, it simply needs an "else value = > >> null" added. I'll fix it after the code freeze. > >> > > Why after? Surely the code freeze is intended to be a time for fixing > > bugs > > +1 That's what the code freeze is about. Otherwise we wouldn't need it > and could release today as it is. > > Joerg >
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
On 09.05.2004 14:20, Upayavira wrote: I made a little error in my change, it simply needs an "else value = null" added. I'll fix it after the code freeze. Why after? Surely the code freeze is intended to be a time for fixing bugs +1 That's what the code freeze is about. Otherwise we wouldn't need it and could release today as it is. Joerg
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
Bruno Dumon wrote: On Sun, 2004-05-09 at 12:07, roy huang wrote: Hi All: If I user xml as data to binding cocoon forms,I must using DateConvertor to convert string to date like: -MM-dd the data may looks like: 1971-05-06 But if the data is it will error like: org.apache.avalon.framework.CascadingRuntimeException: "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 160: uncaught JavaScript exception: at bindingSample (file:/D:/eclipse/workspace/cocoon-2.1/build/webapp/samples/blocks/forms/flow/bindings.js, Line 73) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 160): java.lang.RuntimeException: Incorrect value type for "date" (expected class java.util.Date, got class java.lang.String. But it works only several days ago,so I check the cvs and believe is Bruno's change in 5.6 makes it. Here's what he said in cvs comments: Made Convertor.convertFromString contract more solid by letting it return a ConversionResult object (instead of null/not-null to indicate successful conversion). This also moves the responsibility of creating the ValidationError to the Convertor, allowing convertors to set more specialised messages in them. What can I do to convert an blank ("") string to Date type? Or this should be considered in the FormattingDateConvert.java?I believe this function is need because date may be blank. WDYT? I made a little error in my change, it simply needs an "else value = null" added. I'll fix it after the code freeze. Why after? Surely the code freeze is intended to be a time for fixing bugs (but not for committing 'innovations')? Otherwise, this bug will be enshrined in 2.1.5, which would be a shame. Regards, Upayavira
Re: [CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
On Sun, 2004-05-09 at 12:07, roy huang wrote: > Hi All: > If I user xml as data to binding cocoon forms,I must using DateConvertor to > convert string to date like: >path="date" > > > > -MM-dd > > > > > the data may looks like: > 1971-05-06 > > But if the data is it will error like: > org.apache.avalon.framework.CascadingRuntimeException: > "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 160: uncaught > JavaScript exception: at bindingSample > (file:/D:/eclipse/workspace/cocoon-2.1/build/webapp/samples/blocks/forms/flow/bindings.js, > Line 73) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 160): > java.lang.RuntimeException: Incorrect value type for "date" (expected class > java.util.Date, got class java.lang.String. > > But it works only several days ago,so I check the cvs and believe is Bruno's change > in 5.6 makes it. Here's what he said in cvs comments: > > Made Convertor.convertFromString contract more solid by letting it > return a ConversionResult object (instead of null/not-null to indicate > successful conversion). This also moves the responsibility > of creating the ValidationError to the Convertor, allowing convertors > to set more specialised messages in them. > > What can I do to convert an blank ("") string to Date type? Or this should be > considered in the FormattingDateConvert.java?I believe this function is need because > date may be blank. > > WDYT? I made a little error in my change, it simply needs an "else value = null" added. I'll fix it after the code freeze. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED]
[CForms]FormattingDateConvertor can't convert blank to date in current cvs version.
Hi All: If I user xml as data to binding cocoon forms,I must using DateConvertor to convert string to date like: -MM-dd the data may looks like: 1971-05-06 But if the data is it will error like: org.apache.avalon.framework.CascadingRuntimeException: "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 160: uncaught JavaScript exception: at bindingSample (file:/D:/eclipse/workspace/cocoon-2.1/build/webapp/samples/blocks/forms/flow/bindings.js, Line 73) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 160): java.lang.RuntimeException: Incorrect value type for "date" (expected class java.util.Date, got class java.lang.String. But it works only several days ago,so I check the cvs and believe is Bruno's change in 5.6 makes it. Here's what he said in cvs comments: Made Convertor.convertFromString contract more solid by letting it return a ConversionResult object (instead of null/not-null to indicate successful conversion). This also moves the responsibility of creating the ValidationError to the Convertor, allowing convertors to set more specialised messages in them. What can I do to convert an blank ("") string to Date type? Or this should be considered in the FormattingDateConvert.java?I believe this function is need because date may be blank. WDYT? Roy Huang