svn commit: r1750303 - in /ofbiz/trunk/specialpurpose/ecommerce: groovyScripts/content/Search.groovy template/content/SearchContent.ftl widget/ContentScreens.xml

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

svn commit: r1750303 - in /ofbiz/trunk/specialpurpose/ecommerce: groovyScripts/content/Search.groovy template/content/SearchContent.ftl widget/ContentScreens.xml

ashish-18
Author: ashish
Date: Mon Jun 27 08:02:38 2016
New Revision: 1750303

URL: http://svn.apache.org/viewvc?rev=1750303&view=rev
Log:
Applied patch from jira issue - OFBIZ-7572 - Remove HtmlFormWrapper dependencies from Content Search screen.
Thanks Ravi for the contribution.

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/content/Search.groovy
    ofbiz/trunk/specialpurpose/ecommerce/template/content/SearchContent.ftl
    ofbiz/trunk/specialpurpose/ecommerce/widget/ContentScreens.xml

Modified: ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/content/Search.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/content/Search.groovy?rev=1750303&r1=1750302&r2=1750303&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/content/Search.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/groovyScripts/content/Search.groovy Mon Jun 27 08:02:38 2016
@@ -27,7 +27,6 @@ import org.ofbiz.base.util.Debug
 import org.ofbiz.base.util.UtilHttp
 import org.ofbiz.content.search.SearchWorker
 import org.ofbiz.product.feature.ParametricSearch
-import org.ofbiz.widget.renderer.html.HtmlFormWrapper
 import org.apache.lucene.search.*
 import org.apache.lucene.index.DirectoryReader
 import org.apache.lucene.store.Directory
@@ -36,16 +35,6 @@ paramMap = UtilHttp.getParameterMap(requ
 queryLine = paramMap.queryLine.toString();
 //Debug.logInfo("in search, queryLine:" + queryLine, "");
 
-formDefFile = page.formDefFile;
-queryFormName = page.queryFormName;
-//Debug.logInfo("in search, queryFormName:" + queryFormName, "");
-queryWrapper = new HtmlFormWrapper(formDefFile, queryFormName, request, response);
-context.queryWrapper = queryWrapper;
-
-listFormName = page.listFormName;
-//Debug.logInfo("in search, listFormName:" + listFormName, "");
-listWrapper = new HtmlFormWrapper(formDefFile, listFormName, request, response);
-context.listWrapper = listWrapper;
 siteId = paramMap.siteId ?: "WebStoreCONTENT";
 //Debug.logInfo("in search, siteId:" + siteId, "");
 featureIdByType = ParametricSearch.makeFeatureIdByTypeMap(paramMap);
@@ -111,5 +100,5 @@ if (searcher) {
             hitSet.add(contentId);
         }
     }
-    listWrapper.putInContext("queryResults", contentList);
+    context.queryResults = contentList;
 }

Modified: ofbiz/trunk/specialpurpose/ecommerce/template/content/SearchContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/content/SearchContent.ftl?rev=1750303&r1=1750302&r2=1750303&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/content/SearchContent.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/content/SearchContent.ftl Mon Jun 27 08:02:38 2016
@@ -97,7 +97,6 @@ under the License.
 
 
 
-    ${listWrapper.renderFormString()}
 
 <#macro listSiteIds contentId indentIndex=0>
   <#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in listSiteIds, contentId:" + contentId,"")/>

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/ContentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/ContentScreens.xml?rev=1750303&r1=1750302&r2=1750303&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/ContentScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/ContentScreens.xml Mon Jun 27 08:02:38 2016
@@ -130,6 +130,7 @@ under the License.
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific><html><html-template location="component://ecommerce/template/content/SearchContent.ftl"/></html></platform-specific>
+                        <include-form name="searchList" location="component://ecommerce/widget/ContentForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>