Skip to content
Permalink
Browse files

Improved: Improve error message page to support Theming

(OFBIZ-10753)

When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it

On controler.xml we can now use :
    <errorpage>/error/error.jsp</errorpage>
or 
    <errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)

On your theme you can add your own error page :
    <template> 
      ...
      <template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
    + <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
    </template>

The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.

Thanks to Marine Desmarchelier for the error page design

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Mar 25, 2019
1 parent ee75d89 commit 2e1cacb2a88183f9d29d4eb4a44aec74f845162b
Showing with 643 additions and 877 deletions.
  1. +0 −52 applications/accounting/webapp/accounting/error/error.jsp
  2. +0 −52 applications/accounting/webapp/ap/error/error.jsp
  3. +0 −52 applications/accounting/webapp/ar/error/error.jsp
  4. +0 −52 applications/commonext/webapp/ofbizsetup/error/error.jsp
  5. +0 −52 applications/content/webapp/content/error/error.jsp
  6. +0 −52 applications/humanres/webapp/humanres/error/error.jsp
  7. +0 −52 applications/manufacturing/webapp/manufacturing/error/error.jsp
  8. +0 −53 applications/marketing/webapp/marketing/error/error.jsp
  9. +0 −53 applications/marketing/webapp/sfa/error/error.jsp
  10. +0 −52 applications/order/webapp/ordermgr/error/error.jsp
  11. +0 −53 applications/party/webapp/partymgr/error/error.jsp
  12. +0 −53 applications/product/webapp/catalog/error/error.jsp
  13. +0 −53 applications/product/webapp/facility/error/error.jsp
  14. +0 −53 applications/workeffort/webapp/workeffort/error/error.jsp
  15. +1 −1 framework/common/webcommon/WEB-INF/common-controller.xml
  16. +42 −0 framework/common/webcommon/error/Error.ftl
  17. +0 −53 framework/resources/templates/error.jsp
  18. +61 −31 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java
  19. +10 −5 framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
  20. +0 −52 framework/webtools/webapp/webtools/error/error.jsp
  21. +2 −1 framework/widget/dtd/widget-theme.xsd
  22. +17 −0 framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
  23. +509 −0 themes/common-theme/template/ErrorPage.ftl
  24. +1 −0 themes/common-theme/widget/Theme.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 2e1cacb

Please sign in to comment.
You can’t perform that action at this time.