How do I can have the current document type translated into my xhtml fragment ?

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:


How can access to “my.doc.label” used for the doc type when I create this document type definition:

<type id="MyDocType">
  ... etc...
0 votes

1 answers



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:


And Nuxeo provides a JSF component to get this adapter:

<div ...

... create my content where I want to put the docType translated ...
.... etc...

Hope this will help you as help me :)

0 votes