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 }