List of usage examples for org.apache.wicket.markup.html.panel Panel render
public final void render()
From source file:org.apache.openmeetings.service.mail.template.AbstractTemplatePanel.java
License:Apache License
/** * Collects the html generated by the rendering of a page. * // w w w . j a va 2 s . c om * @param panel * the panel that should be rendered. * @return the html rendered by the panel */ protected static CharSequence renderPanel(final Panel panel) { RequestCycle requestCycle = RequestCycle.get(); final Response oldResponse = requestCycle.getResponse(); BufferedWebResponse tempResponse = new BufferedWebResponse(null); try { requestCycle.setResponse(tempResponse); TemplatePage page = new TemplatePage(); page.add(panel); panel.render(); } finally { requestCycle.setResponse(oldResponse); } return tempResponse.getText(); }