jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Reset to empty value property that has constraints
Date Fri, 24 Apr 2009 12:11:40 GMT
On Fri, Apr 24, 2009 at 1:53 PM, Kooper <sergeysachkov@list.ru> wrote:
>
> 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?

no. if a property has a constraint defined, its value must
satisfy the constraint.

cheers
stefan

> 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