[Zope-Moz] Template woes
Shalabh Chaturvedi
shalabh@pspl.co.in
Mon, 20 Mar 2000 16:40:17 +0530
Hi All:
I am trying to create a two column table (<tree>) which shows property-value
pairs. The left column for the name of the property and the right for the
value.
The properties are available as RDF from a remote datasource.
I was doing fine till I came across a property of type 'selection'. Such a
property needs an <html:select> for displaying the value. (RDF for
this property attached below.)
The following has been tried and it fails. What happens is the treecell inside
the second rule overwrites the _first_ treecell in the treerow. So the
property name is overwritten with a drop down list of properties. The
drop down list is required in the second column.
<rule parent="tree" zope:PropertyType="selection">
<treechildren>
<treerow uri="...">
<treecell
value="rdf:http://www.zope.org/Resources/Mozilla/RDF#PropertyId" />
<treecell class="propertylist value"
allowevents="true"><html:select /></treecell>
</treerow>
</treechildren>
</rule>
<rule parent="treerow" zope:Type="selectoption">
<treecell class="propertylist value">
<html:select>
<html:option uri="...">
<text
value="rdf:http://www.zope.org/Resources/Mozilla/RDF#SelectOption"
/>
</html:option>
</html:select>
</treecell>
</rule>
Is there any way I can solve this?
Thanks,
Shalabh
______________________________
Shalabh Chaturvedi
icq://43284067
http://advogato.org/person/shalabh/
PS:
The RDF describing the selection property is:
-----------8<-------------------------------------------
<rdf:Seq about="http://michigan:8080/proptest:properties/FavIcecream"
dc:Identifier="FavIcecream"
zope:Type="property"
zope:PropertyId="FavIcecream"
zope:PropertyType="selection"
zope:PropertyValue="chocolate"
zope:PropertyReadOnly="false"
zope:PropertyAllowDelete="true"
zope:PropertySelectVariable="IceCreamList">
<rdf:li
resource="http://michigan:8080/proptest:properties/FavIcecream/chocolate" />
<rdf:li
resource="http://michigan:8080/proptest:properties/FavIcecream/vanilla" />
<rdf:li
resource="http://michigan:8080/proptest:properties/FavIcecream/strawberry" />
</rdf:Seq>
<rdf:Description
about="http://michigan:8080/proptest:properties/FavIcecream/chocolate"
zope:SelectOption="chocolate"
zope:Selected="true"
zope:Type="selectoption" />
<rdf:Description
about="http://michigan:8080/proptest:properties/FavIcecream/vanilla"
zope:SelectOption="vanilla"
zope:Selected="false"
zope:Type="selectoption" />
<rdf:Description
about="http://michigan:8080/proptest:properties/FavIcecream/strawberry"
zope:SelectOption="strawberry"
zope:Selected="false"
zope:Type="selectoption" />
-----------8<-------------------------------------------