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: [email protected]
For additional commands, e-mail: [email protected]