ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-10753) Improve error message page to support Theming
Date Sat, 01 Feb 2020 10:09:00 GMT

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

ASF subversion and git services commented on OFBIZ-10753:

Commit 2342e0e8bc213d73ef0b6c88335072b1dde1eac2 in ofbiz-framework's branch refs/heads/release18.12
from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2342e0e ]

Improved: Improve error message page to support Theming

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>component://common/webcommon/error/Error.ftl</errorpage> (default

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

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

> Improve error message page to support Theming
> ---------------------------------------------
>                 Key: OFBIZ-10753
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10753
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Major
>         Attachments: OFBIZ-10753.patch, Sélection_224.png
> Currently when OFBiz raise an error, we use a jsp page to display it.
> On common-controler.xml :
> {code:java}
> <errorpage>/error/error.jsp</errorpage>{code}
> This method isn't support by the theming. I propose two improvements :
>  * use FlexibleLocation to resolve the error page :
> {code:java}
> <errorpage>component://common/webcommon/error/error.ftl</errorpage>{code}
>  * improve theme to support the error message page   
> {code:java}
>   <template name="screen" type="html" content-type="UTF-8" encoding="none" encoder="html"
>   <template-file widget="screen" location="component://common-theme/template/macro/HtmlScreenMacroLibrary.ftl"/>
>   <template-file widget="form" location="component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
>   <template-file widget="tree" location="component://common-theme/template/macro/HtmlTreeMacroLibrary.ftl"/>
>   <template-file widget="menu" location="component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl"/>
> + <template-file widget="error" location="component://common-theme/template/ErrorPage.ftl"/>
> </template>{code}
> By the way you can define your error page by the theme in first step and we would use
the rendering type in future to display the error no only in html

This message was sent by Atlassian Jira

View raw message