01-02-2012 12:58 PM
I'm writing a xhtml fragment and I would like to display into this fragment the document type translated.
I know that jsf bring a translation possibilities through this:
#{messages[label]]
How can access to "my.doc.label" used for the doc type when I create this document type definition:
<type id="MyDocType">
<label>my.doc.label</label>
<icon>/icons/myicon.gif</icon>
... etc...
</type>
01-02-2012 01:32 PM
You have to get the TypeInfoAdapter that will expose all the attribute of the Document Type (UI part).
Normally to get an adapter you just have to do this:
TypeInfoAdapter type = TypeInfoAdapterFactory.getAdapter(yourDocumentModel);
And so to get the label:
type.getLabel();
And Nuxeo provides a JSF component to get this adapter:
<div ...
xmlns:nxd="http://nuxeo.org/nxweb/document"
...>
... create my content where I want to put the docType translated ...
#{messages[nxd:typeInfo(yourDocument).label]}
.... etc...
Hope this will help you as help me 🙂
01-02-2012 01:32 PM
You have to get the TypeInfoAdapter that will expose all the attribute of the Document Type (UI part).
Normally to get an adapter you just have to do this:
TypeInfoAdapter type = TypeInfoAdapterFactory.getAdapter(yourDocumentModel);
And so to get the label:
type.getLabel();
And Nuxeo provides a JSF component to get this adapter:
<div ...
xmlns:nxd="http://nuxeo.org/nxweb/document"
...>
... create my content where I want to put the docType translated ...
#{messages[nxd:typeInfo(yourDocument).label]}
.... etc...
Hope this will help you as help me 🙂
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.