You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Si Chen <si...@opensourcestrategies.com> on 2007/03/20 19:32:39 UTC
default content type for new ScreenFopViewHandler
Hi Jacopo, Dave -
I noticed you put in a new ScreenFopViewHandler with a specifiable
content-type flag, and it defaults to "application/pdf":
+ if (UtilValidate.isEmpty(contentType)) {
+ contentType = "application/pdf";
+ }
+
However, I've noticed that the if you don't fill in the content-type on
the <view-map>, a default of "text/html" is passed, instead of a null or
empty value.
Should we change the ScreenFopViewHandler to override "text/html" with
"application/pdf" as well?
Si
Re: default content type for new ScreenFopViewHandler
Posted by Jacopo Cappellato <ti...@sastau.it>.
Si,
thanks for the good catch.
I'd say for now we can explicitly set the content-type for all the pdf
report to "application/pdf"; I just did it in rev. 520526
Jacopo
Si Chen wrote:
> Hi Jacopo, Dave -
>
> I noticed you put in a new ScreenFopViewHandler with a specifiable
> content-type flag, and it defaults to "application/pdf":
>
> + if (UtilValidate.isEmpty(contentType)) {
> + contentType = "application/pdf";
> + }
> +
> However, I've noticed that the if you don't fill in the content-type on
> the <view-map>, a default of "text/html" is passed, instead of a null or
> empty value.
>
> Should we change the ScreenFopViewHandler to override "text/html" with
> "application/pdf" as well?
>
> Si