You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2008/06/23 20:38:04 UTC
svn commit: r670704 - in /ofbiz/trunk:
framework/common/src/org/ofbiz/common/FindServices.java
framework/widget/config/widget.properties
specialpurpose/assetmaint/widget/AssetmaintScreens.xml
Author: adrianc
Date: Mon Jun 23 11:38:04 2008
New Revision: 670704
URL: http://svn.apache.org/viewvc?rev=670704&view=rev
Log:
Better implementation of last commit, based on a suggestion by David Jones.
No additional screen widget code is needed to implement the Find screen search results default behavior.
Modified:
ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
ofbiz/trunk/framework/widget/config/widget.properties
ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=670704&r1=670703&r2=670704&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Mon Jun 23 11:38:04 2008
@@ -32,6 +32,7 @@
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
@@ -400,6 +401,10 @@
// try finding in inputFields Map
noConditionFind = (String) inputFields.get("noConditionFind");
}
+ if (UtilValidate.isEmpty(noConditionFind)) {
+ // Use configured default
+ noConditionFind = UtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind");
+ }
String filterByDate = (String) context.get("filterByDate");
if (UtilValidate.isEmpty(filterByDate)) {
// try finding in inputFields Map
@@ -451,6 +456,10 @@
// try finding in inputFields Map
noConditionFind = (String) inputFields.get("noConditionFind");
}
+ if (UtilValidate.isEmpty(noConditionFind)) {
+ // Use configured default
+ noConditionFind = UtilProperties.getPropertyValue("widget", "widget.defaultNoConditionFind");
+ }
String filterByDate = (String) context.get("filterByDate");
if (UtilValidate.isEmpty(filterByDate)) {
// try finding in inputFields Map
Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=670704&r1=670703&r2=670704&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Mon Jun 23 11:38:04 2008
@@ -30,4 +30,4 @@
# search result list will be populated when the Find screen first appears.
# If set to N, the search result list will be empty when the Find screen
# first appears.
-widget.findscreen.initial.results=N
+widget.defaultNoConditionFind=Y
Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml?rev=670704&r1=670703&r2=670704&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/AssetmaintScreens.xml Mon Jun 23 11:38:04 2008
@@ -50,8 +50,6 @@
<actions>
<set field="headerItem" value="fixedAssetMaints"/>
<set field="titleProperty" value="PageTitleFindFixedAssetMaints"/>
- <property-to-field field="initialResultsProp" resource="widget" property="widget.findscreen.initial.results"/>
- <set field="noConditionFind" from-field="parameters.noConditionFind" default-value="${initialResultsProp}"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">