part of it depends not only registration of the custom display widget, but also how your rendering the display, ie. if your using formlib, just using a displayformbase should do it, if your using zope.app.form directly you'll might also need to specify that you want to specify IDisplayWidget as the type when rendering, ie. its hard to say without the other piece of this, namely how your rendering the form.

-kapil

On Fri, 24 Nov 2006 13:17:24 -0600, Hassan Alirezaei <[EMAIL PROTECTED]> wrote:

Hello guys,

I have a custom widget and I cannot manage to have a custom way of displaying it after editing. as far as I know, I should be registering the view for form.interfaces.IDisplayWidget(for display) and form.interfaces.IInputWidget(for editing).
I use the following zcml lines:

   <zope:view type="zope.publisher.interfaces.browser.IBrowserRequest"
       provides="zope.app.form.interfaces.IInputWidget"
       for="..interfaces.II18N"
       factory=".widgets.SimpleI18NInputWidget"
       permission="zope.Public" />


   <zope:view type="zope.publisher.interfaces.browser.IBrowserRequest"
       provides="zope.app.form.interfaces.IDisplayWidget"
       for="..interfaces.II18N"
       factory=".widgets.I18NSimpleDisplayWidget"
       permission="zope.Public"  />

not the first statement is applied and I can get my custom-rendered widget at the time of editing or adding an object. but the display of the schema is not changed at all by the second zcml code.

later, I notices that in zope.app.schema package, there are some default Display classes for zope3 default widgets like URI that apparently set the tell zope to display a URI widget inside <a></a> tags but It when I try URI it does not appear like that (it is treated exactly like textline widget...

I am quite confused here... any thing I am missing???
Thanks a lot for any help
Hass
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to