Please create a quickstart and attach it to Jira. On Wed, Nov 9, 2011 at 2:48 PM, hfriederichs <h.friederi...@ohra.nl> wrote: > I managed to pinpoint my issue. I'm starting a new topic in order to exclude > information I > now think isn't relevant anymore. > I don't think it's a caching problem any longer, but that is has to do with > a hanging > thread or something that's not closed properly, that is, when using Firefox > and Chrome. > In IE8: no problems, works as it did in 1.4.18 with the Wicket > ResourceStreamRequestTarget. > My code again: > > Link<String> downloadInstallationmanualButton = new > Link<String>("downloadinstallationmanual", new Model<String>()) { > > @Override > public void onClick() { > if (user didn't supply any data) { > info("Please supply this and that"); > return; > } > //create an subclass of AbstractResourceStream called > InstallationManualResourceStream > InstallationManualResourceStream theInstallationManualResourceStream > = new InstallationManualResourceStream(); > if (theInstallationManualResourceStream.manualNotfound) { > info("No manual found for your input"); > return; > } > ResourceStreamRequestTarget resourceStreamRequestTarget = new > ResourceStreamRequestTarget( > theInstallationManualResourceStream, > theFileName); > RequestCycle.get().setRequestTarget(resourceStreamRequestTarget); > } > > (The underlying InputStream is closed properly, even in Firefox.) > The problem is in the last statement: > /RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);/ > This statement causes something to hang, so that in a new RequestCycle, the > onclick() isn't > fired anymore (and never again). When I omit this statement, the onClick() > fires each time. > > I don't think I'm doing something wrong, certainly not after I discovered > that it works in IE8. > > Maybe this is relevant: the underlying InputStream is part of a > ZipInputstream. Bij 'newing' my > InstallationManualResourceStream, the ZipInputStream is read until an > installation manual is found (hence > the /theInstallationManualResourceStream.manualNotfound()/ and it's info > message), > and then 'handed over' to the Wicket AbstractResourceStream. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4019661.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org