05-11-2010 11:01 AM
{
    * name: "cx:language"
    * title: "Language"
    * defaultValues: ""
    * dataType: "d:text"
    * multiValued: true
    * mandatory: false
    * enforced: false
    * protected: false
    * indexed: true
    * indexedAtomically: true
    * constraints: [ ]
    * url: "/api/property/cx_language"
}
…..
…..
…..
<constraint name="cx:languageList" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>German</value>
                    <value>English</value>
                    <value>Russian</value>
          <value>Italian</value>
          <value>Turkish</value>
          <value>Czech</value>
          <value>Slovak</value>
          <value>Hungarian</value>
                    <value>Serb</value>
                    <value>Uzbek</value>
                    <value>Spanish</value>
                </list>
            </parameter>
        </constraint>
….
….
….
<property name="cx:language">
               <title>Language</title>
               <type>d:text</type>
               <multiple>true</multiple>
               <constraints>
                  <constraint ref="cx:languageList" />
               </constraints>
            </property>I use the Alfresco 3.3 Community Version on Debian Lenny
08-09-2010 07:03 AM
 
					
				
		
08-26-2010 07:59 PM
 
					
				
		
09-13-2010 08:30 PM
<#macro propertyDefJSON propertydefs>
    <#escape x as jsonUtils.encodeJSONString(x)>
    {
        <#if propertydefs.name?exists>
        "name" : "${propertydefs.name.toPrefixString()}",
        </#if>
        <#if propertydefs.title?exists>
        "title" : "${propertydefs.title}",
        </#if>
        <#if propertydefs.description?exists>
        "description" : "${propertydefs.description}",
        </#if>
        <#if propertydefs.defaultValues?exists>
        "defaultValues" : "${propertydefs.defaultValues}",
        <#else>
        "defaultValues" : "",
        </#if>
        <#if propertydefs.dataType?exists>
        "dataType" : "${propertydefs.dataType.name.toPrefixString()}",
        </#if>
        "multiValued" : ${propertydefs.multiValued?string},
        "mandatory" : ${propertydefs.mandatory?string},
        "enforced" : ${propertydefs.mandatoryEnforced?string},
        "protected" : ${propertydefs.protected?string},
        "indexed" : ${propertydefs.indexed?string},
        "indexedAtomically" : ${propertydefs.indexedAtomically?string},
        "constraints" :
        [<#–
        <#if propertydefs.constraints?exists>
            <#list propertydefs.constraints as constraintdefs>
        { 
                <#assign keys = constraintdefs.getConstraint()?keys>
                <#list keys as key>
                    <#if key == "expression">
            "${key}" : <#if constraintdefs.getConstraint()[key]?exists>"${constraintdefs.getConstraint()[key]}" <#else>"has no value"</#if>
                    </#if>
                    <#if key_has_next>,</#if>   
                </#list> 
        }<#if constraintdefs_has_next>,</#if>
            </#list>
        </#if>–>
        ],
        "url" : "${"/api/property/" + propertydefs.name.toPrefixString()?replace(":","_")}"
    }
    </#escape>
</#macro>
 
					
				
		
09-13-2010 08:56 PM
 
					
				
		
03-13-2011 12:33 AM
"restricValues" :
[
   <#if propertydefs.constraints?exists>
      <#list propertydefs.constraints as constraintdefs>
         <#list constraintdefs.getConstraint()?keys as key>
            <#if key == "getAllowedValues">
               <#assign vals = constraintdefs.getConstraint().getAllowedValues()>
               <#list vals as val>
   "${val}"
   <#if val_has_next>,</#if>
               </#list>
            </#if>
         </#list>
      </#list>
   </#if>
]
03-28-2011 08:45 AM
03-31-2011 12:05 PM
 
					
				
		
03-31-2011 02:26 PM
 
					
				
		
03-31-2011 04:16 PM
 
					
				
				
			
		
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.