inside the render method, add a flag to prevent double rendering
@Override
public String render(
RenderRequest renderRequest, RenderResponse renderResponse) {
Template template = (Template)renderRequest.getAttribute(
WebKeys.TEMPLATE);
Object ob = template.get("firstRendered");
if(ob ==null) {
template.put("firstRendered",true);
}else {
return null;
}
return "view-soy-template-name";
}
Comments
Post a Comment