jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kooper <sergeysach...@list.ru>
Subject Reset to empty value property that has constraints
Date Fri, 24 Apr 2009 11:53:11 GMT

Hi, I have task to give ability to reset property that has constraints to
empty value,
e.g.
<propertyDefinition name="Weather" requiredType="String" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false" multiple="false"
>
<valueConstraints>
<valueConstraint>Rain</valueConstraint>
<valueConstraint>Snow</valueConstraint>
<valueConstraint>Windy</valueConstraint>
<valueConstraint>Muddy</valueConstraint>
<valueConstraint>Cold</valueConstraint>
<valueConstraint>Hot</valueConstraint>
</valueConstraints>
</propertyDefinition>
and of course when I try to set empty value I recieve constraint exception.
Currently I added empty constraint to property and it works
e.g.
<propertyDefinition name="Weather" requiredType="String" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false" multiple="false"
>
<valueConstraints>
<valueConstraint></valueConstraint>
<valueConstraint>Rain</valueConstraint>
<valueConstraint>Snow</valueConstraint>
<valueConstraint>Windy</valueConstraint>
<valueConstraint>Muddy</valueConstraint>
<valueConstraint>Cold</valueConstraint>
<valueConstraint>Hot</valueConstraint>
</valueConstraints>
</propertyDefinition>

, but may be there is more elegant way to do that?
Thanks for your time. 
-- 
View this message in context: http://www.nabble.com/Reset-to-empty-value-property-that-has-constraints-tp23214921p23214921.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message