[ofbiz-framework] branch trunk updated: Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1d391df  Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
1d391df is described below

commit 1d391df2f023e273f95f820fd7400ecbed5bfe25
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Wed Jul 15 20:56:08 2020 +0200

    Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
   
    At https://markmail.org/message/n76cchtriexxmgm7 I asked
   
    Why having the ftl handlers only in webtools controller? BTW it makes the XSD
    documentation awkward because it speaks about the ftl handlers being in
    handlers-controller.xml
    Why not using error.ftl in common-controller.xml instead of error.jsp?
    Same question for plugins.
   
    And answered
   
    I believe we could change all that and definitely get rid of error.jsp
    (error.ftl is already in all supported releases branches)
---
 framework/common/webcommon/WEB-INF/common-controller.xml   | 2 +-
 framework/common/webcommon/WEB-INF/handlers-controller.xml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/framework/common/webcommon/WEB-INF/common-controller.xml b/framework/common/webcommon/WEB-INF/common-controller.xml
index e6f9394..9291cdb 100644
--- a/framework/common/webcommon/WEB-INF/common-controller.xml
+++ b/framework/common/webcommon/WEB-INF/common-controller.xml
@@ -338,7 +338,7 @@ under the License.
     <!--========================== AJAX events =====================-->
 
     <!-- View Mappings -->
-    <view-map name="error" page="/error/error.jsp"/>
+    <view-map name="error" type="ftl" page="component://common/webcommon/error/Error.ftl"/>
     <view-map name="main" type="none"/>
     <view-map name="login" type="screen" page="component://common/widget/CommonScreens.xml#login"/>
     <view-map name="impersonated" type="screen" page="component://common/widget/CommonScreens.xml#impersonated"/>
diff --git a/framework/common/webcommon/WEB-INF/handlers-controller.xml b/framework/common/webcommon/WEB-INF/handlers-controller.xml
index be21b19..1622d10 100644
--- a/framework/common/webcommon/WEB-INF/handlers-controller.xml
+++ b/framework/common/webcommon/WEB-INF/handlers-controller.xml
@@ -42,4 +42,5 @@ under the License.
     <handler name="screenfop" type="view" class="org.apache.ofbiz.widget.renderer.fo.ScreenFopViewHandler"/>
     <handler name="jsp" type="view" class="org.apache.ofbiz.webapp.view.JspViewHandler"/>
     <handler name="http" type="view" class="org.apache.ofbiz.webapp.view.HttpViewHandler"/>
+    <handler name="ftl" type="view" class="org.apache.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
 </site-conf>