This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 66acac92ef Revert "Added support to allow direct view rendering in 
override view functionality (OFBIZ-13117)"
66acac92ef is described below

commit 66acac92efa6fb950835f863d992fe4fe1c61087
Author: Deepak Dixit <deepak.di...@hotwax.co>
AuthorDate: Fri Jul 19 17:15:13 2024 +0530

    Revert "Added support to allow direct view rendering in override view 
functionality (OFBIZ-13117)"
    
    This reverts commit fe3c06c3fb7ab1abdd6e0dd55220b7192ec2b8c1.
---
 applications/content/webapp/content/WEB-INF/controller.xml    |  2 +-
 framework/webapp/dtd/site-conf.xsd                            | 11 -----------
 .../java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java |  2 --
 .../java/org/apache/ofbiz/webapp/control/RequestHandler.java  |  2 +-
 4 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/applications/content/webapp/content/WEB-INF/controller.xml 
b/applications/content/webapp/content/WEB-INF/controller.xml
index c784650444..a1535f2e84 100644
--- a/applications/content/webapp/content/WEB-INF/controller.xml
+++ b/applications/content/webapp/content/WEB-INF/controller.xml
@@ -1993,7 +1993,7 @@ under the License.
     <view-map name="EditWebSitePathAlias" type="screen" 
page="component://content/widget/WebSiteScreens.xml#EditWebSitePathAlias"/>
     <view-map name="WebSiteContent" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteContent"/>
     <view-map name="WebSiteCMS" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMS"/>
-    <view-map name="WebSiteCMSContent" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMSContent" 
allow-direct-view-rendering="true"/>
+    <view-map name="WebSiteCMSContent" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMSContent"/>
     <view-map name="WebSiteCMSEditor" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMSEditor"/>
     <view-map name="WebSiteCMSMetaInfo" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMSMetaInfo"/>
     <view-map name="WebSiteCMSPathAlias" type="screen" 
page="component://content/widget/WebSiteScreens.xml#WebSiteCMSPathAlias"/>
diff --git a/framework/webapp/dtd/site-conf.xsd 
b/framework/webapp/dtd/site-conf.xsd
index 8007ae636f..1541aeeb3d 100644
--- a/framework/webapp/dtd/site-conf.xsd
+++ b/framework/webapp/dtd/site-conf.xsd
@@ -784,17 +784,6 @@ under the License.
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
-        <xs:attribute type="xs:boolean" name="allow-direct-view-rendering" 
default="false">
-            <xs:annotation>
-                <xs:documentation>
-                    This attribute determines whether direct rendering of the 
view is allowed when using the override view functionality.
-                    If set to true,
-                    the system permits the view to be rendered directly using 
the override view functionality.
-                    If false or not specified,
-                    direct rendering is not allowed, and system throws Unknown 
request exception.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
         <xs:attribute name="x-frame-options" default="sameorigin">
             <xs:annotation>
                 <xs:documentation>
diff --git 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
index 013caf69a5..226514ad35 100644
--- 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
+++ 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
@@ -648,7 +648,6 @@ public class ConfigXMLReader {
         public String strictTransportSecurity;
         public String description;
         public boolean noCache = false;
-        public boolean allowDirectViewRendering = false;
 
         public ViewMap(Element viewMapElement) {
             this.name = viewMapElement.getAttribute("name");
@@ -657,7 +656,6 @@ public class ConfigXMLReader {
             this.info = viewMapElement.getAttribute("info");
             this.contentType = viewMapElement.getAttribute("content-type");
             this.noCache = 
"true".equals(viewMapElement.getAttribute("no-cache"));
-            this.allowDirectViewRendering = 
"true".equals(viewMapElement.getAttribute("allow-direct-view-rendering"));
             this.encoding = viewMapElement.getAttribute("encoding");
             this.xFrameOption = viewMapElement.getAttribute("x-frame-options");
             this.strictTransportSecurity = 
viewMapElement.getAttribute("strict-transport-security");
diff --git 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 379d093ac7..d694ff9b17 100644
--- 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -193,7 +193,7 @@ public class RequestHandler {
             ConfigXMLReader.ViewMap viewMap;
             try {
                 viewMap = 
getControllerConfig().getViewMapMap().get(overrideViewUri);
-                if (viewMap == null || !viewMap.allowDirectViewRendering) {
+                if (viewMap == null) {
                     String defaultRequest = 
controllerConfig.getDefaultRequest();
                     if (defaultRequest != null) { // required! to avoid a null 
pointer exception and generate a requesthandler exception if default request 
not found.
                         requestMap = requestMapMap.get(defaultRequest);

Reply via email to