title: Best practice for readOnly / edition modes in JSF?
body: <p>Anyone can suggest a way to perform the edition/read-only modes? I am using PF, and I have done this:</p>
  
  <pre><code>&lt;composite:interface&gt;
          &lt;composite:attribute name="size"/&gt;
          &lt;composite:attribute name="value"/&gt;
          &lt;composite:attribute name="editable"/&gt;
      &lt;/composite:interface&gt;
  
      &lt;composite:implementation&gt;
  
          &lt;p:inputText value="#{cc.attrs.value}"  size="#{cc.attrs.size}" rendered="#{cc.attrs.editable}"/&gt;
  
          &lt;h:outputText value="#{cc.attrs.value}" rendered="#{!cc.attrs.editable}"/&gt;
  
      &lt;/composite:implementation&gt;
  </code></pre>
  
  <p>Just displaying an inputText or outPutText depending on a boolean. But apparently there's a bug in PF's inputText, as I receive a targetClass null exception. If I use inputText outside the componente it works, but I want to encapsulate this behaviour withing a comp. Any other suggestion?</p>