Reputation: 305
I am in the process of developing a custom content model for Alfresco and customizing the share interface to match. I'm cosidering using constraints and selectone templates in the model definition and the share configuration respectively.
However, I think there must be a better way to implement things like years and year periods rather than having to explicitly hard code them into a list. Is there a way to generate a sequence of numbers (in this case, years and year periods) in these configuration files?
Here is a sample of the data I need to have in the constraints or selectone templates:
Years: 1953, 1954, 1955 ... 2012, 2013, 2014.
Year Periods: 1953-1955, 1957-1960, 1961-1964 ... 2001-2004, 2005-2008, 2009-2012.
Upvotes: 0
Views: 113
Reputation: 1298
Sure you can, here you can find everything about content model constraints, but more specifically you can use:
<constraint name="test:minMax1" type="MINMAX">
<parameter name="minValue"><value>0</value></parameter>
<parameter name="maxValue"><value>256</value></parameter>
</constraint>
For your sequence. In this example you would have 257 numeric entries (from 0 to 256). Hope it helps.
Upvotes: 2