Bytes widget.
Single-line data (string) input
>>> from zope.publisher.browser import TestRequest
>>> from zope.schema import BytesLine
>>> field = BytesLine(__name__='foo', title=u'on')
>>> request = TestRequest(form={'field.foo': u'Bob'})
>>> widget = BytesWidget(field, request)
>>> widget.hasInput()
True
>>> widget.getInputValue()
'Bob'
convert_missing_value
(type:
bool)
TruecssClass
(type:
unicode)
u''default
(type:
str)
''displayMaxWidth
(type:
str)
''displayWidth
(type:
int)
20extra
(type:
str)
''style
(type:
str)
''tag
(type:
unicode)
u'input'type
(type:
unicode)
u'text'visible
(type:
bool)
Truehint(...)
label(...)
applyChanges(content)
error()
getInputValue()
hasInput()
See IWidget.hasInput.
Returns True if the submitted request form contains a value for the widget, otherwise returns False.
Some browser widgets may need to implement a more sophisticated test for input. E.g. checkbox values are not supplied in submitted forms when their value is 'off' -- in this case the widget will need to add a hidden element to signal its presence in the form.
hasValidInput()
hidden()
setPrefix(prefix)
setRenderedValue(value)