[Zope-dev] Object references from dtml
Ross Boylan
RossBoylan@stanfordalumni.org
Thu, 19 Oct 2000 23:20:31 -0700
I have a log composed of sublogs, and so on. I would like for people to be
able to see some kind of summary (e.g., short versions of the logs down n
levels) on the screen and then click on one of interest and see a fuller
display of it.
Is there a good way to do this using dtml?
I've thought of two approaches. The "standard" zope way seems to be to
make each log folderish, and give each entry an id. Then I can embed the
address in the html. The problem with this is that I would have to make up
the id's and add extra machinery that the logs don't really need.
I'm leaning toward a second approach, of getting an object id and putting
it in the html. This also raises some issue.
* Will the id be stable in the face of the db potentially
dematerializing objects underneath?
* If I use a persistent id (_p_oid, I think), will that be stable?
* (Also, I'll need to be sure everything has persisted, but I think I
can do that by forcing a transaction end before getting the _p_oid).
* Can I map from object id back to object? (_p_jar.something or other)
* Will this be robust across database changes (minimally, from ZODB to
ZEO)?
* Will the object id consist of characters which can be embedded easily
in html?