[Zope] Product/ZClass/??? Problem
Simon
swithers@as2.dm.egate.net
Mon, 12 May 2003 22:07:15 -0400 (EDT)
I am trying to create a ToolBar widget product that can be included
in both pages, and other products. The ToolBar has some html associated
with it, and html associated with the buttons that appear on it. The
actual buttons are chosen when the ToolBar is instanciated.
What I have created looks like this:
ToolBar
ToolBar (ZClass inheriting from ZObjectManager)
index_html (providing the client side script/styles for the buttons)
ToolBar_Button ZClass
ToolBar_Button_Property property sheet definingparams for buttons
index_html (to display a button)
ToolBar_add_Button (DTML Method form to create buttons)
I can create an instance of ToolBar and add some buttons to it and
everything looks fine, when I try to view it I see what I expect, however
when I try to reference the toolbar from another element ie: if I have a
ToolBar tools and I write <dtml-var tools> I get <ToolBar at tools> in the
output.
Furthermore, I would like to be able to create products that have their
own toolbars, say:
AggregateWidget
AggregateWidget (ZClass)
index_html (to disply it's self)
AgWToolBar (Instance of ToolBar with a defined set of ToolBar_Buttons)
and then in the index_html, if I try to access AgWToolBar with something
like <dtml-var AgWToolBar>, when I create an instance of AggreateWidget
and then view it, I get and error:
Error Type: Unauthorized
Error Value: You are not allowed to access AgWToolBar in this context
If how to solve my problems can be explained that would be great, if I am
out to lunch on my approach to tackling this problem, I would definatly
appreciate pointers in the right direction.
This is mostly an excercise in teaching myself how to use Zope, so really
any advice or suggestion is great.
Simon Withers