wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Dobsai <roland.dob...@gmail.com>
Subject replace getRequestCycle().scheduleRequestHandlerAfterCurrent
Date Mon, 26 Jan 2015 13:45:01 GMT
Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent,
various places in our application which causes 500 error, is there any we
to replace, lines  below because my solution which is:
String url = RequestCycle.get().urlFor(rs).toString();
              throw new RedirectToUrlException(url);
doesn't work.

///
ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(
new StringResourceStream(work, "text/csv"));
                rs.setFileName("Workdone_" +
projectModel.getObject().getName().replaceAll("[^a-zA-Z0-9]", "") + ".csv");

this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs);

or another example I was trying to replace

ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new
FileResourceStream(new File(file.getAbsolutePath())));
          rs.setFileName(df.getFileName());
            this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs);

with this, but doesnt work either:
String url = (RequestCycle.get().urlFor(rs)).toString();
   throw new RedirectToUrlException(url);

thanks for any help

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message