I have TabbedPanels contain lazyloadpanels imbedded in a panel.
In IE it doesn't show any data in the popup window whereas in firefox it
prompts error: "*Last cause: ResourceResponse#setWriteCallback() must be
set.*" in the first tab and works fine in other tabs.
here is snippet:

ResourceLink<Void> pdfLink = new ResourceLink<Void>("pdfLink", new
AbstractResource(){
                    @Override
                     protected ResourceResponse newResourceResponse(Attributes 
attributes)
                     {
                       ResourceResponse r = new ResourceResponse();
                      try {
                          final byte[] pdfBytes = getPDF();
                        
                       r.setFileName(DynamicFileName+".pdf");
                       r.setContentType("application/pdf");
                       r.setContentDisposition(ContentDisposition.INLINE);
                       r.setContentLength(pdfBytes.length);
                     *  r.setWriteCallback*(new WriteCallback(){
                         @Override
                         public void writeData(Attributes attributes)
                         {
                                 attributes.getResponse().write(pdfBytes);
                         }
                       });
                       r.disableCaching();
                      } catch (Exception e) {
                        e.printStackTrace();}
                       return r;     }   });
PopupSettings popupSettings = new PopupSettings(FILENAME,
PopupSettings.RESIZABLE
                                | 
PopupSettings.SCROLLBARS).setHeight(500).setWidth(700);
pdfLink.setPopupSettings(popupSettings);

I'm also generating Excel file and using exact same structure as pdf one but
works as expect.
Anyone knows why?
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractResource-not-writing-PDF-resource-to-IE-tp4655978.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]

Reply via email to