title: Format a JSF converted value
body: <p>Today I noticed <strong>ocpsoft</strong> has a nice <a href="http://ocpsoft.org/prettytime/" rel="nofollow">time library</a> adapted to use in <strong>JSF 2</strong> as a converter. The strong point of that is you can use the converter directly in the date displayed in the view and it converts it into a string telling the user something like <code>6 hours ago</code> or <code>17 hours from now</code>. I think my best is to combine both, the JSF converted date and this one to display something like <code>26-03-2013 17:00 (4 hours from now)</code>. I can achieve something similar with the following code:</p>
  
  <pre><code>&lt;h:outputText value="#{task._StartDate}" style="padding:2px;"&gt;
      &lt;f:convertDateTime pattern="dd-MM-yyyy HH:mm" timeZone="GMT+1" /&gt;
  &lt;/h:outputText&gt;
  &lt;h:outputText value="#{task._StartDate}"&gt;
      &lt;f:converter converterId="org.ocpsoft.PrettyTimeConverter" /&gt;
  &lt;/h:outputText&gt;
  </code></pre>
  
  <p>My problem comes when I want to put the second value into parenthesis. The <code>PrettyTimeConverter</code> accepts only a date as a value and I can't write the parenthesis there directly. Also JSF is not accepting the following:</p>
  
  <pre><code>&lt;h:outputFormat value="({0})"&gt;
      &lt;f:param value="#{task._StartDate}"&gt;
          &lt;f:converter converterId="org.ocpsoft.PrettyTimeConverter" /&gt;
      &lt;/f:param&gt;
  &lt;/h:outputFormat&gt;
  </code></pre>
  
  <p>With that I have the following error:</p>
  
  <pre><code>&lt;f:converter&gt; Parent not an instance of ValueHolder: 
  javax.faces.component.UIParameter@1492636
  </code></pre>
  
  <p>Any idea about how to achieve that avoiding writing both parentheses using specific <code>h:outputText</code> tags?</p>