View source | Discuss this page | Page history | Printable version   

Modules:Legacy FOP Support

Module

Legacy FOP Support is an Openbravo module that provides FOP support for versions starting from 3.0PR19Q2 where FOP was removed from core.

The goal of this project is merely to keep backward compatibility, therefore it is not intended to be actively maintained.

Source code: https://code.openbravo.com/erp/mods/org.openbravo.legacy.service.fop

Changes in code

Before 3.0PR19Q2, it was possible to generate a downloadable PDF from a FOP xml from any servlet extending HttpSecureAppServlet by using renderFO, now those methods are no longer present in HttpSecureAppServlet, they have been moved to this module in org.openbravo.service.fop.FopSecureAppServlet. So the only change to keep old modules working is to change their Servlet's hierarchy.

Before:

 
public class CcpGroupReport extends HttpSecureAppServlet {
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    // ...
    renderFO(xmlFop, request, response);
  }
}

Now:

 
public class CcpGroupReport extends FopSecureAppServlet {
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    // ...
    renderFO(xmlFop, request, response);
  }
}

Retrieved from "http://wiki.openbravo.com/wiki/Modules:Legacy_FOP_Support"

This page has been accessed 770 times. This page was last modified on 30 January 2019, at 09:50. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.