> do you want the widget to display the value and then
> pass the original value back in?  If so, you could just use an
> EditWidget in its disabled / read-only mode.

Yes, right. I want to display value and pass the value to next page.
So, my use case is to display value from request.

My zpt code is
<span replace="structure widget"></span>
<span replace="structure widget/hidden"></span>

And I expect the following html, but if I use IText or ITextLine,
the result is difference.

<input type="hidden" value="Zope">

Some display widgets can render a hidden input tag by hidden() method
(For example, a widget for IChoice), but DisplayWidget cannot.

And another problem is about to display value from request.
Some display widgets can get value from request by _toFieldValue(),
then we only call __call__ method for display value.
but DisplayWidget cannot get value by itself. We always need to get
value from request explicitly and pass the value to setRenderedValue

These difference between widgets are obscure to me(and probably most
beginners).I think widgets for frequently used fields should be same

Thank you,
Tahara Yusei
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to