I know about the startElement, endElement and writeAttribute methods on ResponseWriter. My problem is that I want, for example, to output h: commandLink, declaring it as HtmlCommandLink link = new HtmlCommandLink();.
How can I output other UIComponents like this in my own component? I might want to use some ajax RichFaces components in my components, so I hope that I can avoid all the problems.
Edit: what I'm trying to do is create my own tag library with the following tag <myTags:commentTree>. Each comment has an answer button when the answer button is pressed. I present the response form under the comment. As soon as this is shown, I would like to output, for example, the richfaces component <a4j:commandButton>. This should be done inside my own java tag file, which Ive called for CommentsTreeUI.java.
I usually output all my elements that display forms and buttons with writer.startElement("input", myComponent); writer.writeAttribute("type", "button", null);, but if I could do it instead, for example startElement("a4j:commandbutton", myComponent), it would help my ALOT, since it has all the built-in ajax functions, etc.
Any clues?
source
share