[Zope-Moz] ANNOUNCE: Zope management tree in Mozilla

Martijn Pieters mj@digicool.com
Tue, 11 Jan 2000 12:31:18 -0500


> -----Original Message-----
> From: Shalabh Chaturvedi [mailto:shalabh@pspl.co.in]
> > > Yes, but when the contents.rdf for the contents of a folder
> > > is not loaded up,
> > > Mozilla doesn't know if the folder is empty or not.
> > > So, no twisters are shown initially. You have to expand a
> > > tree item 'A' (this
> > > would load up the contents.rdf with the contents of A), then
> > > collapse the
> > > parent treeitem of 'A' and reexpand it to see the twisty 
> next to 'A'.
> >
> > Very good point! Did not think about that one.
> 
> Actually, neither did I (at first). But came across it when I 
> didn't find the
> twisities where I expected them :-)
> 
> Another hack which you've probably already figured 
> out/implemented so I'll
> just put it in short:
> Since contents.rdf contains a list of _all_ contained 
> objects, the folderish
> ones have to be identified for the tree. This can be done by setting
> zp:Folderish="&isPrincipiaFolderish;" in the RDF and using <rule
> zp:Folderish="1"> in the XUL for the tree.

Yup. I used a somewhat different terminology here. It is important to
realize that the tree on the left hand side uses tree protocol methods
to determine what is displayed and what isn't, and what URLs the
displayed items have. The Mozilla tree should display the same items.
There is a difference between tpValues and objectValues.

> 
> Also, I had some problems getting the top level 'Zope' root 
> of the tree to
> show. I had to finally use a new rdf file (treeroot.rdf) 
> which looks like this
> (usual surrounding RDF omitted):
> 
> <rdf:Seq about="Zope:Treeroot"
>   dc:Title="&dtml.missing-title;"
>   dc:Identifier="&dtml-id;"
>   dc:Date="&dtml.missing-bobobase_modification_time;"
>   dc:Type="&dtml.missing-meta_type;"
>   <dtml-if icon><dtml-call "REQUEST.set('iconURL', '%s/%s' % (BASE1,
> icon))"></dtml-if>
>   nc:Icon="&dtml.missing-iconURL;">
> 
>   <rdf:li>
>   <rdf:Description about="http://michigan:8080"
>                    dc:Title="Zope"
>                    dc:Identifier=""
>                    dc:Date="2000/01/11 00:11:43.296"
>                    dc:Type="Folder"
>                    zp:Folderish="1"
>                    
> nc:Icon="http://michigan:8080/misc_/OFSP/Folder_icon.gif"
> />
>   </rdf:li>
> </rdf:Seq>
> 
> Then in the XUL tree have 
> datasource="http://zoperoot/treeroot.rdf" and
> ref="Zope:Treeroot". I couldn't get it to work if I put this 
> RDF snippet in
> the root contents.rdf (wonder why).

Mind that you should be able to root the left hand tree on any Zope
folderish URL, like http://localhost/QuickStart/.

-- 
Martijn Pieters, Software Engineer 
| Digital Creations http://www.digicool.com 
| Creators of Zope      http://www.zope.org 
| mailto:mj@digicool.com       ICQ: 4532236
| PGP:
http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
-------------------------------------------