Re: Adding to response header (filename)?

2007-10-07 Thread Stanczak Group
I've changed it to that below, but still get 18:22:47,185 ERROR WebResponse:190 - Unable to redirect to: ?wicket:interface=:2, HTTP Response has already been committed. in the logs. Isn't this the same as what's in the link you posted? I can post all the code, but all it is is a Link

Re: Adding to response header (filename)?

2007-10-06 Thread Stanczak Group
Well, I still don't see a way to get around this error. I'll have to live with it for now until I can look into it deeper. Has anyone else had this error? Stanczak Group wrote: Instead of setRequestTarget(rsrt) I use this rsrt.respond(getRequestCycle());, is that correct? It does work, but I

Re: Adding to response header (filename)?

2007-10-06 Thread Eelco Hillenius
On 10/6/07, Stanczak Group [EMAIL PROTECTED] wrote: What do you mean? This is all I'm doing, but still get the HTTP Response has already been committed. error. Is there something there that wrong? SimpleDateFormat formatFile = new SimpleDateFormat(MM-dd--HH-MM);

Re: Yanıt: Re: Adding to response header (filename)?

2007-10-06 Thread Stanczak Group
That's what I used to use, but it gives the same error. Do you not get the error in the logs. The error doesn't stop it from working, but I still would like to do it correctly according to Wicket. Ramazan Pekin wrote: I dont know the subject, I didnt follow up, but this code is working.

Re: Adding to response header (filename)?

2007-10-06 Thread Stanczak Group
Oh, then what should I do? Sorry if I'm missing the obvious here. Eelco Hillenius wrote: On 10/6/07, Stanczak Group [EMAIL PROTECTED] wrote: What do you mean? This is all I'm doing, but still get the HTTP Response has already been committed. error. Is there something there that wrong?

Re: Adding to response header (filename)?

2007-10-05 Thread Eelco Hillenius
What do you use for the export? You probably should use a resource. For instance: public class DiscountsExport extends WebResource { public static class Initializer implements IInitializer { public void init(Application application) { SharedResources res =

Re: Adding to response header (filename)?

2007-10-05 Thread Eelco Hillenius
On 10/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote: What do you use for the export? You probably should use a resource. For instance: public class DiscountsExport extends WebResource { public static class Initializer implements IInitializer { public void init(Application

Re: Adding to response header (filename)?

2007-10-05 Thread Stanczak Group
Ya, I like that. I'll give all these a shot. Here's what I setup thus far, before reading these posts. But what you have is much simpler. Thanks. mount(new URIRequestTargetUrlCodingStrategy(/cvs) {

Re: Adding to response header (filename)?

2007-10-05 Thread Stanczak Group
Instead of setRequestTarget(rsrt) I use this rsrt.respond(getRequestCycle());, is that correct? It does work, but I get this in the logs 08:53:03,277 ERROR WebResponse:190 - Unable to redirect to: ?wicket:interface=:2, HTTP Response has already been committed.. It works, but I wouldn't

Re: Adding to response header (filename)?

2007-10-04 Thread Stanczak Group
This works: getWebRequestCycle().getWebResponse().setContentType(text/csv); getWebRequestCycle().getWebResponse().setHeader(Content-Disposition, attachment;filename=\export_ + formatFile.format(Calendar.getInstance().getTime()) + .csv\);

Re: Adding to response header (filename)?

2007-10-04 Thread Stanczak Group
This maybe? Should I be using getWebRequestCycle().getWebResponse() instead of getResponse().? getWebRequestCycle().getWebResponse().setHeader() Stanczak Group wrote: How can I do this in Wicket? I'm writing a csv generated file to the output, but I don't know how to tell the client what file