10-23-2007 03:34 PM
<constraints>
<constraint name="dwr:sectorList" type="LIST">
<parameter name="allowedValues">
<list>
<value>Consumer Discretionary</value>
<value>Consumer Staples</value>
<value>Energy</value>
<value>Financials</value>
<value>Industrials</value>
<value>Materials</value>
<value>Technology</value>
<value>Telecommunications</value>
<value>Utilities</value>
</list>
</parameter>
<parameter name="caseSensitive">
<value>true</value>
</parameter>
</constraint>
</constraints>
<aspects>
<aspect name="dwr:reportsMetaData">
<title>Position Report</title>
<properties>
<property name="dwr:date">
<title>Date</title>
<type>d:datetime</type>
</property>
<property name="dwr:sector">
<title>Sector</title>
<type>d:text</type>
<constraints>
<constraint ref="dwr:sectorList" />
</constraints>
</property>
</aspect>
</aspects>
<config>
<dialogs>
<!– Definition of the create space dialog –>
<dialog name="createPositionReportSpace"
page="/jsp/extension/create-position-reports-space/create-position-reports.jsp"
managed-bean="CreatePositionReportSpaceDialog"
icon="/images/icons/create_space_large.gif"
title-id="create_space"
description-id="create_space_description"
error-message-id="error_create_space_dialog" />
<!– Definition of the edit space dialog –>
<dialog name="editPositionReportsSpace"
page="/jsp/spaces/edit-space-dialog.jsp"
managed-bean="EditPositionReportSpaceDialog"
icon="/images/icons/details_large.gif"
title-id="modify_space_properties"
description-id="editspace_description" />
</dialogs>
</config>
<config evaluator="aspect-name" condition="dwr:reportsMetaData">
<property-sheet>
<show-property name="dwr:date"/>
<show-property name="dwr:sector" component-generator="TextFieldGenerator"/>
</property-sheet>
</config>
AspectDefinition aspectDef = this.dictionaryService.getAspect(idQName);
Iterator<PropertyDefinition> iterPropDefCol = aspectDef.getProperties().values().iterator();
while (iterPropDefCol.hasNext()) {
PropertyDefinition propDef = iterPropDefCol.next();
if (propDef.getName().getLocalName().equals("sector")) {
List<ConstraintDefinition> propConstraints = propDef.getConstraints();
10-24-2007 11:03 AM
// idQName is the aspect you are looking up
AspectDefinition aspectDef = this.dictionaryService.getAspect(idQName);
Iterator<PropertyDefinition> iterPropDefCol = aspectDef.getProperties().values().iterator();
while (iterPropDefCol.hasNext()) {
PropertyDefinition propDef = iterPropDefCol.next();
if (propDef.getName().getLocalName().equals(property)) {
// Go through the constaints and see if it has the list of values constraint.
ListIterator<ConstraintDefinition> constraintsIter = propDef.getConstraints().listIterator();
while (constraintsIter.hasNext()) {
Constraint constraint = ((ConstraintDefinition) constraintsIter.next()).getConstraint();
if (constraint instanceof ListOfValuesConstraint) {
ListIterator<String> valuesIter = ((ListOfValuesConstraint) constraint).getAllowedValues().listIterator();
while (valuesIter.hasNext()) {
constraintsList.add(new SelectItem(valuesIter.next()));
}
return constraintsList;
}
}
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.