[Zope] Problem with adding items to ZClass instance (semi-solved)

Ron Bickers rbickers@logicetc.com
Tue, 20 Jun 2000 23:16:49 -0400


Thanks a lot for your help on this weird one!

Now that I know what to look into, I'll do that.

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Rik
> Hoekstra
> Sent: Tuesday, June 20, 2000 4:53 AM
> To: Ron Bickers
> Cc: zope@zope.org
> Subject: Re: [Zope] Problem with adding items to ZClass instance

> OK, I downloaded it and I think I found your problem (not wure how to
> remediate this, though). If you look in the source of the management
> screen
> http://localhost/<somefolder>/<IssueTrackerInstance>/manage_main, the
> dropdown list for adding Product looks like this:
> 
>   <FORM ACTION="http://localhost/<somefolder>/<IssueTrackerInstance>/"
> METHOD="GET">
>   <SELECT NAME=":method"
> ONCHANGE="location.href='http://localhost/testhier/blup/'+this.opt
> ions[this.selectedIndex].value">
>     <OPTION value="manage_workspace" DISABLED>Available Objects
>       <OPTION value="manage_addProduct/OFSP/documentAdd">DTML Document
>       <OPTION value="manage_addProduct/OFSP/methodAdd">DTML Method
>       <OPTION value="manage_addProduct/MailHost/addMailHost_form">Mail
> Host
>       <OPTION value="manage_addTinyTableForm">TinyTable
>       <OPTION value="manage_addProduct/OFSP/manage_addUserFolder">User
> Folder
>       <OPTION value="manage_addZMySQLConnectionForm">Z MySQL Database
> Connection
>     </SELECT>
>   <INPUT TYPE="SUBMIT" VALUE=" Add ">
>   </FORM>
> 
> As you see, most of the items have a manage_addProducts/.... as a start.
> Not so with TinyTables and MySQLConnection. They call the
> add_TinyTableForm and manage_addZMySQLConnection form. They do not
> switch the namespace to manage_addProduct (not in the form). Why this is
> a problem, I can't tell, but this _is_ the problem.
> 
> I'm not quite sure about the solution. Probably it's best to make a
> custom manage_main form that does the right incantations for adding
> products and then map this to your Contents View in the ZCLass
> definition.
> 
> As a side I'd like to remark that all products should comply with the
> same manage_addProduct interface, because the current situation leads to
> nasty problems.
> 
> Rik