do you know whether the request reaches your downloadlink? for example,
you could check it by using:
add(new DownloadLink("download", fileModel) {
@Override
public void onClick() {
System.out.println("onClick of download link called!");
try {
super.onClick();
System.out.println("super onClick was successful");
} catch (Throwable t) {
t.printStackTrace();
}
}
});
or you could debug it of course..
Pablo Scagno wrote:
FYI
--------------------------------------------------
From: "Pablo Scagno" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2008 5:54 PM
To: <users@wicket.apache.org>
Subject: DownloadLink
Hi,
I was trying to use DownloadLink but for some reason I couldn't make
it work.
I'm trying to insert the link in a grid, but when I test the
application and I click the link, an error page appears "The webPage
cannot be found"
this url appears in the page
http://..../?wicket:interface=:7:table:rows:1:cells:2:cell:download::ILinkListener::
here Is the code where I create the link
public class ActionPanel extends Panel{
public ActionPanel(String id, IModel<Document> model){
super(id, model);
try {
File file = ((Document)model.getObject()).getOriginalFile();
IModel<File> fileModel = new Model<File>();
fileModel.setObject(file);
add(new DownloadLink("download",fileModel));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}
I've debug the app and I saw that the file was loaded, and the link
was created without any problem. Can anyone tell me if need anything
else to make it works?
Thanks in advance
Pablo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]