cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Strange code in CForms Binding
Date Fri, 13 Aug 2004 12:37:49 GMT
Fixed (in trunk and 2.1.x)

Thanks
Carsten 

> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain@apache.org] 
> Sent: Friday, August 13, 2004 2:12 PM
> To: dev@cocoon.apache.org
> Subject: Re: Strange code in CForms Binding
> 
> Carsten Ziegeler wrote:
> 
> >While looking through the cforms binding code I found at some places 
> >code like this:
> >
> >if (convertorEl != null) {
> >  String datatype = DomHelper.getAttribute(convertorEl, "datatype");
> >  String localeStr = convertorEl.getAttribute("datatype");
> >  if (!localeStr.equals("")) {
> >    convertorLocale = I18nUtils.parseLocale(localeStr);
> >  }
> >  convertor = 
> assistant.getDatatypeManager().createConvertor(datatype,
> >convertorEl);
> >}
> >
> >Now it seems that a locale informations is read from the 
> datatype, but 
> >as the datatype is not a correct locale information, always 
> the default 
> >locale is used (inside parseLocale()).
> >
> >So, is this a typo?
> >  
> >
> 
> Definitely :-)
> 
> I never used that feature (as it is broken anyway), but it 
> should allow to specify the local to be used to bind typed 
> values to their string representation in a target XML 
> document (e.g. floating point numbers).
> 
> So this should be convertorEl.getAttribute("locale")
> 
> Sylvain
> 
> -- 
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> 


Mime
View raw message