You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Boydens Joeri (OZ)" <jo...@oz.be> on 2010/03/02 15:34:12 UTC
ResourceLink with pagerefresh(update)
Hello,
I've created an ResourceLink wich shows the user a download window for
the PDF resource.
Now I want the page to be refreshed when the user clicks the link so I
can update the page and show the user he clicked this link. How would I
do this ?
Regards
Joeri
ResourceLink<Void> pdfAanvragenLink = new
ResourceLink<Void>("pdfAanvragenLink", new
DynamicWebResource(documentVO.getDocumentNaam() + "_" +
documentVO.getDocumentId() + ".pdf") {
/**
* serialVersionUID
* Aangepast door: C501BBJO op 2-mrt-2010 -
14:29:13
*/
private static final long
serialVersionUID = 4564654656L;
/* (non-javadoc)
* @see
org.apache.wicket.markup.html.WebResource#getCacheDuration()
* Aangepast door: C501BBJO op 2-mrt-2010 -
14:44:39
*/
protected int getCacheDuration() {
return 30;
}
/* (non-javadoc)
* @see
org.apache.wicket.markup.html.DynamicWebResource#getResourceState()
* Aangepast door: C501BBJO op 2-mrt-2010 -
14:44:44
*/
protected ResourceState getResourceState()
{
return new ResourceState() {
public byte[] getData() {
return
getPDFAsByteArray();
}
public String getContentType()
{
return "application/pdf";
}
};
}
}) ;