[silva-dev] object lookup in code sources
Andy Altepeter
aaltepet at bethel.edu
Thu Dec 8 23:00:26 CET 2005
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;"
So, this code source works in kupu when adding a fresh code source of this
type. When I click on the textfield, the object lookup window opens, I can
select the object and 'place' the path into my textfield.
However, if I select an existing code source of this type, the onclick does
not work. When I click on the field, it only edits the text.
Has anyone experienced this before? I troubleshooted a bit with venkman, and
found a few curious things:
1) It appears the code to retrieve the code source form is called twice.
2) If I put a 'debugger;' at the beginning of
this._continueStartExternalSourceUpdate, clicking continue twice (because it
is called twice), the onclick does actually work.
Seems like some wierd timing issue going on, but I have no idea where to go
from here. The onclick works perfectly in the forms-based editor.
BTW, I'm using Silva-1.4.1 and kupu 1.3.2
Thanks for the help,
Andy
More information about the silva-dev
mailing list