You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/03/27 09:04:35 UTC

svn commit: r522793 [1/4] - in /ofbiz/trunk/framework/webtools: config/ webapp/webtools/WEB-INF/ webapp/webtools/WEB-INF/actions/datafile/ webapp/webtools/WEB-INF/actions/entity/ webapp/webtools/WEB-INF/actions/period/ webapp/webtools/WEB-INF/actions/s...

Author: jacopoc
Date: Tue Mar 27 00:04:31 2007
New Revision: 522793

URL: http://svn.apache.org/viewvc?view=rev&rev=522793
Log:
Refactoring of the webtools application: all the remaining region pages have been migrated to screen widgets, with jsp artifacts transformed in bsh/ftl ones. Many thanks to Adrian Crum (et others, see OFBIZ-771 for details) for this work; I've also removed a few more files no more needed after the above changes. This is a Commit-Then-Review commit, I did quick tests and everything looks fine (there is place for improvements on layout, especially in the entity maintenance screens), but since all these changes are about the ui, I think it is not so bad to follow this approach and let the community to do more tests on it.

Added:
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsdump.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/performance/EntityPerformanceTest.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/period/EditCustomTimePeriod.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/stats/StatBinsHistory.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/stats/StatsSinceStart.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/workflow/readxpdl.ftl   (with props)
    ofbiz/trunk/framework/webtools/webapp/webtools/workflow/workflowMonitor.ftl   (with props)
    ofbiz/trunk/framework/webtools/widget/StatsScreens.xml   (with props)
Removed:
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/regions.tld
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/regions.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/footer.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/header.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/messages.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/templates/
Modified:
    ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.bsh
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/cache/editUtilCache.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCache.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCacheElements.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/component/viewComponents.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/datafile/viewdatafile.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/EntityMaint.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/ViewRelations.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/appbar.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/includes/appheader.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/log/LogForms.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/performance/EntityPerformanceTest.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/period/EditCustomTimePeriod.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/service/jobs.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/service/serviceTabBar.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/service/services.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/service/threads.ftl
    ofbiz/trunk/framework/webtools/webapp/webtools/stats/StatBinsHistory.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/stats/StatsSinceStart.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/workflow/readxpdl.jsp
    ofbiz/trunk/framework/webtools/webapp/webtools/workflow/workflowMonitor.jsp
    ofbiz/trunk/framework/webtools/widget/CacheScreens.xml
    ofbiz/trunk/framework/webtools/widget/CommonScreens.xml
    ofbiz/trunk/framework/webtools/widget/EntityScreens.xml
    ofbiz/trunk/framework/webtools/widget/MiscScreens.xml
    ofbiz/trunk/framework/webtools/widget/ServiceScreens.xml

Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties?view=diff&rev=522793&r1=522792&r2=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties (original)
+++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.properties Tue Mar 27 00:04:31 2007
@@ -237,7 +237,7 @@
 WebtoolsSelectDispatcher=Select Dispatcher
 WebtoolsServerHitStatisticsTools=Server Hit Statistics Tools
 WebtoolsService=Service
-WebtoolsServiceECA=Service ECA's
+WebtoolsServiceECA=Service ECAs
 WebtoolsServiceEngineTools=Service Engine Tools
 WebtoolsServiceList=Service List
 WebtoolsServiceLog=Service Log
@@ -250,6 +250,31 @@
 WebtoolsSizeTotal=Size Total
 WebtoolsSpecifiedEntity1=Specified Entity
 WebtoolsSpecifiedEntity2=was not found
+
+WebtoolsStatsMainPageTitle=Server Statistics Since Start
+WebtoolsStatsBinsPageTitle=Server Statistic Bins History Page
+WebtoolsStatsBinsErrorMsg=The type specified was not valid.
+WebtoolsStatsClearSince=Clear Since Start Stats
+WebtoolsStatsReloadPage=Reload Page
+WebtoolsStatsCurrentTime=Current Time
+WebtoolsStatsRequestStats=Request Statistics
+WebtoolsStatsRequestId=Request ID
+WebtoolsStatsStart=Start
+WebtoolsStatsStop=Stop
+WebtoolsStatsMinutes=Mins
+WebtoolsStatsHits=Hits
+WebtoolsStatsMin=Min
+WebtoolsStatsAvg=Avg
+WebtoolsStatsMax=Max
+WebtoolsStatsHitsPerMin=Hits/Minute
+WebtoolsStatsNoRequests=No Request statistics found.
+WebtoolsStatsEventStats=Event Statistics
+WebtoolsStatsNoEvents=No Event statistics found.
+WebtoolsStatsViewStats=View Statistics
+WebtoolsStatsNoViews=No View statistics found.
+WebtoolsStatsViewBins=View Bins
+WebtoolsStatsPermissionMsg=You do not have permission to view this page (SERVER_STATS_VIEW needed).
+
 WebtoolsStatusInvalid=Invalid Status
 WebtoolsStatusRunning=Running
 WebtoolsStatusShuttingDown=Shutting down

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.net.*;
+import org.ofbiz.security.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.datafile.*;
+
+List messages = new LinkedList();
+
+String dataFileSave = request.getParameter("DATAFILE_SAVE");
+
+String entityXmlFileSave = request.getParameter("ENTITYXML_FILE_SAVE");
+
+String dataFileLoc = request.getParameter("DATAFILE_LOCATION");
+String definitionLoc = request.getParameter("DEFINITION_LOCATION");
+String definitionName = request.getParameter("DEFINITION_NAME");
+boolean dataFileIsUrl = request.getParameter("DATAFILE_IS_URL")!=null?true:false;
+boolean definitionIsUrl = request.getParameter("DEFINITION_IS_URL")!=null?true:false;
+
+URL dataFileUrl = null;
+try {
+    dataFileUrl = dataFileIsUrl?new URL(dataFileLoc):UtilURL.fromFilename(dataFileLoc);
+}
+catch (java.net.MalformedURLException e) {
+    messages.add(e.getMessage());
+}
+
+URL definitionUrl = null;
+try {
+    definitionUrl = definitionIsUrl?new URL(definitionLoc):UtilURL.fromFilename(definitionLoc);
+}
+catch (java.net.MalformedURLException e) {
+    messages.add(e.getMessage());
+}
+
+Iterator definitionNames = null;
+if (definitionUrl != null) {
+    ModelDataFileReader reader = ModelDataFileReader.getModelDataFileReader(definitionUrl);
+    if (reader != null) {
+        definitionNames = ((Collection)reader.getDataFileNames()).iterator();
+    }
+}
+  
+DataFile dataFile = null;
+if (dataFileUrl != null && definitionUrl != null && definitionName != null && definitionName.length() > 0) {
+    try {
+        dataFile = DataFile.readFile(dataFileUrl, definitionUrl, definitionName);
+        context.put("dataFile", dataFile);
+    }
+    catch (Exception e) {
+        messages.add(e.toString()); Debug.log(e);
+    }
+}
+
+ModelDataFile modelDataFile = null;
+if (dataFile != null) {
+    modelDataFile = dataFile.getModelDataFile();
+    context.put("modelDataFile", modelDataFile);
+}
+
+if (dataFile != null && dataFileSave != null && dataFileSave.length() > 0) {
+    try {
+        dataFile.writeDataFile(dataFileSave);
+        messages.add("Data File saved to: " + dataFileSave);
+    }
+    catch (Exception e) {
+        messages.add(e.getMessage());
+    }
+}
+
+if (dataFile != null && entityXmlFileSave != null && entityXmlFileSave.length() > 0) {
+    try {
+        //dataFile.writeDataFile(entityXmlFileSave);
+        DataFile2EntityXml.writeToEntityXml(entityXmlFileSave, dataFile);
+        messages.add("Entity File saved to: " + entityXmlFileSave);
+    }
+    catch (Exception e) {
+        messages.add(e.getMessage());
+    }
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.text.DecimalFormat;
+import java.util.*;
+import org.ofbiz.base.util.cache.UtilCache;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.security.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+
+DecimalFormat decimalFormat = new DecimalFormat("#,##0.#######");
+
+if (security.hasPermission("ENTITY_MAINT", session)) {
+    double startTime, totalTime, callsPerSecond;
+    int calls;
+    List performanceList = new ArrayList();
+
+    calls = 1000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        GenericValue dummy = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", "GZ-1000"));
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+    
+    Map perfRow = new HashMap();
+    perfRow.put("operation", "findByPrimaryKey");
+    perfRow.put("entity", "Large:Product");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 10000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        GenericValue dummy = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", "GZ-1000"));
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "findByPrimaryKeyCache");
+    perfRow.put("entity", "Large:Product");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 1000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        GenericValue dummy = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", "_NA_"));
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "findByPrimaryKey");
+    perfRow.put("entity", "Small:Party");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 10000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        GenericValue dummy = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", "_NA_"));
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "findByPrimaryKeyCache");
+    perfRow.put("entity", "Small:Party");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+  	List createTestList = new ArrayList();
+    calls = 1000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) { 
+        GenericValue dummy = delegator.makeValue("Product", UtilMisc.toMap("autoCreateKeywords", "N", "description", "Initial Description", "internalName", "Auto-Test Name", "productId", "_~WRITE_TEST~_" + i));
+        createTestList.add(dummy); 
+        delegator.create(dummy);
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "create");
+    perfRow.put("entity", "Large:Product");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 1000;
+    startTime = (double) System.currentTimeMillis();    
+    for (int i=0; i < calls; i++) { 
+        GenericValue dummy = (GenericValue) createTestList.get(i); 
+        dummy.set("description", "This was a test from the performace BSH");
+        dummy.store();
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "update");
+    perfRow.put("entity", "Large:Product");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 1000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) { 
+        GenericValue dummy = (GenericValue) createTestList.get(i); 
+        dummy.remove();
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "remove");
+    perfRow.put("entity", "Large:Product");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 100000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        Map ptyMap = new HashMap();
+        ptyMap.put("partyId", "_NA_");
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "new HashMap");
+    perfRow.put("entity", "N/A");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 100000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        Map ptyMap = UtilMisc.toMap("partyId", "_NA_");
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "UtilMisc.toMap");
+    perfRow.put("entity", "N/A");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    UtilCache utilCache = new UtilCache("test-cache", 0,0, false);
+    utilCache.put("testName", "testValue");
+    calls = 1000000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        utilCache.get("testName");
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "UtilCache.get(String) - basic settings");
+    perfRow.put("entity", "N/A");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    GenericPK testPk = delegator.makePK("Party", UtilMisc.toMap("partyId", "_NA_"));
+    utilCache.put(testPk, "testValue");
+    calls = 1000000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        utilCache.get(testPk);
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "UtilCache.get(GenericPK) - basic settings");
+    perfRow.put("entity", "N/A");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    calls = 1000000;
+    startTime = (double) System.currentTimeMillis();
+    for (int i=0; i < calls; i++) {
+        utilCache.put(testPk, "testValue");
+    }
+    totalTime = (double) System.currentTimeMillis() - startTime;
+    callsPerSecond = (double) calls / (totalTime/1000);
+
+    perfRow = new HashMap();
+    perfRow.put("operation", "UtilCache.put(GenericPK) - basic settings");
+    perfRow.put("entity", "N/A");
+    perfRow.put("calls", decimalFormat.format(calls));
+    perfRow.put("seconds", decimalFormat.format(totalTime/1000));
+    perfRow.put("secsPerCall", decimalFormat.format(1/callsPerSecond));
+    perfRow.put("callsPerSecond", decimalFormat.format(callsPerSecond));
+    performanceList.add(perfRow);
+
+    context.put("performanceList", performanceList);
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.bsh?view=diff&rev=522793&r1=522792&r2=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.bsh (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.bsh Tue Mar 27 00:04:31 2007
@@ -31,37 +31,3 @@
 }
 context.put("encodeUrlList", response.encodeURL(list));
 context.put("encodeUrlMain", response.encodeURL(main));
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-String controlPath = (String)request.getAttribute("_CONTROL_PATH_");
-String list = controlPath + "/view/entityref_list";
-String main = controlPath + "/view/entityref_main";
-String search = (String)request.getParameter("search");
-String forstatic = (String)request.getParameter("forstatic");
-
-if (search != null) {
-    list = list + "?search=" + search;
-    main = main + "?search=" + search;
-} else if (forstatic != null) {
-    list = list + "?forstatic=" + forstatic;
-    main = main + "?forstatic=" + forstatic;
-}
-context.put("encodeUrlList", response.encodeURL(list));
-context.put("encodeUrlMain", response.encodeURL(main));

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,330 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.io.*;
+import java.net.*;
+import org.ofbiz.base.util.collections.OrderedSet;
+import org.w3c.dom.*;
+import org.ofbiz.security.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.webapp.pseudotag.*;
+import org.ofbiz.entity.model.*;
+import org.ofbiz.entity.util.*;
+import org.ofbiz.entity.transaction.*;
+import org.ofbiz.entity.condition.*;
+
+String outpath = request.getParameter("outpath");
+String filename = request.getParameter("filename");
+String maxRecStr = request.getParameter("maxrecords");
+String entitySyncId = request.getParameter("entitySyncId");
+String[] entityName = request.getParameterValues("entityName");
+String entityFrom = request.getParameter("entityFrom");
+String entityThru = request.getParameter("entityThru");
+
+// get the max records per file setting and convert to a int
+int maxRecordsPerFile = 0;
+if (UtilValidate.isNotEmpty(maxRecStr)) {
+    try {
+        maxRecordsPerFile = Integer.parseInt(maxRecStr);
+    }
+    catch (Exception e) {
+    }
+}
+
+Set passedEntityNames = new TreeSet();
+if (entityName != null && entityName.length > 0) {
+  for(int inc=0; inc<entityName.length; inc++) {
+    passedEntityNames.add(entityName[inc]);
+  }
+}
+  
+String preConfiguredSetName = request.getParameter("preConfiguredSetName");
+if ("Product1".equals(preConfiguredSetName)) {
+    passedEntityNames = new OrderedSet();
+    passedEntityNames.add("DataResource");
+    passedEntityNames.add("Facility");
+    passedEntityNames.add("ProdCatalog");
+    passedEntityNames.add("Product");
+    passedEntityNames.add("ProductCategory");
+    passedEntityNames.add("ProductFeatureCategory");
+    passedEntityNames.add("ProductFeatureType");
+    passedEntityNames.add("ProductPriceRule");
+    passedEntityNames.add("ProductPromo");
+} else if ("Product2".equals(preConfiguredSetName)) {
+    passedEntityNames = new OrderedSet();
+    passedEntityNames.add("Content");
+    passedEntityNames.add("ElectronicText");
+    passedEntityNames.add("FacilityLocation");
+    passedEntityNames.add("ProdCatalogCategory");
+    passedEntityNames.add("ProdCatalogRole");
+    passedEntityNames.add("ProductAssoc");
+    passedEntityNames.add("ProductAttribute");
+    passedEntityNames.add("ProductCategoryMember");
+    passedEntityNames.add("ProductCategoryRollup");
+    passedEntityNames.add("ProductFacility");
+    passedEntityNames.add("ProductFeature");
+    passedEntityNames.add("ProductFeatureCategoryAppl");
+    passedEntityNames.add("ProductKeyword");
+    passedEntityNames.add("ProductPrice");
+    passedEntityNames.add("ProductPriceAction");
+    passedEntityNames.add("ProductPriceCond");
+    passedEntityNames.add("ProductPromoCode");
+    passedEntityNames.add("ProductPromoCategory");
+    passedEntityNames.add("ProductPromoProduct");
+    passedEntityNames.add("ProductPromoRule");
+} else if ("Product3".equals(preConfiguredSetName)) {
+    passedEntityNames = new OrderedSet();
+    passedEntityNames.add("ProdCatalogInvFacility");
+    passedEntityNames.add("ProductContent");
+    passedEntityNames.add("ProductFacilityLocation");
+    passedEntityNames.add("ProductFeatureAppl");
+    passedEntityNames.add("ProductFeatureDataResource");
+    passedEntityNames.add("ProductFeatureGroup");
+    passedEntityNames.add("ProductPriceChange");
+    passedEntityNames.add("ProductPromoAction");
+    passedEntityNames.add("ProductPromoCodeEmail");
+    passedEntityNames.add("ProductPromoCodeParty");
+    passedEntityNames.add("ProductPromoCond");
+} else if ("Product4".equals(preConfiguredSetName)) {
+    passedEntityNames = new OrderedSet();
+    passedEntityNames.add("InventoryItem");
+    passedEntityNames.add("ProductFeatureCatGrpAppl");
+    passedEntityNames.add("ProductFeatureGroupAppl");
+} else if ("CatalogExport".equals(preConfiguredSetName)) {
+    passedEntityNames = new OrderedSet();
+    passedEntityNames.add("ProdCatalogCategoryType");
+    passedEntityNames.add("ProdCatalog");
+    passedEntityNames.add("ProductCategoryType");
+    passedEntityNames.add("ProductCategory");
+    passedEntityNames.add("ProductCategoryRollup");
+    passedEntityNames.add("ProdCatalogCategory");
+    passedEntityNames.add("ProductFeatureType");
+    passedEntityNames.add("ProductFeatureCategory");
+
+    passedEntityNames.add("DataResource");
+    passedEntityNames.add("Content");
+    passedEntityNames.add("ElectronicText");
+
+    passedEntityNames.add("ProductType");
+    passedEntityNames.add("Product");
+    passedEntityNames.add("ProductAttribute");
+    passedEntityNames.add("GoodIdentificationType");
+    passedEntityNames.add("GoodIdentification");
+    passedEntityNames.add("ProductPriceType");
+    passedEntityNames.add("ProductPrice");
+
+    passedEntityNames.add("ProductPriceRule");
+    passedEntityNames.add("ProductPriceCond");
+    passedEntityNames.add("ProductPriceAction");
+    //passedEntityNames.add("ProductPriceChange");
+
+    passedEntityNames.add("ProductPromo");
+    passedEntityNames.add("ProductPromoCode");
+    passedEntityNames.add("ProductPromoCategory");
+    passedEntityNames.add("ProductPromoProduct");
+    passedEntityNames.add("ProductPromoRule");
+    passedEntityNames.add("ProductPromoAction");
+    passedEntityNames.add("ProductPromoCodeEmail");
+    passedEntityNames.add("ProductPromoCodeParty");
+    passedEntityNames.add("ProductPromoCond");
+
+    passedEntityNames.add("ProductCategoryMember");
+    passedEntityNames.add("ProductAssoc");
+    passedEntityNames.add("ProductContent");
+
+    passedEntityNames.add("ProductFeature");
+    passedEntityNames.add("ProductFeatureCategoryAppl");
+    passedEntityNames.add("ProductFeatureAppl");
+    passedEntityNames.add("ProductFeatureDataResource");
+    passedEntityNames.add("ProductFeatureGroup");
+    passedEntityNames.add("ProductFeatureCatGrpAppl");
+    passedEntityNames.add("ProductFeatureGroupAppl");
+
+    //passedEntityNames.add("ProductKeyword");
+}
+
+if (UtilValidate.isNotEmpty(entitySyncId)) {
+    passedEntityNames = org.ofbiz.entityext.synchronization.EntitySyncContext.getEntitySyncModelNamesToUse(dispatcher, entitySyncId);
+}
+boolean checkAll = "true".equals(request.getParameter("checkAll"));
+boolean tobrowser = request.getParameter("tobrowser")!=null?true:false;
+  
+EntityExpr entityFromCond = null;
+EntityExpr entityThruCond = null;
+EntityExpr entityDateCond = null;
+if (UtilValidate.isNotEmpty(entityFrom)) {
+    entityFromCond = new EntityExpr("lastUpdatedTxStamp", EntityComparisonOperator.GREATER_THAN, entityFrom);
+}
+if (UtilValidate.isNotEmpty(entityThru)) {
+    entityThruCond = new EntityExpr("lastUpdatedTxStamp", EntityComparisonOperator.LESS_THAN, entityThru);
+}
+if ((entityFromCond!=null) && (entityThruCond!=null)) {
+    entityDateCond = new EntityExpr(entityFromCond, EntityJoinOperator.AND, entityThruCond);
+} else if(entityFromCond!=null) {
+    entityDateCond = entityFromCond;
+} else if(entityThruCond!=null) {
+    entityDateCond = entityThruCond;
+}
+  
+if (tobrowser) {
+    session.setAttribute("xmlrawdump_entitylist", entityName);
+    session.setAttribute("entityDateCond", entityDateCond);
+} else {
+  EntityFindOptions efo = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
+  ModelReader reader = delegator.getModelReader();
+  Collection ec = reader.getEntityNames();
+  TreeSet entityNames = new TreeSet(ec);
+  context.put("entityNames", entityNames);
+  int numberOfEntities = passedEntityNames.size();
+  context.put("numberOfEntities", Integer.toString(numberOfEntities));
+  long numberWritten = 0;
+  
+  // single file
+  if(filename != null && filename.length() > 0 && numberOfEntities > 0) {
+    PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), "UTF-8")));
+    writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+    writer.println("<entity-engine-xml>");
+
+    Iterator i = passedEntityNames.iterator();
+    while(i.hasNext()) { 
+        boolean beganTransaction = TransactionUtil.begin(3600);
+        try {
+            String curEntityName = (String)i.next();
+            EntityListIterator values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, UtilMisc.toList("-createdTxStamp"), efo);
+
+            GenericValue value = null;
+            long curNumberWritten = 0;
+            while ((value = (GenericValue) values.next()) != null) {
+                value.writeXmlText(writer, "");
+                numberWritten++;
+                curNumberWritten++;
+                if (curNumberWritten % 500 == 0 || curNumberWritten == 1) {
+                    Debug.log("Records written [" + curEntityName + "]: " + curNumberWritten + " Total: " + numberWritten);
+                }
+            }
+            values.close();
+            Debug.log("Wrote [" + curNumberWritten + "] from entity : " + curEntityName);
+            TransactionUtil.commit(beganTransaction);
+        } catch (Exception e) {
+            String errMsg = "Error reading data for XML export:";
+            Debug.logError(e, errMsg, "JSP");
+            TransactionUtil.rollback(beganTransaction, errMsg, e);
+        }
+    }
+    writer.println("</entity-engine-xml>");
+    writer.close();
+    Debug.log("Total records written from all entities: " + numberWritten);
+    context.put("numberWritten", Long.toString(numberWritten));
+}
+
+// multiple files in a directory
+Collection results = new ArrayList();
+int fileNumber = 1;
+context.put("results", results);
+if (outpath != null){
+    File outdir = new File(outpath);
+    if(!outdir.exists()){
+        outdir.mkdir();
+    }
+    if(outdir.isDirectory() && outdir.canWrite()) {
+        Iterator i= passedEntityNames.iterator();
+
+        while(i.hasNext()) {
+            numberWritten = 0;
+            String curEntityName = (String)i.next();
+            String fileName = preConfiguredSetName != null ? UtilFormatOut.formatPaddedNumber((long) fileNumber, 3) + "_" : "";
+            fileName = fileName + curEntityName;
+
+            EntityListIterator values = null;
+            boolean beganTransaction = false;
+            try{
+                beganTransaction = TransactionUtil.begin(3600);
+                
+                ModelEntity me = delegator.getModelEntity(curEntityName);
+                if (me instanceof ModelViewEntity) {
+                    results.add("["+fileNumber +"] [vvv] " + curEntityName + " skipping view entity");
+                    continue;
+                }
+                values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, me.getPkFieldNames(), efo);
+                boolean isFirst = true;
+                PrintWriter writer = null;
+                int fileSplitNumber = 1;
+                GenericValue value = null;
+                while ((value = (GenericValue) values.next()) != null) {
+                    //Don't bother writing the file if there's nothing
+                    //to put into it
+                    if (isFirst) {
+                        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(outdir, fileName +".xml")), "UTF-8")));
+                        writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+                        writer.println("<entity-engine-xml>");
+                        isFirst = false;
+                    }
+                    value.writeXmlText(writer, "");
+                    numberWritten++;
+
+                    // split into small files
+                    if ((maxRecordsPerFile > 0) && (numberWritten % maxRecordsPerFile == 0)) {
+                        fileSplitNumber++;
+                        // close the file
+                        writer.println("</entity-engine-xml>");
+                        writer.close();
+
+                        // create a new file
+                        String splitNumStr = UtilFormatOut.formatPaddedNumber((long) fileSplitNumber, 3);
+                        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(outdir, fileName + "_" + splitNumStr +".xml")), "UTF-8")));
+                        writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+                        writer.println("<entity-engine-xml>");
+                    }
+
+                    if (numberWritten % 500 == 0 || numberWritten == 1) {
+                       Debug.log("Records written [" + curEntityName + "]: " + numberWritten);
+                    }
+
+                }
+                if (writer != null) {
+                    writer.println("</entity-engine-xml>");
+                    writer.close();
+                    String thisResult = "["+fileNumber +"] [" + numberWritten + "] " + curEntityName + " wrote " + numberWritten + " records";
+                    Debug.log(thisResult);
+                    results.add(thisResult);
+                } else {
+                    String thisResult = "["+fileNumber +"] [---] " + curEntityName + " has no records, not writing file";
+                    Debug.log(thisResult);
+                    results.add(thisResult);
+                }
+                values.close();
+            } catch (Exception ex) {
+                if (values != null) {
+                    values.close();
+                }
+                String thisResult = "["+fileNumber +"] [xxx] Error when writing " + curEntityName + ": " + ex;
+                Debug.log(thisResult);
+                results.add(thisResult);
+                TransactionUtil.rollback(beganTransaction, thisResult, ex);
+            } finally {
+                // only commit the transaction if we started one... this will throw an exception if it fails
+                TransactionUtil.commit(beganTransaction);
+            }
+            fileNumber++;
+        }
+    }
+}
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.net.*;
+import org.ofbiz.security.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+
+String findOrganizationPartyId = request.getParameter("findOrganizationPartyId");
+if (UtilValidate.isNotEmpty(findOrganizationPartyId)) {
+    context.put("findOrganizationPartyId", findOrganizationPartyId);
+}
+
+String currentCustomTimePeriodId = request.getParameter("currentCustomTimePeriodId");
+if (UtilValidate.isNotEmpty(currentCustomTimePeriodId)) {
+    context.put("currentCustomTimePeriodId", currentCustomTimePeriodId);
+}
+
+GenericValue currentCustomTimePeriod = currentCustomTimePeriodId == null ? null : delegator.findByPrimaryKey("CustomTimePeriod", UtilMisc.toMap("customTimePeriodId", currentCustomTimePeriodId));
+if (currentCustomTimePeriod != null) {
+    context.put("currentCustomTimePeriod", currentCustomTimePeriod);
+}
+
+GenericValue currentPeriodType = currentCustomTimePeriod == null ? null : currentCustomTimePeriod.getRelatedOneCache("PeriodType");
+if (currentPeriodType != null) {
+    context.put("currentPeriodType", currentPeriodType);
+}
+
+Map findMap = UtilMisc.toMap("organizationPartyId", findOrganizationPartyId);
+if (UtilValidate.isNotEmpty(currentCustomTimePeriodId)) {
+    findMap.put("parentPeriodId", currentCustomTimePeriodId);
+}
+
+List customTimePeriods = delegator.findByAnd("CustomTimePeriod", findMap,
+    UtilMisc.toList("periodTypeId", "periodNum", "fromDate"));
+if (customTimePeriods != null) {
+    context.put("customTimePeriods", customTimePeriods);
+}
+
+List allCustomTimePeriods = delegator.findAll("CustomTimePeriod", UtilMisc.toList("organizationPartyId", "parentPeriodId", "periodTypeId", "periodNum", "fromDate"));
+if (allCustomTimePeriods != null) {
+    context.put("allCustomTimePeriods", allCustomTimePeriods);
+}
+
+List periodTypes = delegator.findAllCache("PeriodType", UtilMisc.toList("description"));
+if (periodTypes != null) {
+    context.put("periodTypes", periodTypes);
+}
+
+String newPeriodTypeId = "FISCAL_YEAR";
+if (currentCustomTimePeriod != null && "FISCAL_YEAR".equals(currentCustomTimePeriod.getString("periodTypeId"))) {
+    newPeriodTypeId = "FISCAL_QUARTER";
+}
+if (currentCustomTimePeriod != null && "FISCAL_QUARTER".equals(currentCustomTimePeriod.getString("periodTypeId"))) {
+    newPeriodTypeId = "FISCAL_MONTH";
+}
+if (currentCustomTimePeriod != null && "FISCAL_MONTH".equals(currentCustomTimePeriod.getString("periodTypeId"))) {
+    newPeriodTypeId = "FISCAL_WEEK";
+}
+if (currentCustomTimePeriod != null && "FISCAL_BIWEEK".equals(currentCustomTimePeriod.getString("periodTypeId"))) {
+    newPeriodTypeId = "FISCAL_WEEK";
+}
+if (currentCustomTimePeriod != null && "FISCAL_WEEK".equals(currentCustomTimePeriod.getString("periodTypeId"))) {
+    newPeriodTypeId = "";
+}
+
+context.put("newPeriodTypeId", newPeriodTypeId);

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/period/EditCustomTimePeriod.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.base.util.UtilFormatOut;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.security.Security;
+import org.ofbiz.webapp.stats.*;
+
+String id = request.getParameter("statsId");
+String typeStr = request.getParameter("type");
+int type = -1;
+try {
+    type = Integer.parseInt(typeStr);
+} catch (NumberFormatException e) {
+    type = -1;
+}
+
+LinkedList binList = null;
+if (type == ServerHitBin.REQUEST) {
+    binList = (LinkedList) ServerHitBin.requestHistory.get(id);
+} else if (type == ServerHitBin.EVENT) {
+    binList = (LinkedList) ServerHitBin.eventHistory.get(id);
+} else if (type == ServerHitBin.VIEW) {
+    binList = (LinkedList) ServerHitBin.viewHistory.get(id);
+}
+
+if (binList != null) {
+    Iterator iterator = binList.iterator();
+    if(iterator!=null && iterator.hasNext()){
+        List requestList = new ArrayList();
+        while(iterator.hasNext()){
+            Map requestIdMap = new HashMap();
+            ServerHitBin bin = (ServerHitBin) iterator.next();
+            if (bin != null) {
+                requestIdMap.put("requestId", bin.getId());
+                requestIdMap.put("requestType", bin.getType());
+                requestIdMap.put("startTime", bin.getStartTimeString());
+                requestIdMap.put("endTime", bin.getEndTimeString());
+                requestIdMap.put("lengthMins", UtilFormatOut.formatQuantity(bin.getBinLengthMinutes()));
+                requestIdMap.put("numberHits", UtilFormatOut.formatQuantity(bin.getNumberHits()));
+                requestIdMap.put("minTime", UtilFormatOut.formatQuantity(bin.getMinTimeSeconds()));
+                requestIdMap.put("avgTime", UtilFormatOut.formatQuantity(bin.getAvgTimeSeconds()));
+                requestIdMap.put("maxTime", UtilFormatOut.formatQuantity(bin.getMaxTimeSeconds()));
+                requestIdMap.put("hitsPerMin", UtilFormatOut.formatQuantity(bin.getHitsPerMinute()));
+                requestList.add(requestIdMap);
+            }
+        }
+        context.put("requestList", requestList);
+    }
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatBinsHistory.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.base.util.UtilFormatOut;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.security.Security;
+import org.ofbiz.webapp.stats.*;
+
+String clearBins = request.getParameter("clear");
+if (UtilValidate.isNotEmpty(clearBins) && "true".equals(clearBin)) {
+    ServerHitBin.requestSinceStarted.clear();
+    ServerHitBin.eventSinceStarted.clear();
+    ServerHitBin.viewSinceStarted.clear();
+}
+
+// Requests
+Iterator iterator = UtilMisc.toIterator(ServerHitBin.requestSinceStarted.keySet());
+if(iterator!=null && iterator.hasNext()){
+    List requestList = new ArrayList();
+    while(iterator.hasNext()){
+        Map requestIdMap = new HashMap();
+        String statsId = (String)iterator.next();
+        ServerHitBin bin = (ServerHitBin) ServerHitBin.requestSinceStarted.get(statsId);
+        if (bin != null) {
+            requestIdMap.put("requestId", bin.getId());
+            requestIdMap.put("requestType", bin.getType());
+            requestIdMap.put("startTime", bin.getStartTimeString());
+            requestIdMap.put("endTime", bin.getEndTimeString());
+            requestIdMap.put("lengthMins", UtilFormatOut.formatQuantity(bin.getBinLengthMinutes()));
+            requestIdMap.put("numberHits", UtilFormatOut.formatQuantity(bin.getNumberHits()));
+            requestIdMap.put("minTime", UtilFormatOut.formatQuantity(bin.getMinTimeSeconds()));
+            requestIdMap.put("avgTime", UtilFormatOut.formatQuantity(bin.getAvgTimeSeconds()));
+            requestIdMap.put("maxTime", UtilFormatOut.formatQuantity(bin.getMaxTimeSeconds()));
+            requestIdMap.put("hitsPerMin", UtilFormatOut.formatQuantity(bin.getHitsPerMinute()));
+            requestList.add(requestIdMap);
+        }
+    }
+    context.put("requestList", requestList);
+}
+
+// Events
+iterator = UtilMisc.toIterator(ServerHitBin.eventSinceStarted.keySet());
+if(iterator!=null && iterator.hasNext()){
+    List eventList = new ArrayList();
+    while(iterator.hasNext()){
+        Map requestIdMap = new HashMap();
+        String statsId = (String)iterator.next();
+        ServerHitBin bin = (ServerHitBin) ServerHitBin.requestSinceStarted.get(statsId);
+        if (bin != null) {
+            requestIdMap.put("requestId", bin.getId());
+            requestIdMap.put("requestType", bin.getType());
+            requestIdMap.put("startTime", bin.getStartTimeString());
+            requestIdMap.put("endTime", bin.getEndTimeString());
+            requestIdMap.put("lengthMins", UtilFormatOut.formatQuantity(bin.getBinLengthMinutes()));
+            requestIdMap.put("numberHits", UtilFormatOut.formatQuantity(bin.getNumberHits()));
+            requestIdMap.put("minTime", UtilFormatOut.formatQuantity(bin.getMinTimeSeconds()));
+            requestIdMap.put("avgTime", UtilFormatOut.formatQuantity(bin.getAvgTimeSeconds()));
+            requestIdMap.put("maxTime", UtilFormatOut.formatQuantity(bin.getMaxTimeSeconds()));
+            requestIdMap.put("hitsPerMin", UtilFormatOut.formatQuantity(bin.getHitsPerMinute()));
+            eventList.add(requestIdMap);
+        }
+    }
+    context.put("eventList", eventList);
+}
+
+// Views
+iterator = UtilMisc.toIterator(ServerHitBin.viewSinceStarted.keySet());
+if(iterator!=null && iterator.hasNext()){
+    List viewList = new ArrayList();
+    while(iterator.hasNext()){
+        Map requestIdMap = new HashMap();
+        String statsId = (String)iterator.next();
+        ServerHitBin bin = (ServerHitBin) ServerHitBin.requestSinceStarted.get(statsId);
+        if (bin != null) {
+            requestIdMap.put("requestId", bin.getId());
+            requestIdMap.put("requestType", bin.getType());
+            requestIdMap.put("startTime", bin.getStartTimeString());
+            requestIdMap.put("endTime", bin.getEndTimeString());
+            requestIdMap.put("lengthMins", UtilFormatOut.formatQuantity(bin.getBinLengthMinutes()));
+            requestIdMap.put("numberHits", UtilFormatOut.formatQuantity(bin.getNumberHits()));
+            requestIdMap.put("minTime", UtilFormatOut.formatQuantity(bin.getMinTimeSeconds()));
+            requestIdMap.put("avgTime", UtilFormatOut.formatQuantity(bin.getAvgTimeSeconds()));
+            requestIdMap.put("maxTime", UtilFormatOut.formatQuantity(bin.getMaxTimeSeconds()));
+            requestIdMap.put("hitsPerMin", UtilFormatOut.formatQuantity(bin.getHitsPerMinute()));
+            viewList.add(requestIdMap);
+        }
+    }
+    context.put("viewList", viewList);
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/stats/StatsSinceStart.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.net.*;
+import org.ofbiz.security.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.webapp.pseudotag.*;
+import org.ofbiz.workflow.definition.*;
+import org.ofbiz.entity.util.*;
+import org.ofbiz.entity.condition.*;
+import org.ofbiz.entity.transaction.*;
+
+List messages = new LinkedList();
+    
+String xpdlLoc = request.getParameter("XPDL_LOCATION");
+boolean xpdlIsUrl = request.getParameter("XPDL_IS_URL")!=null?true:false;
+boolean xpdlImport = request.getParameter("XPDL_IMPORT")!=null?true:false;
+    
+URL xpdlUrl = null;
+try {
+    xpdlUrl = xpdlIsUrl?new URL(xpdlLoc):UtilURL.fromFilename(xpdlLoc);
+}
+catch (java.net.MalformedURLException e) {
+    messages.add(e.getMessage());
+    messages.add(e.toString());
+    Debug.log(e);
+}
+if (xpdlUrl == null) {
+    messages.add("Could not find file/URL: " + xpdlLoc);
+}
+    
+List toBeStored = null;
+try {
+    if (xpdlUrl != null) {
+        toBeStored = XpdlReader.readXpdl(xpdlUrl, delegator);
+        context.put("toBeStored", toBeStored);
+    }
+}
+catch (Exception e) {
+    messages.add(e.getMessage());
+    messages.add(e.toString());
+    Debug.log(e);
+}
+		
+if (toBeStored != null && xpdlImport) {
+    boolean beganTransaction = false;
+    try {
+        beganTransaction = TransactionUtil.begin();
+        delegator.storeAll(toBeStored);
+        TransactionUtil.commit(beganTransaction);
+        messages.add("Wrote/Updated " + toBeStored.size() + " toBeStored objects to the data source.");
+    }
+    catch (GenericEntityException e) {
+        TransactionUtil.rollback(beganTransaction, "Error storing data from XPDL file", e);
+        messages.add(e.getMessage());
+        messages.add(e.toString());
+        Debug.log(e);
+    }
+}
+
+context.put("messages", messages);

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/readxpdl.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh?view=auto&rev=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh (added)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh Tue Mar 27 00:04:31 2007
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.net.*;
+import org.ofbiz.security.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.condition.*;
+import org.ofbiz.entity.util.*;
+import org.ofbiz.workflow.definition.*;
+import org.ofbiz.workflow.*;
+
+String workflow = request.getParameter("workflow");
+GenericValue workflowDef = null;
+if (workflow == null) {									
+	List runningProcesses = delegator.findByAnd("WorkEffort", UtilMisc.toMap("workEffortTypeId", "WORK_FLOW", "currentStatusId", "WF_RUNNING"));
+	if (runningProcesses != null)
+		context.put("runningProcesses", runningProcesses);
+} else {
+    workflowDef = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", workflow));
+    if (workflowDef != null) {
+        context.put("workflow", workflowDef);
+		List activities = delegator.findByAnd("WorkEffort", UtilMisc.toMap("workEffortParentId", workflow));
+		if (activities != null) {
+			context.put("activities", activities);
+		}
+	}
+}

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/workflow/workflowMonitor.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?view=diff&rev=522793&r1=522792&r2=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Mar 27 00:04:31 2007
@@ -31,7 +31,6 @@
     <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>
     <handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/>
 
-    <handler name="region" type="view" class="org.ofbiz.webapp.view.RegionViewHandler"/>   
     <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
     <handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/>
     <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/>
@@ -550,27 +549,28 @@
     <view-map name="ModelGroupWriter" page="/entity/ModelGroupWriter.jsp"/>
     <view-map name="ModelInduceFromDb" page="/entity/ModelInduceFromDb.jsp"/>
 
-    <view-map name="EditEntity" type="region"/>
     <view-map name="checkdb" type="screen" page="component://webtools/widget/EntityScreens.xml#CheckDb"/>   
-    <view-map name="xmldsdump" type="region"/>
+    <view-map name="xmldsdump" type="screen" page="component://webtools/widget/EntityScreens.xml#xmldsdump"/>
     <view-map name="xmldsrawdump" page="/entity/xmldsrawdump.jsp"/>
 
     <view-map name="FindUtilCache" type="screen" page="component://webtools/widget/CacheScreens.xml#FindUtilCache"/>
     <view-map name="FindUtilCacheElements" type="screen" page="component://webtools/widget/CacheScreens.xml#FindUtilCacheElements"/>
     <view-map name="EditUtilCache" type="screen" page="component://webtools/widget/CacheScreens.xml#EditUtilCache"/>
 
-    <view-map name="viewdatafile" type="region"/>
-    <view-map name="readxpdl" type="region"/>
-    <view-map name="workflowMonitor" type="region"/>
+    <view-map name="viewdatafile" type="screen" page="component://webtools/widget/MiscScreens.xml#viewdatafile"/>
+
+    <view-map name="readxpdl" type="screen" page="component://webtools/widget/MiscScreens.xml#readxpdl"/>
+    <view-map name="workflowMonitor" type="screen" page="component://webtools/widget/MiscScreens.xml#workflowMonitor"/>
+
     <view-map name="LogConfiguration" type="screen" page="component://webtools/widget/LogScreens.xml#LogConfiguration"/>
     <view-map name="LogView" type="screen" page="component://webtools/widget/LogScreens.xml#LogView"/>
 
-    <view-map name="StatsSinceStart" type="region"/>
-    <view-map name="StatBinsHistory" type="region"/>
+    <view-map name="StatsSinceStart" type="screen" page="component://webtools/widget/StatsScreens.xml#StatsSinceStart"/>
+    <view-map name="StatBinsHistory" type="screen" page="component://webtools/widget/StatsScreens.xml#StatBinsHistory"/>
 
-    <view-map name="EntityPerformanceTest" type="region"/>
+    <view-map name="EntityPerformanceTest" type="screen" page="component://webtools/widget/EntityScreens.xml#EntityPerformanceTest"/>
 
-    <view-map name="EditCustomTimePeriod" type="region"/>
+    <view-map name="EditCustomTimePeriod" type="screen" page="component://webtools/widget/MiscScreens.xml#EditCustomTimePeriod"/>
 
     <view-map name="serviceList" type="screen" page="component://webtools/widget/ServiceScreens.xml#ServiceList"/>
     <view-map name="jobList" type="screen" page="component://webtools/widget/ServiceScreens.xml#JobList"/>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/cache/editUtilCache.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/cache/editUtilCache.ftl?view=diff&rev=522793&r1=522792&r2=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/cache/editUtilCache.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/cache/editUtilCache.ftl Tue Mar 27 00:04:31 2007
@@ -17,106 +17,91 @@
 under the License.
 -->
 
-<div class="head1">${uiLabelMap.PageTitleEditUtilCache}</div>
-<div>&nbsp;</div>
-<div class="tabletext"><b>${uiLabelMap.WebtoolsCacheName}:</b> ${cacheName?if_exists}</div>
-<div>&nbsp;</div>
-<div width="100%">
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearThisCache}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsBackToCacheMaintenance}</a>
-</div>
-<div>&nbsp;</div>
+<#macro displayButtonBar>
+    <div class="button-bar">
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsClearThisCache}</a>
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsBackToCacheMaintenance}</a>
+    </div>
+</#macro>
+
+<h1>${uiLabelMap.PageTitleEditUtilCache}</h1>
+<br />
+
+<@displayButtonBar/>
+
 <#if cache?has_content>
-    <form method="POST" action='<@o...@ofbizUrl>'>
-        <table cellpadding="2" cellspacing="0" border="1" width="50%" class="boxoutside">
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsCacheName}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.cacheName?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsSize}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.cacheSize?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsHits}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.hitCount?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsMissesTotal}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.missCountTot?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsMissesNotFound}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.missCountNotFound?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsMissesExpire}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.missCountExpired?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsMissesSoftReference}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.missCountSoftRef?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsRemovesHit}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.removeHitCount?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsRemovesMisses}</div></td>
-                <td colspan="2"><div class="tableheadtext">${cache.removeMissCount?if_exists}</div></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsMaxSize}</div></td>
-                <td><div class="tableheadtext">${cache.maxSize?if_exists}</div></td>
-                <td><input type="text" class='inputBox' size="15" maxlength="15" name="UTIL_CACHE_MAX_SIZE" value="${cache.maxSize?if_exists}"></td>
-            </tr>
-            <tr class='viewManyTR1'>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsExpireTime}</div></td>
-                <td><div class="tableheadtext">${cache.expireTime?if_exists} (${cache.hrs?if_exists}:${cache.mins?if_exists}:${cache.secs?if_exists})</div></td>
-                <td><input type="text" class='inputBox' size="15" maxlength="15" name="UTIL_CACHE_EXPIRE_TIME" value="${cache.expireTime?if_exists}"></td>
-            </tr>
-            <tr class='viewManyTR2'>
-                <#if cache.useSoftReference?exists && cache.useSoftReference == "true">
-                    <#assign selectedTrue = "selected">
-                    <#assign selectedFalse = "">
-                    <#assign valueSoftRef = "${uiLabelMap.CommonTrue}">
-                <#else>
-                    <#assign selectedTrue = "">
-                    <#assign selectedFalse = "selected">
-                    <#assign valueSoftRef = "${uiLabelMap.CommonFalse}">
-                </#if>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsUseSoftRef}</div></td>
-                <td><div class="tableheadtext">${valueSoftRef}</div></td>
+    <form method="post" action="<@o...@ofbizUrl>">
+        <table class="basic-table light-grid" cellspacing="0">
+            <tr>
+                <td>${uiLabelMap.WebtoolsCacheName}</td>
+                <td colspan="2">${cache.cacheName?if_exists}</td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsSize}</td>
+                <td colspan="2">${cache.cacheSize?if_exists}</td>
+            </tr>
+            <tr>
+                <td>${uiLabelMap.WebtoolsHits}</td>
+                <td colspan="2">${cache.hitCount?if_exists}</td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsMissesTotal}</td>
+                <td colspan="2">${cache.missCountTot?if_exists}</td>
+            </tr>
+            <tr>
+                <td>${uiLabelMap.WebtoolsMissesNotFound}</td>
+                <td colspan="2">${cache.missCountNotFound?if_exists}</td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsMissesExpire}</td>
+                <td colspan="2">${cache.missCountExpired?if_exists}</td>
+            </tr>
+            <tr>
+                <td>${uiLabelMap.WebtoolsMissesSoftReference}</td>
+                <td colspan="2">${cache.missCountSoftRef?if_exists}</td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsRemovesHit}</td>
+                <td colspan="2">${cache.removeHitCount?if_exists}</td>
+            </tr>
+            <tr>
+                <td>${uiLabelMap.WebtoolsRemovesMisses}</td>
+                <td colspan="2">${cache.removeMissCount?if_exists}</td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsMaxSize}</td>
+                <td>${cache.maxSize?if_exists}</td>
+                <td><input type="text" size="15" maxlength="15" name="UTIL_CACHE_MAX_SIZE" value="${cache.maxSize?if_exists}" /></td>
+            </tr>
+            <tr>
+                <td>${uiLabelMap.WebtoolsExpireTime}</td>
+                <td>${cache.expireTime?if_exists} (${cache.hrs?if_exists}:${cache.mins?if_exists}:${cache.secs?if_exists})</td>
+                <td><input type="text" size="15" maxlength="15" name="UTIL_CACHE_EXPIRE_TIME" value="${cache.expireTime?if_exists}" /></td>
+            </tr>
+            <tr class="alternate-row">
+                <td>${uiLabelMap.WebtoolsUseSoftRef}</td>
+                <td>${cache.useSoftReference?if_exists}</td>
                 <td>
-                    <select name="UTIL_CACHE_USE_SOFT_REFERENCE" class="selectBox">
-                        <option value="true"  ${selectedTrue}>${uiLabelMap.CommonTrue}</option>
-                        <option value="false" ${selectedFalse}>${uiLabelMap.CommonFalse}</option>
+                    <select name="UTIL_CACHE_USE_SOFT_REFERENCE">
+                        <option value="true" <#if cache.useSoftReference?default('false') == 'true'>selected="selected"</#if>>${uiLabelMap.CommonTrue}</option>
+                        <option value="false" <#if cache.useSoftReference?default('true') == 'false'>selected="selected"</#if>>${uiLabelMap.CommonFalse}</option>
                     </select>
-                  </td>
+                </td>
             </tr>
-            <tr class='viewManyTR1'>
-                <#if cache.useFileSystemStore?exists && cache.useFileSystemStore == "true">
-                    <#assign valueFileSys = "${uiLabelMap.CommonTrue}">
-                <#else>
-                    <#assign valueFileSys = "${uiLabelMap.CommonFalse}">
-                </#if>
-                <td><div class="tableheadtext">${uiLabelMap.WebtoolsUseFileStore}</div></td>
-                <td colspan="2"><div class="tableheadtext">${valueFileSys}</div></td>
+            <tr>
+                <td>${uiLabelMap.WebtoolsUseFileStore}</td>
+                <td colspan="2">${cache.useFileSystemStore?if_exists}</td>
             </tr>
             <tr>
                 <td colspan="3" align="center">
-                    <input type="submit" value="${uiLabelMap.CommonUpdate}">
+                    <input type="submit" value="${uiLabelMap.CommonUpdate}" />
                 </td>
             </tr>
         </table>
     </form>
 <#else>
-    <div width="100%">
-        ${uiLabelMap.WebtoolsNoUtilCacheSpecified}
-    </div>
+    ${uiLabelMap.WebtoolsNoUtilCacheSpecified}
 </#if>
-<div>&nbsp;</div>
-<div width="100%">
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearThisCache}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsBackToCacheMaintenance}</a>
-</div>
\ No newline at end of file
+
+<@displayButtonBar/>
+

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCache.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCache.ftl?view=diff&rev=522793&r1=522792&r2=522793
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCache.ftl (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/cache/findUtilCache.ftl Tue Mar 27 00:04:31 2007
@@ -17,70 +17,75 @@
 under the License.
 -->
 
-<div class="head1">${uiLabelMap.PageTitleFindUtilCache}</div>
-<div width="100%">
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsReloadCacheList}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearAllCaches}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearExpiredFromAll}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsRunGC}</a>
-</div>
-<div class="tabletext"><u><b>${uiLabelMap.WebtoolsMemory}:</b></u> [<b>${uiLabelMap.WebtoolsTotalMemory}:</b> ${memory}] [<b>${uiLabelMap.WebtoolsFreeMemory}:</b> ${freeMemory}] [<b>${uiLabelMap.WebtoolsUsedMemory}:</b> ${usedMemory}] [<b>${uiLabelMap.WebtoolsMaxMemory}:</b> ${maxMemory}]</span></div>
-<div>&nbsp;</div>
+<#macro displayButtonBar>
+    <div class="button-bar">
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsReloadCacheList}</a>
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsClearAllCaches}</a>
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsClearExpiredFromAll}</a>
+        <a href="<@o...@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsRunGC}</a>
+    </div>
+</#macro>
+
+<h1>${uiLabelMap.PageTitleFindUtilCache}</h1>
+<br />
+
+<p>
+    <u><b>${uiLabelMap.WebtoolsMemory}:</b></u>
+    [<b>${uiLabelMap.WebtoolsTotalMemory}:</b> ${memory}]
+    [<b>${uiLabelMap.WebtoolsFreeMemory}:</b> ${freeMemory}]
+    [<b>${uiLabelMap.WebtoolsUsedMemory}:</b> ${usedMemory}]
+    [<b>${uiLabelMap.WebtoolsMaxMemory}:</b> ${maxMemory}]
+</p>
+<br />
+
+<@displayButtonBar/>
+
 <#if cacheList?has_content>
-    <#assign rowClass='viewManyTR1'>
-    <table cellpadding="2" cellspacing="0" border="1" width="100%" class="boxoutside">
-      <tr>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsCacheName}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsSize}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsHits}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsMisses}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsRemoves}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsMaxSize}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsExpireTime}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsUseSoftRef}</div></td>
-        <td><div class="tableheadtext">${uiLabelMap.WebtoolsUseFileStore}</div></td>
-        <td colspan="3"><div class="tableheadtext">${uiLabelMap.WebtoolsAdministration}</div></td>
-      </tr>
-      <#list cacheList as cache>
-      <tr class='${rowClass}'>
-        <td><div class="tabletext">${cache.cacheName?if_exists}</div></td>
-        <td><div class="tabletext">${cache.cacheSize?if_exists}</div></td>
-        <td><div class="tabletext">${cache.hitCount?if_exists}</div></td>
-        <td><div class="tabletext">${cache.missCountTot?if_exists}/${cache.missCountNotFound?if_exists}/${cache.missCountExpired?if_exists}/${cache.missCountSoftRef?if_exists}</div></td>
-        <td><div class="tabletext">${cache.removeHitCount?if_exists}/${cache.removeMissCount?if_exists}</div></td>
-        <td><div class="tabletext">${cache.maxSize?if_exists}</div></td>
-        <td><div class="tabletext">${cache.expireTime?if_exists}</div></td>
-        <td><div class="tabletext">${cache.useSoftReference?if_exists}</div></td>
-        <td><div class="tabletext">${cache.useFileSystemStore?if_exists}</div></td>
-        <td align="center" valign=middle>
-            <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsElements}</a>
-        </td>
-        <td align="center" valign=middle>
-              <#if hasUtilCacheEdit>
-                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a>
-              </#if>
-        </td>
-        <td align="center" valign=middle>
-              <#if hasUtilCacheEdit>
-                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonClear}</a>
-              </#if>
-        </td>
-      </tr>
-      <#if rowClass=='viewManyTR1'>
-          <#assign rowClass='viewManyTR2'>
-      <#else>
-        <#assign rowClass='viewManyTR1'>
-      </#if>
+    <table class="basic-table light-grid hover-bar" cellspacing="0">
+        <tr class="header-row">
+            <td>${uiLabelMap.WebtoolsCacheName}</td>
+            <td>${uiLabelMap.WebtoolsSize}</td>
+            <td>${uiLabelMap.WebtoolsHits}</td>
+            <td>${uiLabelMap.WebtoolsMisses}</td>
+            <td>${uiLabelMap.WebtoolsRemoves}</td>
+            <td>${uiLabelMap.WebtoolsMaxSize}</td>
+            <td>${uiLabelMap.WebtoolsExpireTime}</td>
+            <td align="center">${uiLabelMap.WebtoolsUseSoftRef}</td>
+            <td align="center">${uiLabelMap.WebtoolsUseFileStore}</td>
+            <td align="center">${uiLabelMap.WebtoolsAdministration}</td>
+        </tr>
+        <#assign alternateRow = false>
+        <#list cacheList as cache>
+            <tr<#if alternateRow> class="alternate-row"</#if>>
+                <td>${cache.cacheName?if_exists}</td>
+                <td>${cache.cacheSize?if_exists}</td>
+                <td>${cache.hitCount?if_exists}</td>
+                <td>${cache.missCountTot?if_exists}/${cache.missCountNotFound?if_exists}/${cache.missCountExpired?if_exists}/${cache.missCountSoftRef?if_exists}</td>
+                <td>${cache.removeHitCount?if_exists}/${cache.removeMissCount?if_exists}</td>
+                <td>${cache.maxSize?if_exists}</td>
+                <td>${cache.expireTime?if_exists}</td>
+                <td align="center">${cache.useSoftReference?if_exists}</td>
+                <td align="center">${cache.useFileSystemStore?if_exists}</td>
+                <td class="button-col">
+                    <a href="<@o...@ofbizUrl>">${uiLabelMap.WebtoolsElements}</a>
+                    <#if hasUtilCacheEdit>
+                        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonEdit}</a>
+                    </#if>
+                    <#if hasUtilCacheEdit>
+                        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonClear}</a>
+                    </#if>
+                </td>
+            </tr>
+            <#if alternateRow == false>
+                <#assign alternateRow = true>
+            <#else>
+                <#assign alternateRow = false>
+            </#if>
         </#list>
     </table>
 <#else>
-    <div width="100%">
     ${uiLabelMap.WebtoolsNoUtilCacheFound}
-    </div>
 </#if>
-<div width="100%">
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsReloadCacheList}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearAllCaches}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsClearExpiredFromAll}</a>
-    <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsRunGC}</a>
-</div>
+
+<@displayButtonBar/>
+