Hi,
I am currently working with Renderers on WM7 Portal SP2. I was able to make a custom Renderer for several JSF UI Component.
Now, what I am trying to do is to delegate some rendering to the default Renderer. I tried to do that based on this article from Sun :
This is my code:
#####################CODE########################
package com.emergis.pnp.portal.renderer_portlet;
import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.render.Renderer;
public class ButtonRenderer extends Renderer{
@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
Renderer baseRenderer = context.getRenderKit().getRenderer("javax.faces.Command", "javax.faces.Button");
baseRenderer.encodeEnd(context, component);
}
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
Renderer baseRenderer = context.getRenderKit().getRenderer("javax.faces.Command", "javax.faces.Button");
baseRenderer.encodeBegin(context, component);
}
}
#####################CODE########################
After deployment, I get this error after loading the portlet :
- [POP.001.0002] A “javax.portlet.PortletException” occurred with the Message “at com.webMethods.caf.faces.portlet.FacesPortlet.render(FacesPortlet.java:408)”
- java.lang.StackOverflowError
I know that I get this error because I am calling recursively encodeBegin() and encodeEnd(). Base on this, is there another way to delegate the rendering to the default renderer?
Thanks,
Paul
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods