[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sapphire-dev] Validation for empty list property
|
Hello Konstantin (or anyone other Sapphire experts),
In my model I have a List Property on the root model element. In the DTD this is specified as entity+ so it is expecting one or more of these elements to be valid. However, in the model or the sdef file I don't know how to make it show an Error marker on the Content Outline Node so the user knows something has to be fixed, some validation message like "At least on {0} must be specified" where {0} can be the ModelElement name.
Any thoughts? Oh, i have tried both @NonNullValue and @MustExist annotations on this property just to try it out if that would help, but neither produced an error marker on the Content Outilne Node.
For reference, here is the ListProperty definition in question below.
@Type(base = IEntity.class)
@Label(standard = "Entity")
@XmlListBinding(mappings = @XmlListBinding.Mapping(element = "entity", type = IEntity.class))
ListProperty PROP_ENTITIES = new ListProperty(TYPE, "Entities");
ModelElementList<IEntity> getEntities();
--
Greg Amerson
Liferay, Inc.
Attachment:
sapphire_empty_list_property_validation.png
Description: PNG image