Re: Stream/download files through portlet

2009-05-08 Thread Bruno Ledesma
Hello All! Im facing problems trying to Stream/download files through portlet. I also used DynamicWebResource and a Resource link to serve the Resource Data. On a simple Wicket application everything works fine, but when my war is deployed as a portlet into a Liferay 5 instance, it doesnt work.

Re: Stream/download files through portlet

2009-05-08 Thread Bruno Ledesma
Solved. Its a Liferay issue. http://issues.liferay.com/browse/LPS-1911 I was using portlet names and filter-mapping with a - char. I have to use the same string value for the portlet name and the filter-mapping stuff... without the - char, cause liferay (i dont have idea why) removes this

Re: Stream/download files through portlet

2008-10-15 Thread Rob Sonke
Thijs and I debugged the code together this morning because when he read this thread he was sure that both options (overriding setheaders and onclick) should work. After some debugging we found a bug in Liferay which could be easily fixed in our used version. The current (5.1.2) version has a

Re: Stream/download files through portlet

2008-10-14 Thread Serkan Camurcuoglu
For the DynamicWebResource case, doesn't overriding setHeaders() in DynamicWebResource and adding your http header in this method work? By the way, which portlet container are you working with? Rob Sonke wrote: Hi, We're using wicket for our portlets now for almost 3/4 year and it's

Re: Stream/download files through portlet

2008-10-14 Thread Rob Sonke
Thanks for your answer. I think overriding the setHeaders will end up with the same result as with adding the filename through the constructor of DynamicWebResource but I'll try it in some minutes. We're using Liferay as the portal. Rob Serkan Camurcuoglu wrote: For the DynamicWebResource

Re: Stream/download files through portlet

2008-10-14 Thread Rob Sonke
No, too bad. The headers aren't picked up. Serkan Camurcuoglu wrote: For the DynamicWebResource case, doesn't overriding setHeaders() in DynamicWebResource and adding your http header in this method work? By the way, which portlet container are you working with? Rob Sonke wrote: Hi,

Re: Stream/download files through portlet

2008-10-14 Thread Serkan Camurcuoglu
In the PLT.12.1.1 section of jsr 286 it says: Response properties can be viewed as header values set for the portal application. If these header values are intended to be transmitted to the client they should be set before the response is committed. When setting headers in the render lifecycle

Re: Stream/download files through portlet

2008-10-14 Thread Rob Sonke
Awesome! I was pretty sure that I tried that too but probably not in combination with other changes. I have overridden the onclick like this: ResourceLink link = new ResourceLink(downloadLink, resource) { /* (non-Javadoc) * @see