-
1. Re: How to create a tag with the CDK that has access to its body?
ilya_shaikovsky Jun 17, 2010 5:30 AM (in response to pjmlp)component creation described there http://docs.jboss.org/richfaces/latest_3_3_X/en/cdkguide/html/ - chapters related to component project generation.
And in order to quickly look into the component template like you need - checkout
-
2. Re: How to create a tag with the CDK that has access to its body?
pjmlp Jun 17, 2010 6:38 AM (in response to ilya_shaikovsky)Thanks for the example, but it does not help me.
I really need to access the tag's body content and manipulate it. The example you provided just makes use of the inherited renderChildren() method.
When doing a component by hand, I need to add code to the JSP and Facelets Tag handlers to retrieve the body contents. Is this not possible at all with the CDK based components?
As for the manual, I am using it already for some time, still, some chapters could be improved, but that is off-topic for the discussion at hand.
-
3. Re: How to create a tag with the CDK that has access to its body?
pjmlp Jun 17, 2010 10:44 AM (in response to pjmlp)Answering to myself, I ended up doing something like this,
{code:java}
public void renderChildren(FacesContext context, UIComponent component) throws IOException {
if (component.getChildCount() == 1) {
myTagBody = component.getChildren().get(0).toString().trim();
}
}{code}
This follows a bit the example given by Ilya.