You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wch2001 <wc...@hotmail.com> on 2008/12/15 11:36:38 UTC
Help,How to load and display the file(csv) with popup window?
Dear all,
How can i do to click button to load/dispaly a file (csv) with pop up
window?
like the below, click the image,btn_statistics to dispaly one file (csv) .
# /btn_statistics.gif
The below is my java codes, but it can not work,
Please help me. Thank you a lot.
WebResource importCSV = new WebResource() {
@Override
public IResourceStream getResourceStream() {
File dummy = new File("C:/Documents and
Settings/caihuanw/Desktop/Advertiser_csv/csvFile1.txt");
FileUtility fileUtil = new
FileUtility();
byte[] bytes =
fileUtil.getBytesFromFile(dummy); // get bytes
//remove dummy file
dummy.delete();
return new
ByteArrayResourceStream(bytes, "text/plain");
}
};
importCSV.setCacheable(false);
final ResourceLink rlinkXls = new
ResourceLink("linkToXls", importCSV);
add(rlinkXls);
--
View this message in context: http://www.nabble.com/Help%2CHow-to-load-and-display-the-file%28csv%29-with-popup-window--tp21011528p21011528.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org