Jean-Marc Orliaguet escribió:
Enrique Perez wrote:
Hi!
When I create new properties for a fragment I have three choices: text
area, string and selection.
Text area and string are easy to use, but I don't know how to use the
selection type.
I think that I must create a new class that implements Vocabulary and
a new extension point in the theme-contrib.xml file. But, how do I
select this vocabulary in the FieldInfo annotation?
I thought that I must use the attribute source, but it's undefined for
the annotation type FieldInfo.
Thanks!
Hi,
You need to register a vocabulary:
<extension target="org.nuxeo.theme.services.ThemeService"
point="vocabularies">
<vocabulary name="web widget providers">
<class>org.nuxeo.theme.webwidgets.ProviderVocabulary</class>
</vocabulary>
</extension>
the vocabulary class then needs to implement
org.nuxeo.theme.vocabularies.Vocabulary
public interface Vocabulary {
List<VocabularyItem> getItems();
}
there is an example at:
https://svn.nuxeo.org/nuxeo/org.nuxeo.theme/trunk/nuxeo-theme-webwidgets/src/main/java/org/nuxeo/theme/webwidgets/ProviderVocabulary.java
PS: I've recently changed the class, since it wasn't possible to set
item labels, so you might need to do a fresh svn checkout.
best
/JM
Thanks.
But my problem is the following: I am modifying my-project instance and
it has some libraries (5.1.0) that haven't the source attribute of
FieldInfo. I think that I have to do something to my-project uses the
libraries of nuxeo-ep, but I don't know how to do it.
Or maybe I have to create a new class in my-project that extends the
FieldInfo that provides the libraries of my-project. I don't know.
I don't know if you understand what I say...
Regards.
--
Enrique PƩrez Olivares.
Dpto I+D.
Yerbabuena Software.
[EMAIL PROTECTED]
http://www.yerbabuena.es
Tlf/Fax: 902 995 246
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm