[Zope] Namespace question
complaw@hal-pc.org
complaw@hal-pc.org
Fri, 24 Aug 2001 20:26:43 GMT
I have an object with a built-in method (called "check_id") for determining
whether the value from a retrieved object has the same id as one of the elements
in the current object's lines property.
What I want to do is make an edit form that has a <SELECT> element with a
complete list of object id's of a given type (meta_type = 'Doctrine') and
compare each of those id's to the id's stored in the current object's lines
property. If there is a match, I want the <OPTION SELECTED> statement written.
Otherwise, it would be simply <OBJECT>.
Note, the Doctrine object has (of course) an id. The lines property has a list
of id's that are subsets of the total number of Doctrine objects.
Here is the code...
<SELECT NAME="doctrines:list" SIZE="5" MULTIPLE>
<dtml-in "objectValues('Doctrine')">
<dtml-if "check_id(sequence-item.id)">
<OPTION VALUE="<dtml-var id>" SELECTED><dtml-var title></OPTION>
<dtml-else>
<OPTION VALUE="<dtml-var id>"><dtml-var title></OPTION>
</dtml-if>
</dtml-in>
</SELECT>
The question that I have is that <dtml-if "check_id(sequence-item.id)"> doesn't
work. Any hints as to what the problem might be?
TIA,
Ron