<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I can have the current document type translated into my xhtml fragment ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-do-i-can-have-the-current-document-type-translated-into-my/m-p/326086#M13087</link>
    <description>&lt;P&gt;You have to get the TypeInfoAdapter that will expose all the attribute of the Document Type (UI part).&lt;/P&gt;
&lt;P&gt;Normally to get an adapter you just have to do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;TypeInfoAdapter type = TypeInfoAdapterFactory.getAdapter(yourDocumentModel);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And so to get the label:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;type.getLabel();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And Nuxeo provides a JSF component to get this adapter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;div ...
   xmlns:nxd="http://nuxeo.org/nxweb/document"
   ...&amp;gt;

... create my content where I want to put the docType translated ...
   #{messages[nxd:typeInfo(yourDocument).label]}
.... etc...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this will help you as help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2012 18:32:59 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-01-02T18:32:59Z</dc:date>
    <item>
      <title>How do I can have the current document type translated into my xhtml fragment ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-do-i-can-have-the-current-document-type-translated-into-my/m-p/326085#M13086</link>
      <description>&lt;P&gt;I'm writing a xhtml fragment and I would like to display into this fragment the document type translated.&lt;/P&gt;
&lt;P&gt;I know that jsf bring a translation possibilities through this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;#{messages[label]]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How can access to "my.doc.label" used for the doc type when I create this document type definition:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;type id="MyDocType"&amp;gt;
  &amp;lt;label&amp;gt;my.doc.label&amp;lt;/label&amp;gt;
  &amp;lt;icon&amp;gt;/icons/myicon.gif&amp;lt;/icon&amp;gt;
  ... etc...
&amp;lt;/type&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Jan 2012 17:58:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-do-i-can-have-the-current-document-type-translated-into-my/m-p/326085#M13086</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-02T17:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I can have the current document type translated into my xhtml fragment ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-do-i-can-have-the-current-document-type-translated-into-my/m-p/326086#M13087</link>
      <description>&lt;P&gt;You have to get the TypeInfoAdapter that will expose all the attribute of the Document Type (UI part).&lt;/P&gt;
&lt;P&gt;Normally to get an adapter you just have to do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;TypeInfoAdapter type = TypeInfoAdapterFactory.getAdapter(yourDocumentModel);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And so to get the label:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;type.getLabel();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And Nuxeo provides a JSF component to get this adapter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;div ...
   xmlns:nxd="http://nuxeo.org/nxweb/document"
   ...&amp;gt;

... create my content where I want to put the docType translated ...
   #{messages[nxd:typeInfo(yourDocument).label]}
.... etc...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this will help you as help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2012 18:32:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-do-i-can-have-the-current-document-type-translated-into-my/m-p/326086#M13087</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-02T18:32:59Z</dc:date>
    </item>
  </channel>
</rss>

