Re: object lookup in code sources

Jan-Wijbrand Kolman <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Organization Infrae
Message-ID <[email protected]>
> I'm running into a really odd problem with using the new object lookup window 
> in a code source.  First off, I notice Formulator doesn't have buttons (?), 
> so I'm using a text field with name=document.  The TALES expression for this 
> field looks like:
> 
> string:id='es_silva_document' onclick="reference.getReference(function(path, 
> id, title) {document.getElementById('es_silva_document').value = path;}, 
> '${request/model/aq_parent/absolute_url}',  'Silva Document', true);return 
> true;"

This is not really an answer to your actual question, still:

2 weeks ago we participated in a "Silva" sprint, geared towards building 
site layouts for Silva.

However, with the valuable input from Samuel Schleup, we created a 
Silva-specific Formulator field that includes a button for triggering 
the lookup up pup up window.

This code has been checked in on the Silva trunk (what will be 
Silva-1.5), but I think you should be able use that code in Silva-1.4.x 
as well, with a little hacking. You can find it here:

   http://cvs.infrae.com/Silva/lookupwindowfield.py?rev=1.1&view=auto

and its initialization in here (line 9):

   http://cvs.infrae.com/Silva/__init__.py?rev=1.140&view=auto


Hope this helps,
kind regards,
jw

-- 
Jan-Wijbrand Kolman
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.