public void writeHead(Writer out) throws IOException { page.writeHead(out); }
public String getTitle() { return page.getTitle(); }
public void writeBody(Writer out) throws IOException { page.writeBody(out); }
model.put("head", htmlPage.getHead()); model.put("title", htmlPage.getTitle()); model.put("body", htmlPage.getBody()); model.put("page.properties", new SimpleHash(htmlPage.getProperties()));
public static IRender getHeadRenderer(IRequestCycle cycle) { return new RenderString(((HTMLPage) getPage(cycle)).getHead(), true); } }
public void addProperty(String name, String value) { page.addProperty(name, value); } }
if (page instanceof HTMLPage) { HTMLPage htmlPage = ((HTMLPage) page); context.put("head", htmlPage.getHead());
public final int doEndTag() throws JspException { HTMLPage htmlPage = (HTMLPage)getPage(); try { htmlPage.writeHead(getOut()); } catch(IOException e) { throw new JspException("Error writing head element: " + e.toString(), e); } return EVAL_PAGE; } }
if (page instanceof HTMLPage) { HTMLPage htmlPage = ((HTMLPage) page); model.put("head", htmlPage.getHead());
private Map<String, Object> getVelocityParams(HttpServletRequest request, Page page, HttpServletResponse response) throws IOException { Map<String, Object> velocityParams = getDefaultVelocityParams(); velocityParams.put("page", page); velocityParams.put("title", page.getTitle()); StringWriter bodyBuffer = new StringWriter(); page.writeBody(OutputConverter.getWriter(bodyBuffer)); velocityParams.put("body", bodyBuffer); if (page instanceof HTMLPage) { HTMLPage htmlPage = (HTMLPage) page; StringWriter buffer = new StringWriter(); htmlPage.writeHead(OutputConverter.getWriter(buffer)); velocityParams.put("head", buffer.toString()); } // This allows the templates to include JSPs, using $dispatcher.include() velocityParams.put("dispatcher", new BufferingRequestDispatcher(request, response)); velocityParams.put("i18n", getJiraAuthenticationContext().getI18nHelper()); velocityParams.put("req", request); return velocityParams; }
model.put("page", pageObject); if (pageObject instanceof HTMLPage) model.put("head", ((HTMLPage)pageObject).getHead()); model.put("body", pageObject.getBody()); model.put("title", pageObject.getTitle());
HTMLPage htmlPage = (HTMLPage) page; StringWriter buffer = new StringWriter(); htmlPage.writeHead(OutputConverter.getWriter(buffer)); velocityParams.put("headHtml", buffer.toString());
htmlPage.writeHead(OutputConverter.getWriter(buffer)); velocityParams.put("head", buffer.toString());