[Zope3-dev] Re: Widget problems? Is there work in progress?
Roger Ineichen
r.ineichen at projekt01.ch
Fri May 28 16:21:46 EDT 2004
The method _toFieldValue confuse me a little bit.
My open questions are:
- The attr convert_missing_value means we
get the self._missing back if we set to True
otherwise we get the unicode(value) back?
Should the if statement not looks like this:
if self.convert_missing_value and self._missing:
----
def _toFieldValue(self, input):
if self.convert_missing_value and input == self._missing:
value = self.context.missing_value
else:
# XXX We convert everything to unicode :-(
# But I see no other way for to convert the
# value at the moment.
try:
value = unicode(input)
except ValueError, v:
raise ConversionError("Invalid integer data", v)
return decode_html(value)
---
- Should we also convert the _missing? Or not, for
to provide None as possible missing value otherwise
we whould get a u'None'?
- What should we decode in the method decode_html?
Is this for unexcepted use of the TextWidget?
Or why should a <input type="text" value=""> tag
contain HTML Code? The TextAreaWidget does.
This means also we can't store unconverted
HTML tags with this widget or at least '<' and '>'.
Mit freundlichen Grüssen
Roger Ineichen
_____________________________
Projekt01 GmbH
www.projekt01.ch
Langackerstrasse 8
6330 Cham
phone +41 (0)41 781 01 78
mobile +41 (0)79 340 52 32
fax +41 (0)41 781 00 78
email r.ineichen at projekt01.ch
_____________________________
END OF MESSAGE
More information about the Zope3-dev
mailing list