cancel
Showing results for 
Search instead for 
Did you mean: 

Feature to edit a property marked as multiple

ruffp
Champ in-the-making
Champ in-the-making
Hello,

I search in this forum but found no answer.

Is there an out-of-the box feature to be able to edit a multiple property (a specific metadata in our custom model)?
If no, can we change the rendering of the list and add an edition icon which put the text back to the editor.

The only workaround is to delete the old one and create a new one but it is too complicated for our customer as the text is in HTML format (the property - metadata is managed by a derivative of the TinyMCETextArea)

If somebody can show me a link or answer, it would be great.

Thanks
Patrick
3 REPLIES 3

gavinc
Champ in-the-making
Champ in-the-making
Yes, it is possible to edit properties marked as multi valued.

If you add the property to a property-sheet configuration for your custom type the system will provide you the ability to manage multiple values, however, they will be plain text fields.

If you want multiple TinyMCE boxes then you will need to implement a custom component generator.

The following wiki pages may be useful:

http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata
http://wiki.alfresco.com/wiki/Component_Generator_Framework

ruffp
Champ in-the-making
Champ in-the-making
Hello,

My property looks like :
<property name="arch:summary">
  <type>d:any</type>
  <multiple>true</multiple>
  <index enabled="true">
    <atomic>false</atomic>    
    <stored>false</stored>     
    <tokenised>true</tokenised>
  </index>
</property>

And I have my own generator to display the TinyMCE editor for that property.

What I want is to be able to modify the list of selected items by adding a new icon along the existing "trashcan" for deleting, but I don't see any exemple how to change the list under my component (Is the items list part of the component or not? )
And clicking this icon just copy the selected data to the TinyMCE editor for edition.

Thanks for your reply.

gavinc
Champ in-the-making
Champ in-the-making
The icon you refer to is part of the multi value editor component (UIMultiValueEditor) and it's associated renderer, either the MultiValueFieldRenderer or MultiValueSelectorRenderer, you'll need to modify these classes to handle your new icon.

You can swap in your implementation by changing/overriding the definitions in faces-config-repo.xml.