Extending renderer, what to override?

Hello everybody!I have a question. I have to extend org.apache.myfaces.renderit.html.HtmlTextareaRenderer. I'm just adding maxlength property. What method should I override. I tried to override encodeBegin() and encodeEnd(), but, I guess, it's throws exception
[276 byte] By [iridaa] at [2007-10-3 2:33:14]
# 1

Hi,

You have to do the following:

1) Create a Custom tag which will extend inputTextAreaTag and add Maxlength as one of the member

2) in setproperties(UIComponent component) method, first call super.setProperties(component) and then add the maxLength as one of the attributes for component as component.getAttributes().put("maxLength", maxLength);

3) Return the renderer that you are using from getRendererType method

4) In your renderer's encodeBegin method, get the attribute from the component. So now you have the maxLength handy and use maxLength as required.

kirangunduraoa at 2007-7-14 19:32:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...