[ 
https://issues.apache.org/jira/browse/OFBIZ-4480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13805064#comment-13805064
 ] 

Chris Howe commented on OFBIZ-4480:
-----------------------------------

Using this works on pdf files because the output stream waits until the end.  
However when using the MacroScreenViewHandler (for text/csv for example), you 
end up putting the servletResponse in the committed state by using 
response.getWriter() or by writing to the output stream.

response.getWriter is the default when using stock ofbiz.  That gets called 
before any action takes place in evaluating the screen.  There would need to be 
an override for that in determining "useOutputStreamNotWriter".

Once that's determined, the Tree Renderer tries to render it's template.  That 
needs to be fixed to match the Screen and Form Renderers.  

Then finally, there is an attempt to render the Screen Begin Macro.

I'm not sure how to best overcome this for use within the OFBiz project going 
forward.  But checking for contentType "text/csv" before each of those issues 
fixes my local setup.  Perhaps using a different View Handler when such 
modifications are needed is best (though Tree Widget Rendering differently than 
the others probably would need to be taken care of).

> Need to have an option to pass file name as OrderId for the generated 
> confirmation or invoice PDF.
> --------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4480
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4480
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: order
>    Affects Versions: SVN trunk
>         Environment: OS - Ubuntu 
>            Reporter: Ganesh Bawne
>              Labels: filename, order, pdf
>         Attachments: orderPdf-FileName.patch
>
>
> Need to have set the order pdf file name to its order number when we open the 
> pdf from backoffice orderdetail page 
> (/ordermgr/control/order.pdf?orderId=XXXXX).
> Currently, the default name of the pdf is always "order.pdf", instead need to 
> have an option to set the default pdf name to its order number?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to