RE: [Zope] ZClass propertysheet: Selection/Multi selection/Token - how?
On Sat, 16 Oct 1999, Stuart 'Zen' Bishop wrote:
On Sat, 16 Oct 1999, Ian Blenke wrote:
Perhaps the real question is "how do I efficiently manage lists of options for forms without resorting to SQL?"
I use a 'lines' property to store the possible settings (myitemvalues) and create a selection property which gets its values from myitemvalues. This is a simple method, provided you only need to store a list of items rather than a list of tuples (in which case you would be better off with TinyTables).
What do you tie the 'lines' property to? The product? Or to another property in a propertysheet within the ZClass? The dtml-return hack doesn't work for the ZClass_addForm method (the object isn't instanciated yet). The next attempt is to try and use properties of the Product. Hopefully the namespace of the Product is available at _addForm time. Understanding the Zope Zen takes a bit of patience :) - Ian C. Blenke <ian@blenke.com> <icblenke@2c2.com>
On Sat, 16 Oct 1999, Ian Blenke wrote:
I use a 'lines' property to store the possible settings (myitemvalues) and create a selection property which gets its values from myitemvalues. This is a simple method, provided you only need to store a list of items rather than a list of tuples (in which case you would be better off with TinyTables).
What do you tie the 'lines' property to? The product? Or to another property in a propertysheet within the ZClass?
The dtml-return hack doesn't work for the ZClass_addForm method (the object isn't instanciated yet).
The next attempt is to try and use properties of the Product. Hopefully the namespace of the Product is available at _addForm time.
Yes - if you need to access this list in the _addForm method, you wil need to reference it as Control_Panel.Products.MyProduct.MyClass.propertysheets.myprops.mylinesitem (Or possibly just MyClass.propertysheets.myprops.mylinesitem) ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (2)
-
Ian Blenke -
Stuart 'Zen' Bishop