Hey Maurizio,
I took a look at your patches, and it works fine. I made some
adjustments though:
- the property value that is saved has an extra trailing comma in the
end. I modified the binding so the extra comma is omitted
- I changed the XML schema for properties.xml a little bit, instead of :
<Multivalue>
<Label>..</Label>
<Value>..</Value>
</Multivalue>
<Multivalue>
<Label>..</Label>
<Value>..</Value>
</Multivalue>
..
, I'm using:
<Enum>
<Label>..</Label>
<Value>..</Value>
</Enum>
<Enum>
<Label>..</Label>
<Value>..</Value>
</Enum>
, because that's the current format for declaring list items in
properties.xml. Then, to define that a property is a multi-value field,
you simply add a <Multivalue/> tag inside the property element. An example:
<Properties xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<Property>
<Name>multivaluetest</Name>
<DisplayName>Multi Value Test</DisplayName>
<Namespace>http://hippo.nl/cms/1.0</Namespace>
<NamespacePrefix>cms</NamespacePrefix>
<Datatype>string</Datatype>
<Multivalue/>
<Enum>
<Label>Foo label</Label>
<Value>foo</Value>
</Enum>
<Enum>
<Label>Bar label</Label>
<Value>bar</Value>
</Enum>
</Property>
</Properties>
I modified this, because then it's easier to convert a single value
property to a multi-value property, and the generation of the form model
becomes easier (no duplicate code for example). Is that ok with you ?
Let me know what you think. If it's ok I will commit it to the trunk /
branch 6.05.
Dennis
maurizio pillitu wrote:
Thx Dennis for your reply.
I got it working and I'd be interested to see this feature committed in the
next Hippo CMS 6.05.xx version (it's scheduled for next week right?); is it
possible?
I generated the attached patches on the tagged version 'Release-CMS-v6_05_02'
of the following files
editor/src/site/explorer/transformers/propform/proplist2form.xsl
editor/src/site/explorer/transformers/propform/proplist2binding.xsl
Let me know what you think.
Met vriendelijke groet,
------------------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
--
Hippo
[EMAIL PROTECTED]
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646
www.onehippo.com [EMAIL PROTECTED]
********************************************
Hippocms-dev: Hippo CMS development public mailinglist