cancel
Showing results for 
Search instead for 
Did you mean: 

Custom content property : how to add pick list.

bluearth
Champ in-the-making
Champ in-the-making
Hi all,

Now that I'm managed to create my own node model, I need to further my customization.

Now I need to add custom property to my model as the following :
- it is a pick list. i.e. the user is limited to selection provided.
  Perhaps later, the web client will show it as combo box in the property sheet.
- The values are drawn from list of current space users (i.e. the destination space of the incoming content).

Any hint on how to do that ?

Thanks.
2 REPLIES 2

jayjayecl
Confirmed Champ
Confirmed Champ
Hi,

you have two main possibilities to do that :
- define a custom constraint on your property :
http://wiki.alfresco.com/wiki/Constraints
- or define a custom component-generator for your property
http://wiki.alfresco.com/wiki/Component_Generator_Framework
(if you write a custom component-generator, try to get inspired by the TextFieldGenerator, when a "MULTI" constraint exists

Besides, when you get the idea but feel lost on how to implement the solution, browse these forums about your idea (i.e "custom list constraints" or "component generator"), and you'll get some hints.
You might also have a look at
http://ecmarchitect.com/images/articles/alfresco-content/content-article.pdf
and
http://blogs.alfresco.com/wp/jbarmash/2008/08/08/dynamic-data-driven-drop-downs-for-list-properties/

hope this helps

bluearth
Champ in-the-making
Champ in-the-making
I see that alfresco already has property editor like the one I need (as show on image).

The question now is how to modify my model definition and the web client config.

[img]http://img.photobucket.com/albums/v722/barkah/snapshot_usersel-1.png[/img]