[Zope-dev] broken selection property support in z2.2
Scott Parish
sRp@srparish.net
Tue, 27 Jun 2000 14:48:50 +0000
--WoqaC9TUMqqIOlla
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
OIC, thanks for the clerification on that.
sRp
Thus spake Brian Lloyd (Brian@digicool.com):
> > I tried creating a zclass that had a property sheet with a=20
> > selection type,
> > which i had reference a property of a given name. I then went to the=
=20
> > root folder in zope and created that property as a lines type. When
> > i created an instance of my zclass though, it said "no value=20
> > for given_name".
> > To fix this i changed the OFS/properties.dtml file to use the=20
> > same syntax
> > as the properties.dtml in z2.1:
> >=20
> > <dtml-elif "type=3D=3D'selection'">
> > <dtml-if "_.has_key(select_variable)">
> > <select name=3D"<dtml-var id>">
> > <dtml-in "_[select_variable]">
> >=20
> > It used to use hasProperty and getProperty methods. I'm not=20
> > entirely sure
> > why they were used, or what they are suppose to do differently, but it
> > doesn't seem to work.
>=20
> Scott,
>=20
> The 'selection' and 'multiple selection' properties are=20
> really built with the idea that you use another property=20
> *of the same object* (rather than an acquired value) to=20
> bind the selection to. Your change works for your case,=20
> but if you try to bind to another property of the same=20
> ZClass you'll find that in your management screens that=20
> your selection property will fail (because it is looking=20
> in '_' for the value, which is the wrong place to look=20
> if you are expecting to find the value as another property=20
> of the same object.
>=20
> Brian Lloyd brian@digicool.com
> Software Engineer 540.371.6909 =20
> Digital Creations http://www.digicool.com=20
>=20
>=20
--=20
Scott Parish
http://srparish.net
--WoqaC9TUMqqIOlla
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (OpenBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE5WL7RQIKxCnswXL0RAdJ4AJ0VZ4nOkRzHGnKWHOo9yrErrBPlcQCgwpiM
zQoT0QOCkntQHNHntry5csI=
=8t+e
-----END PGP SIGNATURE-----
--WoqaC9TUMqqIOlla--