Hi, Try this....
https://github.com/reiern70/antilia-bits/tree/master/content-iframe On Tue, Feb 18, 2014 at 1:04 PM, BenHoit <[email protected]>wrote: > in wicket 1.4, i used an IndicatingAjaxLink and in onClick method, i asked > my > database, get a String, transform it in a byte[] and used > DocumentInlineFrame with an XmlResource class extended DynamicWebResource > > import org.apache.wicket.markup.html.DynamicWebResource; > > public class MyXmlResource extends DynamicWebResource { > private static final long serialVersionUID = 1L; > private byte[] myXml; > > public MyXmlResource(byte[] thisXml) { > this.myXml = thisXml; > } > > /* (non-Javadoc) > * @see > org.apache.wicket.markup.html.DynamicWebResource#getResourceState() > */ > @Override > protected ResourceState getResourceState() { > return new ResourceState() { > > @Override > public String getContentType() { > return "application/xml"; > } > > @Override > public byte[] getData() { > try { > return myXml; > > } catch (Exception e) { > return null; > } > } > }; > } > } > > public class OdyReqTargetPanel extends Panel { > private static final long serialVersionUID = 1L; > public OdyReqTargetPanel(String id,byte[] res) { > super(id); > //setRenderBodyOnly(true); > add(new DocumentInlineFrame("mypdf", new MyXmlResource(res))); > } > } > > in wicket 6.9.1, DynamicWebResource doesn't exist any more ... and i don't > know what i can use > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664530.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] > > -- Regards - Ernesto Reinaldo Barreiro
