I have migrated wicket 1.x to wicket 8.x.
I have added below code for excel file download but getting the first downloaded file in all other pages on excel download.
ResourceLink<Object> excelLink = new ResourceLink<>("excel", new ResourceReference("downloadExcel") {
private static final long serialVersionUID = 1L;
@Override
public IResource getResource() {
byte [] exBytes = null;
try {
exBytes = new byte[0]; // Some excel file into byte format
} catch (Exception e) {
e.printStackTrace();
}
return new ByteArrayResource(fileFormat.getContextType(), exBytes, fileName);
}
});
excelLink.setOutputMarkupId(true);
excelLink.add(new Label("excelLabel", new ResourceModel("excelLabel")));
return excelLink;
I am using the same excel download logic in all the other pages with same ResourceLink Id "excel" in all the pages with the same name of all the Excel files in all the pages in the application.
If in case it is maintaining the cache then how can clear the cache to download the correct excel file in each page?
Kindly let me know if anyone can help me to resolve this issue it will be more appreciable.
question from:
https://stackoverflow.com/questions/65834584/downloading-same-excel-file-in-other-wicket-pages 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…