/** * Internal method which can be used by subclasses to pass the view through the component's view * renderer. * * @param text The raw view * @param context The context * @param path render the View at the given path * @return The merged view * @throws Exception if errors are encountered at the rendering process time */ protected String renderView(String text, String path, JPublishContext context) throws Exception { ViewRenderer viewRenderer = getViewRenderer(); StringWriter out = new StringWriter(); viewRenderer.render(context, path, new StringReader(text), out); return out.toString(); }