Hi,

You can use requestCycle.replaceAllRequestHandlers(new
ResourceRequestHandler(new ByteArrayResource(byteArray))) in your page code.
This will stop the page rendering and will return the byte[] from this
response. You can still configure the ByteArrayResource - filename,
disposition, etc.


On Tue, Feb 19, 2013 at 10:23 AM, Martin Dietze <d...@fh-wedel.de> wrote:

> On Mon, February 18, 2013, Carl-Eric Menzel wrote:
>
> > For generating binaries, I would *really* recommend doing this change.
> > Pages simply are not a good fit for that. Also, it shouldn't be that
> > big of a change, since you're writing to the Response anyway. Within
> > AbstractResource's WriteCallback you're going to use the same Response
> > object, so you can simply copy most of your code over without much
> > change.
>
> IMO the problem is not that much how the response is generated,
> but how the component is already uses within the system. At
> this point creating a download link is simple as it simply is a
> BookmarkableLink to that page with the appropriate page
> parameters. Consequently, the download links are bookmarkable.
> I simply don't know whether any of our users depend on that
> feature. And, apart from that, porting a productive system from
> 1.4.x to 6.6.0 I still expect quite a few more issues, thus I'd
> prefer not to touch code that works.
>
> That brings me back to my question to the developers - are the
> problems I described in my original post 'by design', or would
> at least moving the adding of markup from the end of
> Page.onAfterRender() to an overridable method be a realistic
> option?
>
> Cheers,
>
> M'bert
>
> --
> ----------- / http://herbert.the-little-red-haired-girl.org /
> -------------
> =+=
> Eine Hund hat Herrchen und Frauchen..., eine Katze hat Personal!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to