cancel
Showing results for 
Search instead for 
Did you mean: 

list of value constraint meta-data in the advanced search

tfaudot
Champ in-the-making
Champ in-the-making
Hello,

While looking at the wiki http://wiki.alfresco.com/wiki/Advanced_Search_Custom_Attributes I found this line:
In Alfresco 2.1 list-of-values constraint bound properties are supported and will display as a drop-down list of values for selection.
.

How can I define list-of-value constraint properties so that I get drop-down capability instead of the text field?

Thanks!
4 REPLIES 4

xerox
Champ in-the-making
Champ in-the-making
an example:

<aspect name="xxx:yyyy">
        <properties>
           <property name="xxx:projectType">
              <type>d:text</type>
      <multiple>true</multiple>
         <constraints>
                 <constraint ref="xxx:projectList" />
              </constraints>
           </property>
        </properties>
      </aspect>

<constraints>
     <constraint name="xxx:projectList" type="LIST">
        <parameter name="allowedValues">
            <list>
               <value>A</value>
               <value>B</value>
               <value>C</value>
             </list>
        </parameter>
     </constraint>
</constraints>   

Friendly regards,

Nick

tfaudot
Champ in-the-making
Champ in-the-making
I just tried that but my model can't be parsed, is this feature really available in 2.1? (I'm using the community one)
When I looked at the modelschema, the <constraint> tag wasn't there… 😞

xerox
Champ in-the-making
Champ in-the-making
Yes' It's possible.

Where did you define your constraint?
You should define it in your custommodel.xml.
Maybe you could give an example of your model with constraint?

Friendly regards,

Nick

tfaudot
Champ in-the-making
Champ in-the-making
OK I solved it, the thing is that the <constraint> tag cannot be followed by anything… it there is another tag following it in the properties section the model cannot be parsed.

great, it works now! 🙂