cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup drop down list to choose for metadata field???

csiege
Champ in-the-making
Champ in-the-making
I know this has been discussed somewhat on other posts, but could not see a recent post or a real resolution.

I want to provide a down down list for the user to select from when
editing document details (metadata).   This would allow me to enforce the vocabulary.

thanks!

Chris
76 REPLIES 76

gavinc
Champ in-the-making
Champ in-the-making
No, not currently.

Feel free to raise this on JIRA.

tiofelix
Champ in-the-making
Champ in-the-making
I think i found a bug. If i have a property defined like this one:


<property name="my:descritores">
   <type>d:category</type>
   <mandatory>true</mandatory>
   <multiple>true</multple>
</property>
‍‍‍‍‍‍‍

Alfresco lets me finalize a document when i click on select an item,
althought Alfresco should only lets me finalize when i had selected a category and cliked on 'add to list', not before.

tiofelix
Champ in-the-making
Champ in-the-making
I have the same problem with constraint lists:

<property name="my:status">
         <type>d:text</type>
         <mandatory>true</mandatory>
         <constraints>
            <constraint ref="my:status" />
         </constraints>
</property>  ‍‍‍‍‍‍‍

even if i defined the constraint like this one:


<constraint name="my:status" type="LIST">
          <parameter name="allowedValues">
                  <list>
                    <value></value>
                    <value>Ready</value>
                    <value>Steady</value>
                    <value>Go</value>
              </list>
      </parameter>
      </constraint>    
‍‍‍‍‍‍‍‍‍‍‍

gavinc
Champ in-the-making
Champ in-the-making
Yes, for the category property you have found a bug. I have raised this in JIRA: http://issues.alfresco.com/browse/AWC-900

For the second issue (the constraints list) you raise, this is by design. By the fact that it is rendered as a list a mandatory validation rule is not required as the UI will always submit a value.

The example you highlight is not supported, if you have an empty string as one of the allowable values that is treated as an "allowable value" and will therefore have no effect on the OK button state.

Hope this helps.

tiofelix
Champ in-the-making
Champ in-the-making
Ok, thanks Gavin. What about deleting or changing the default properties??I want a mandatory property named "title", how can i change these default values?? Thanks.

gavinc
Champ in-the-making
Champ in-the-making
You can define the default value in the property definition in the model i.e.


<property name="my:priority">
   <title>Priority</title>
   <type>d:int</type>
   <default>2</default>
</property>
‍‍‍‍‍‍‍

Is this what you mean?

tiofelix
Champ in-the-making
Champ in-the-making
No Gavin. Sorry, what i am trying to explain is how to delete the default properties? When i finalize the content wizard, the name of the new document is shown and some other properties like "title", "author" and "description" are shown too. I want to change "author" (i'd like "personal author") , and set "title" mandatory, and if possible delete description…am i explaining now?? Thanks.

gavinc
Champ in-the-making
Champ in-the-making
Ahh, OK, sorry I mis-understood.

Yes you can remove properties from display or change their labels. A lot of the information for this is in the following wiki page: http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata

To do this for the default properties you need to override the configuration for "content", you can find this in web-client-config-properties.xml.

You can also completely override the whole config section by doing the following in your web-client-config-custom.xml:


<config evaluator="node-type" condition="content" replace="true">
….‍‍‍

tiofelix
Champ in-the-making
Champ in-the-making
That's not exactly what i wanted Gavin. I'am not explaining my problem very well…i'll try again. In the web-client-config-custom.xml i put this code:


   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="my:documenax" />     
      </content-types>   
   </config>

   <config evaluator="node-type" condition="my:documenax">
      <property-sheet> 
         <show-property name="my:listatipodoc" display-label-id="tipodoc" />       
         <show-property name="my:listasubtipodoc" display-label-id="subtipodoc" />
      </property-sheet>   
   </config>        ‍‍‍‍‍‍‍‍‍‍‍‍

I want exactly, for example, only these 2 properties to be shown when i finilize the wizard and not "description", nor "title"…

The solution you gave me only affects to the type by default: "content", nor to my new type:"my:documenax".

Thank you very much.

gavinc
Champ in-the-making
Champ in-the-making
OK, I'll try again too  Smiley Happy

You can get this effect by basically hiding all previous properties that have been configured to show, so you should be able to do the following:


<config evaluator="node-type" condition="my:documenax">
   <property-sheet>
      <show-property name="my:listatipodoc" display-label-id="tipodoc" />      
      <show-property name="my:listasubtipodoc" display-label-id="subtipodoc" />
      <show-property name="name" show-in-view-mode="false" show-in-edit-mode="false" />
      <show-property name="description" show-in-view-mode="false" show-in-edit-mode="false" />
      ….the same for any other properties you want to hide….
   </property-sheet>  
</config>‍‍‍‍‍‍‍‍‍‍