02-03-2010 06:27 AM
02-03-2010 02:27 PM
02-03-2010 03:44 PM
02-04-2010 06:18 AM
02-04-2010 06:25 AM
02-04-2010 08:35 AM
package org.alfresco.extension;
import java.util.List;
import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
import org.alfresco.extension.CustomGroupsBean;;
public abstract class MyListofValuesConstraint extends ListOfValuesConstraint{
@Override
public List<String> getAllowedValues()
{
CustomGroupsBean customGroup= new CustomGroupsBean();
List<String> allowedValues = customGroup.getGroupList();
super.setAllowedValues(allowedValues);
return allowedValues;
}
}
<constraints>
<constraint name="custom:miLista" type="org.alfresco.extension.MyListofValuesConstraint">
<parameter name="allowedValues">
<list>
</list>
</parameter>
</constraint>
</constraints>
<property name="custom:organizador">
<title>Grupo organizador</title>
<type>d:text</type>
<constraints>
<constraint ref="custom:miLista"/>
</constraints>
</property>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="MyListofValuesConstraintInitializer"
class="org.alfresco.extension.MyListofValuesConstraint">
</bean>
<!– Registration of new models –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/customModel.xml</value>
</list>
</property>
</bean>
</beans>
02-04-2010 08:52 AM
02-08-2010 08:09 AM
02-08-2010 08:58 AM
02-08-2010 09:21 AM
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.