[prev in list] [next in list] [prev in thread] [next in thread]
List: zope
Subject: [Zope] Five EditFrom and Fields appears broken
From: Jim Pharis <binbrain () gmail ! com>
Date: 2010-01-08 16:08:15
Message-ID: 77f231801001080808q4f07ab8bp40900740ccb6319f () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Does anyone successfully use zope.formlib.form Fields with
Products.Five.formlib.formbase EditForm? I was trying to figure out why my
form_fields.omit and custom_widget were being ignored. I followed it up the
stack and found the method setUpEditWidgets in zope.app.form.utility never
takes Fields into account and just looks at the schema and context to
determine the fields. So I was starting to think maybe you don't use Fields
with Five forms, but there is a unit test in Products.Five.formlib.tests
view.py that actually thinks its using Fields. I don't think this is
actually the case though, the test just doesn't touch omit or custom_widget
functionality so it passes thinking Fields is working.
The /Products/Five/form/__init__.py imports zope.app.form.utility
setUpEditWidgets. zope.formlib has a different setUpEditWidgets method in
zope/formlib/form.py that actually takes form_fields as the 1st param.
So in summary, if you think your using Fields in Five try using omit or
custom_widget and see if it works and you actually are really using Fields.
If it works maybe I have something messed up on my end.
TIA
- Jim
[Attachment #5 (text/html)]
Does anyone successfully use zope.formlib.form Fields with Products.Five.fo=
rmlib.formbase EditForm? I was trying to figure out why my form_fields.omit=
and custom_widget were being ignored. I followed it up the stack and found=
the method setUpEditWidgets in zope.app.form.utility never takes Fields in=
to account and just looks at the schema and context to determine the fields=
. So I was starting to think maybe you don't use Fields with Five forms=
, but there is a unit test in Products.Five.formlib.tests view.py that actu=
ally thinks its using Fields. I don't think this is actually the case t=
hough, the test just doesn't touch omit or custom_widget functionality =
so it passes thinking Fields is working.<br>
<br>The /Products/Five/form/__init__.py imports zope.app.form.utility setUp=
EditWidgets.=A0 zope.formlib has a different setUpEditWidgets method in zop=
e/formlib/form.py that actually takes form_fields as the 1st param.<br><br>
So in summary, if you think your using Fields in Five try using omit or cus=
tom_widget and see if it works and you actually are really using Fields. If=
it works maybe I have something messed up on my end.<br><br>TIA<br>- Jim<b=
r>
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic