[opencms-dev] Mapping empty string to property

Paul-Inge Flakstad flakstad at npolar.no
Fri Jan 8 15:51:00 CET 2010


 
Hi people

For a structured content type, I'm using a dropdown to let the user choose between two options. For option one, I need to set a property value, and for option 2 that same property should have no value. I know I can do things certain ways to achieve what I want, no problem there, but this got me wondering: is it at all possible (using the default widget) to map an empty string to a property?

Something like this XSD code is what I had in mind:

<xsd:element name="ListType" type="OpenCmsString" />
...
<layout element="ListType" widget="SelectorWidget" configuration="EMPTY_STRING:Regular|/snippets/archive.js:Archive" /
...
<mapping element="ListType" mapto="property:head.snippet" />


Cheers,
Paul


More information about the opencms-dev mailing list