title: JSF ResponseWriter custom components
body: <p>I know about startElement, endElement, and writeAttribute methods on ResponseWriter. My problem is that I want to for example output a h:commandLink by declaring it like <code>HtmlCommandLink link = new HtmlCommandLink();</code> .</p>
  
  <p>How can I output other UIComponents like this in my own component? I might want to use some RichFaces ajax stuff in my components aswell so hoping I can avoid making it all by scratch.</p>
  
  <p>Edit: What I'm trying to do is create my own tag library with the following tag <code>&lt;myTags:commentTree&gt;</code>. Every comment have a reply button, when the reply button is clicked I render the reply form beneath the comment. Once that is rendered, I would like to output for example the richfaces <code>&lt;a4j:commandButton&gt;</code> component. This have to be done inside my own java tag file which Ive called for <code>CommentsTreeUI.java</code>. </p>
  
  <p>Normally I output all my elements that display the forms and buttons with <code>writer.startElement("input", myComponent); writer.writeAttribute("type", "button", null);</code> but if I could instead do for example <code>startElement("a4j:commandbutton", myComponent)</code> that would help my ALOT since it has all the built in ajax features etc.</p>
  
  <p>Any clues?</p>