Hi, There is an example of rendering a Panel at http://www.wicket-library.com/wicket-examples/mailtemplate This is Wicket 1.5
On Tue, Nov 29, 2011 at 9:23 AM, nazeem <md.naz...@gmail.com> wrote: > I had worked around the problem by modifying the js to not to duplicate > content and instead to remove the original content and show in popup. Later > on closing it puts back the content on the same node. > > But in any case, i would like to know how to convert a component to rendered > html string. > > public String renderToHtmlString(Component c) { > System.out.println("> current request cycle : " + > getRequestCycle()); > Response orgResponse = RequestCycle.get().getResponse(); > StringResponse strResponse = new StringResponse(); > RequestCycle.get().setResponse(strResponse); > try { > Page page = c.getPage(); > if(page != null) { > page.startComponentRender(c); > } > c.prepareForRender(); > c.renderComponent(); > if(page != null) { > page.endComponentRender(c); > } > } > catch(Exception e) { > c.afterRender(); > e.printStackTrace(); > } > RequestCycle.get().setResponse(orgResponse); > return strResponse.toString(); > } > > > Do u see any problem with this ? Is there any way to render a component > without a page ? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/duplicate-form-js-modal-window-tp4110289p4118384.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com