cancel
Showing results for 
Search instead for 
Did you mean: 

Property Menu

joksy
Champ in-the-making
Champ in-the-making
Hi Guys,

Well the question would be easy, is there an out-of-the-box system in alfresco to select the property in a drop-down menu like for choose the mime-content type??

For better explenation i expose you the scenario.
I have a customer that i ve need to have some information about your usual connection. for instance skype, cell phone fax etc. Now these data are in form of boolean like below code.

   <property name="xxx:Skype">
         <type>d:boolean</type>
   </property>
   <property name="xxx:cell phone">
         <type>d:boolean</type>
   </property>
   <property name="xxx:fax">
         <type>d:boolean</type>
   </property>

Again the point is if exist a way to select one of them in a drop - menu??

Many thanks
1 REPLY 1

stallapragada
Champ in-the-making
Champ in-the-making
You can do this.

In your model.xml file define a consrtaint right after the namespaces section.

<constraints>
   <constraint name="xxx:commType" type="LIST">
      <parameter name="allowedValues">
         <list>
            <value>Skype</value>
            <value>Cell Phone</value>
            <value>Fax</value>
         </list>
      </parameter>
   </constraint>
</constraints>


In your type definition, add the constraint to the property.

<type name="xxxdoc>
         <title>Some Doc</title>
         <parent>cm:content</parent>
         <properties>
          …
            <property name="xxx:communicationType">
               <title>Communication Type</title>
               <type>d:text</type>
               <constraints>
                   <constraint ref="xxx:commType" />
               </constraints>
            </property>
         </properties>
      </type>

In your web-client-config-custom.xml file, add the entry for this property.
<config evaluator="node-type" condition="xxx:doc">
      <property-sheet>
                  <show-property name="xxx:communicationType"/>
      </property-sheet>
   </config>


You should be up and running after this.

-Thanks
Srikant
Principal Consultant
Introspeqt Software (India) Private Ltd
http://www.introspeQt.com