You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/11/28 09:04:34 UTC

svn commit: r1207005 [8/9] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/servicedef/ applications/commonext/config/ applications/commonext/data/ applications/commonext/widget/ applications/content/ ...

Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CommonScreens.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CommonScreens.xml Mon Nov 28 08:04:21 2011
@@ -212,40 +212,6 @@ under the License.
             </widgets>
         </section>
     </screen>
-    
-    <screen name="CommonWebAnalyticsDecorator">
-        <section>
-            <actions>
-                <set field="headerItem" value="WebAnalytics"/>
-                <set field="leftbarScreenName" value="leftbar"/>
-                <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/>
-                <set field="MainColumnStyle" value="leftonly"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator"  location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="left-column">
-                        <include-screen name="leftbar"/>
-                    </decorator-section>                    
-                    <decorator-section name="body">
-                        <section>
-                            <condition>
-                                <if-has-permission permission="CATALOG" action="_VIEW"/>
-                            </condition>
-                            <widgets>
-                                <include-menu name="WebAnalyticsTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
-                                <container style="no-clear">
-                                    <decorator-section-include name="body"/>
-                                </container>
-                            </widgets>
-                            <fail-widgets>
-                                <label style="h3">${uiLabelMap.ProductCatalogViewPermissionError}</label>
-                            </fail-widgets>
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
 
     <screen name="leftbar">
         <section>

Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml Mon Nov 28 08:04:21 2011
@@ -2110,5 +2110,46 @@ under the License.
         <field name="changedByUserLogin" title="${uiLabelMap.ProductLastModifiedBy}"><display/></field>
         <field name="changedDate"><display/></field>
     </form>
+
+    <form name="ListProductGroupOrder" type="list" target="" title="" list-name="productGroupOrders"
+        odd-row-style="alternate-row" default-table-style="basic-table">
+        <field name="productId"><hidden/></field>
+        <field name="groupOrderId"><display/></field>
+        <field name="reqOrderQty" title="${uiLabelMap.ProductDealQuantity}"><display/></field>
+        <field name="soldOrderQty" title="${uiLabelMap.ProductSoldQuantity}"><display/></field>
+        <field name="fromDate" title="${uiLabelMap.ProductDealStartDate}"><display/></field>
+        <field name="thruDate" title="${uiLabelMap.ProductDealEndDate}"><display/></field>
+        <field name="editLink" use-when="${groovy: return reqOrderQty.compareTo(soldOrderQty)!= 0;}&amp;&amp;${groovy: return thruDate.compareTo(org.ofbiz.base.util.UtilDateTime.nowTimestamp()) == 1}" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="EditProductGroupOrder" description="${uiLabelMap.CommonEdit}" also-hidden="false">
+                <parameter param-name="productId"/>
+                <parameter param-name="groupOrderId"/>
+            </hyperlink>
+        </field>
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="deleteProductGroupOrder" description="${uiLabelMap.CommonDelete}" also-hidden="false">
+                <parameter param-name="productId"/>
+                <parameter param-name="groupOrderId"/>
+            </hyperlink>
+        </field>
+    </form>
+
+    <form name="CreateProductGroupOrder" type="single" target="createProductGroupOrder" title=""
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="productId"><hidden/></field>
+        <field name="soldOrderQty"><hidden value="0"/></field>
+        <field name="reqOrderQty" title="${uiLabelMap.ProductDealQuantity}*"><text/></field>
+        <field name="fromDate" title="${uiLabelMap.ProductDealStartDate}*"><date-time/></field>
+        <field name="thruDate" title="${uiLabelMap.ProductDealEndDate}*"><date-time/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <form name="EditProductGroupOrder" type="single" target="updateProductGroupOrder" title="" default-map-name="productGroupOrder"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="groupOrderId"><hidden/></field>
+        <field name="productId"><hidden/></field>
+        <field name="reqOrderQty" title="${uiLabelMap.ProductDealQuantity}*"><text/></field>
+        <field name="fromDate" title="${uiLabelMap.ProductDealStartDate}*"><date-time/></field>
+        <field name="thruDate" title="${uiLabelMap.ProductDealEndDate}*"><date-time/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
  </forms>
- 

Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductScreens.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductScreens.xml Mon Nov 28 08:04:21 2011
@@ -1384,4 +1384,51 @@ under the License.
             </widgets>
         </section>
     </screen>
+
+    <screen name="ViewProductGroupOrder">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleViewProductGroupOrder"/>
+                <set field="tabButtonItem" value="ViewProductGroupOrder"/>
+                <set field="labelTitleProperty" value="ProductGroupOrder"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-and entity-name="ProductGroupOrder" list="productGroupOrders">
+                    <field-map field-name="productId" from-field="productId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.ProductGroupOrder}">
+                            <include-form name="ListProductGroupOrder" location="component://product/widget/catalog/ProductForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.ProductAddGroupOrder}">
+                            <include-form name="CreateProductGroupOrder" location="component://product/widget/catalog/ProductForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="EditProductGroupOrder">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditProductGroupOrder"/>
+                <set field="tabButtonItem" value="EditProductGroupOrder"/>
+                <set field="labelTitleProperty" value="ProductGroupOrder"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="ProductGroupOrder" value-field="productGroupOrder"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.ProductEditGroupOrder}">
+                            <include-form name="EditProductGroupOrder" location="component://product/widget/catalog/ProductForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/branches/jackrabbit20100709/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/build.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/build.xml (original)
+++ ofbiz/branches/jackrabbit20100709/build.xml Mon Nov 28 08:04:21 2011
@@ -75,6 +75,7 @@ under the License.
         <antcall target="clean-catalina"/>
         <antcall target="clean-cache"/>
         <antcall target="clean-tempfiles"/>
+        <antcall target="clean-lucene-index"/>
         <!-- FIXME: clean-downloads introduces some issues: with cobertura (on Windows can't be deleted, not sure why), 
                     but especially with postgresql drivers -->
         <!-- antcall target="clean-downloads"/ -->   
@@ -140,6 +141,13 @@ under the License.
         </subant>
     </target>
 
+    <target name="clean-lucene-index"
+          description="Removes lucene indexes created in applications/content/index">
+        <subant target="clean-lucene-index">
+            <filelist dir="." files="applications/content/build.xml"/>
+        </subant>
+    </target>
+
     <target name="download-selenium"
           description="Download the selenium server v1.0.3 20.8 MB download">
         <subant target="install-seleniumxml">

Modified: ofbiz/branches/jackrabbit20100709/framework/base/config/ofbiz-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/base/config/ofbiz-containers.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/base/config/ofbiz-containers.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/base/config/ofbiz-containers.xml Mon Nov 28 08:04:21 2011
@@ -122,7 +122,6 @@ under the License.
             <property name="access-log-rotate" value="true"/>
             <property name="access-log-prefix" value="access_log."/>
             <property name="access-log-dir" value="runtime/logs"/>
-            <property name="enable-request-dump" value="false"/>
             <!-- uncomment for cluster support
             <property name="default-server-cluster" value="cluster">
                 <property name="rep-valve-filter">

Modified: ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Mon Nov 28 08:04:21 2011
@@ -38,20 +38,26 @@ import javolution.util.FastList;
 import org.apache.catalina.Cluster;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
+import org.apache.catalina.Globals;
 import org.apache.catalina.Host;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Manager;
-import org.apache.catalina.ServerFactory;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardEngine;
+import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardServer;
 import org.apache.catalina.core.StandardWrapper;
+import org.apache.catalina.deploy.FilterDef;
+import org.apache.catalina.deploy.FilterMap;
+import org.apache.catalina.filters.RequestDumperFilter;
 import org.apache.catalina.ha.tcp.ReplicationValve;
 import org.apache.catalina.ha.tcp.SimpleTcpCluster;
+import org.apache.catalina.loader.WebappLoader;
 import org.apache.catalina.realm.MemoryRealm;
 import org.apache.catalina.session.StandardManager;
-import org.apache.catalina.startup.Embedded;
+import org.apache.catalina.startup.ContextConfig;
+import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.tribes.group.GroupChannel;
 import org.apache.catalina.tribes.membership.McastService;
 import org.apache.catalina.tribes.transport.MultiPointSender;
@@ -59,9 +65,11 @@ import org.apache.catalina.tribes.transp
 import org.apache.catalina.tribes.transport.nio.NioReceiver;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.valves.AccessLogValve;
-import org.apache.catalina.valves.RequestDumperValve;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.http11.Http11Protocol;
+import org.apache.tomcat.JarScanner;
+import org.apache.tomcat.util.IntrospectionUtils;
+import org.apache.tomcat.util.scan.StandardJarScanner;
 import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.concurrent.ExecutionPool;
 import org.ofbiz.base.container.ClassLoaderContainer;
@@ -148,7 +156,7 @@ public class CatalinaContainer implement
     }
 
     protected Delegator delegator = null;
-    protected Embedded embedded = null;
+    protected Tomcat tomcat = null;
     protected Map<String, ContainerConfig.Container.Property> clusterConfig = new HashMap<String, ContainerConfig.Container.Property>();
     protected Map<String, Engine> engines = new HashMap<String, Engine>();
     protected Map<String, Host> hosts = new HashMap<String, Host>();
@@ -184,20 +192,25 @@ public class CatalinaContainer implement
         this.catalinaRuntimeHome = ContainerConfig.getPropertyValue(cc, "catalina-runtime-home", "runtime/catalina");
 
         // set catalina_home
-        System.setProperty("catalina.home", System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome);
+        System.setProperty(Globals.CATALINA_HOME_PROP, System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome);
+        System.setProperty(Globals.CATALINA_BASE_PROP, System.getProperty(Globals.CATALINA_HOME_PROP));
+
+        // create the instance of embedded Tomcat
+        System.setProperty("catalina.useNaming", String.valueOf(useNaming));
+        tomcat = new Tomcat();
+        tomcat.setBaseDir(System.getProperty("ofbiz.home"));
+        if (useNaming) {
+            tomcat.enableNaming();
+        }
 
         // configure JNDI in the StandardServer
-        StandardServer server = (StandardServer) ServerFactory.getServer();
+        StandardServer server = (StandardServer) tomcat.getServer();
         try {
             server.setGlobalNamingContext(new InitialContext());
         } catch (NamingException e) {
             throw new ContainerException(e);
         }
 
-        // create the instance of Embedded
-        embedded = new Embedded();
-        embedded.setUseNaming(useNaming);
-
         // create the engines
         List<ContainerConfig.Container.Property> engineProps = cc.getPropertiesWithValue("engine");
         if (UtilValidate.isEmpty(engineProps)) {
@@ -215,18 +228,12 @@ public class CatalinaContainer implement
         for (ContainerConfig.Container.Property connectorProp: connectorProps) {
             createConnector(connectorProp);
         }
-
-        try {
-            embedded.initialize();
-        } catch (LifecycleException e) {
-            throw new ContainerException(e);
-        }
     }
 
     public boolean start() throws ContainerException {
-        // Start the embedded server
+        // Start the Tomcat server
         try {
-            embedded.start();
+            tomcat.getServer().start();
         } catch (LifecycleException e) {
             throw new ContainerException(e);
         }
@@ -234,11 +241,11 @@ public class CatalinaContainer implement
         // load the web applications
         loadComponents();
 
-        for (Connector con: embedded.findConnectors()) {
+        for (Connector con: tomcat.getService().findConnectors()) {
             ProtocolHandler ph = con.getProtocolHandler();
             if (ph instanceof Http11Protocol) {
                 Http11Protocol hph = (Http11Protocol) ph;
-                Debug.logInfo("Connector " + hph.getProtocols() + " @ " + hph.getPort() + " - " +
+                Debug.logInfo("Connector " + hph.getName() + " @ " + hph.getPort() + " - " +
                     (hph.getSecure() ? "secure" : "not-secure") + " [" + con.getProtocolHandlerClassName() + "] started.", module);
             } else {
                 Debug.logInfo("Connector " + con.getProtocol() + " @ " + con.getPort() + " - " +
@@ -250,8 +257,8 @@ public class CatalinaContainer implement
     }
 
     protected Engine createEngine(ContainerConfig.Container.Property engineConfig) throws ContainerException {
-        if (embedded == null) {
-            throw new ContainerException("Cannot create Engine without Embedded instance!");
+        if (tomcat == null) {
+            throw new ContainerException("Cannot create Engine without Tomcat instance!");
         }
 
         ContainerConfig.Container.Property defaultHostProp = engineConfig.getProperty("default-host");
@@ -262,7 +269,7 @@ public class CatalinaContainer implement
         String engineName = engineConfig.name;
         String hostName = defaultHostProp.value;
 
-        StandardEngine engine = (StandardEngine) embedded.createEngine();
+        StandardEngine engine = new StandardEngine();
         engine.setName(engineName);
         engine.setDefaultHost(hostName);
 
@@ -273,7 +280,7 @@ public class CatalinaContainer implement
         }
 
         // create the default realm -- TODO: make this configurable
-        String dbConfigPath = "catalina-users.xml";
+        String dbConfigPath = new File(System.getProperty("catalina.home"), "catalina-users.xml").getAbsolutePath();
         MemoryRealm realm = new MemoryRealm();
         realm.setPathname(dbConfigPath);
         engine.setRealm(realm);
@@ -284,6 +291,7 @@ public class CatalinaContainer implement
         // create a default virtual host; others will be created as needed
         Host host = createHost(engine, hostName);
         hosts.put(engineName + "._DEFAULT", host);
+        engine.addChild(host);
 
         // configure clustering
         List<ContainerConfig.Container.Property> clusterProps = engineConfig.getPropertiesWithValue("cluster");
@@ -297,13 +305,6 @@ public class CatalinaContainer implement
             clusterConfig.put(engineName, clusterProp);
         }
 
-        // request dumper valve
-        boolean enableRequestDump = ContainerConfig.getPropertyValue(engineConfig, "enable-request-dump", false);
-        if (enableRequestDump) {
-            RequestDumperValve rdv = new RequestDumperValve();
-            engine.addValve(rdv);
-        }
-
         // configure the CrossSubdomainSessionValve
         boolean enableSessionValve = ContainerConfig.getPropertyValue(engineConfig, "enable-cross-subdomain-sessions", false);
         if (enableSessionValve) {
@@ -361,22 +362,23 @@ public class CatalinaContainer implement
             engine.addValve(al);
         }
 
-        embedded.addEngine(engine);
+        tomcat.getService().setContainer(engine);
         return engine;
     }
 
     protected Host createHost(Engine engine, String hostName) throws ContainerException {
         Debug.logInfo("createHost(" + engine + ", " + hostName + ")", module);
-        if (embedded == null) {
-            throw new ContainerException("Cannot create Host without Embedded instance!");
+        if (tomcat == null) {
+            throw new ContainerException("Cannot create Host without Tomcat instance!");
         }
 
-        Host host = embedded.createHost(hostName, CATALINA_HOSTS_HOME);
+        Host host = new StandardHost();
+        host.setAppBase(CATALINA_HOSTS_HOME);
+        host.setName(hostName);
         host.setDeployOnStartup(false);
         host.setBackgroundProcessorDelay(5);
         host.setAutoDeploy(false);
         host.setRealm(engine.getRealm());
-        engine.addChild(host);
         hosts.put(engine.getName() + hostName, host);
 
         return host;
@@ -471,8 +473,8 @@ public class CatalinaContainer implement
     }
 
     protected Connector createConnector(ContainerConfig.Container.Property connectorProp) throws ContainerException {
-        if (embedded == null) {
-            throw new ContainerException("Cannot create Connector without Embedded instance!");
+        if (tomcat == null) {
+            throw new ContainerException("Cannot create Connector without Tomcat instance!");
         }
 
         // need some standard properties
@@ -492,13 +494,56 @@ public class CatalinaContainer implement
 
         Connector connector = null;
         if (UtilValidate.isNotEmpty(connectorProp.properties)) {
-            connector = embedded.createConnector(address, port, protocol);
+            if (address != null) {
+                /*
+                 * InetAddress.toString() returns a string of the form
+                 * "<hostname>/<literal_IP>". Get the latter part, so that the
+                 * address can be parsed (back) into an InetAddress using
+                 * InetAddress.getByName().
+                 */
+                int index = address.indexOf('/');
+                if (index != -1) {
+                    address = address.substring(index + 1);
+                }
+            }
+
+            Debug.logInfo("Creating connector for address='" +
+                          ((address == null) ? "ALL" : address) +
+                          "' port='" + port + "' protocol='" + protocol + "'", module);
+
+            try {
+
+                if (protocol.equals("ajp")) {
+                    connector = new Connector("org.apache.coyote.ajp.AjpProtocol");
+                } else if (protocol.equals("memory")) {
+                    connector = new Connector("org.apache.coyote.memory.MemoryProtocolHandler");
+                } else if (protocol.equals("http")) {
+                    connector = new Connector();
+                } else if (protocol.equals("https")) {
+                    connector = new Connector();
+                    connector.setScheme("https");
+                    connector.setSecure(true);
+                    connector.setProperty("SSLEnabled","true");
+                    // FIXME !!!! SET SSL PROPERTIES
+                } else {
+                    connector = new Connector(protocol);
+                }
+
+                if (address != null) {
+                    IntrospectionUtils.setProperty(connector, "address", "" + address);
+                }
+                IntrospectionUtils.setProperty(connector, "port", "" + port);
+
+            } catch (Exception e) {
+                Debug.logError(e, "Couldn't create connector.", module);
+            }
+            
             try {
                 for (ContainerConfig.Container.Property prop: connectorProp.properties.values()) {
                     connector.setProperty(prop.name, prop.value);
                     //connector.setAttribute(prop.name, prop.value);
                 }
-                embedded.addConnector(connector);
+                tomcat.getService().addConnector(connector);
             } catch (Exception e) {
                 throw new ContainerException(e);
             }
@@ -535,8 +580,16 @@ public class CatalinaContainer implement
 
             if (newHost) {
                 hosts.put(engine.getName() + "." + hostName, host);
+                engine.addChild(host);
             }
         }
+        
+        if (host instanceof StandardHost) {
+            // set the catalina's work directory to the host
+            StandardHost standardHost = (StandardHost) host;
+            standardHost.setWorkDir(new File(System.getProperty(Globals.CATALINA_HOME_PROP)
+                    , "work" + File.separator + engine.getName() + File.separator + host.getName()).getAbsolutePath());
+        }
 
         return new Callable<Context>() {
             public Context call() throws ContainerException, LifecycleException {
@@ -581,13 +634,27 @@ public class CatalinaContainer implement
         }
 
         // create the web application context
-        StandardContext context = (StandardContext) embedded.createContext(mount, location);
+        StandardContext context = new StandardContext();
+        context.setParent(host);
+        context.setDocBase(location);
+        context.setPath(mount);
+        context.addLifecycleListener(new ContextConfig());
+        
+        JarScanner jarScanner = context.getJarScanner();
+        if (jarScanner instanceof StandardJarScanner) {
+            StandardJarScanner standardJarScanner = (StandardJarScanner) jarScanner;
+            standardJarScanner.setScanClassPath(false);
+        }
+        
+        Engine egn = (Engine) context.getParent().getParent();
+        egn.setService(tomcat.getService());
+        
         Debug.logInfo("host[" + host + "].addChild(" + context + ")", module);
         //context.setDeployOnStartup(false);
         //context.setBackgroundProcessorDelay(5);
         context.setJ2EEApplication(J2EE_APP);
         context.setJ2EEServer(J2EE_SERVER);
-        context.setLoader(embedded.createLoader(ClassLoaderContainer.getClassLoader()));
+        context.setLoader(new WebappLoader(ClassLoaderContainer.getClassLoader()));
 
         context.setCookies(appInfo.isSessionCookieAccepted());
         context.addParameter("cookies", appInfo.isSessionCookieAccepted() ? "true" : "false");
@@ -604,8 +671,22 @@ public class CatalinaContainer implement
         context.getServletContext().setAttribute("_serverId", appInfo.server);
         context.getServletContext().setAttribute("componentName", appInfo.componentConfig.getComponentName());
 
+        // request dumper filter
+        String enableRequestDump = initParameters.get("enableRequestDump");
+        if ("true".equals(enableRequestDump)) {
+            // create the Requester Dumper Filter instance
+            FilterDef requestDumperFilterDef = new FilterDef();
+            requestDumperFilterDef.setFilterClass(RequestDumperFilter.class.getName());
+            requestDumperFilterDef.setFilterName("RequestDumper");
+            FilterMap requestDumperFilterMap = new FilterMap();
+            requestDumperFilterMap.setFilterName("RequestDumper");
+            requestDumperFilterMap.addURLPattern("*");
+            context.addFilterMap(requestDumperFilterMap);
+        }
+
         // create the Default Servlet instance to mount
         StandardWrapper defaultServlet = new StandardWrapper();
+        defaultServlet.setParent(context);
         defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet");
         defaultServlet.setServletName("default");
         defaultServlet.setLoadOnStartup(1);
@@ -617,6 +698,7 @@ public class CatalinaContainer implement
 
         // create the Jasper Servlet instance to mount
         StandardWrapper jspServlet = new StandardWrapper();
+        jspServlet.setParent(context);
         jspServlet.setServletClass("org.apache.jasper.servlet.JspServlet");
         jspServlet.setServletName("jsp");
         jspServlet.setLoadOnStartup(1);
@@ -643,8 +725,8 @@ public class CatalinaContainer implement
     }
 
     protected void loadComponents() throws ContainerException {
-        if (embedded == null) {
-            throw new ContainerException("Cannot load web applications without Embedded instance!");
+        if (tomcat == null) {
+            throw new ContainerException("Cannot load web applications without Tomcat instance!");
         }
 
         // load the applications
@@ -692,7 +774,7 @@ public class CatalinaContainer implement
 
     public void stop() throws ContainerException {
         try {
-            embedded.stop();
+            tomcat.stop();
         } catch (LifecycleException e) {
             // don't throw this; or it will kill the rest of the shutdown process
             Debug.logVerbose(e, module); // happens usually when running tests, disabled unless in verbose

Modified: ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java Mon Nov 28 08:04:21 2011
@@ -23,9 +23,9 @@ import java.io.IOException;
 import javax.servlet.ServletException;
 import javax.servlet.http.Cookie;
 
-import org.apache.catalina.Globals;
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
+import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.valves.ValveBase;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.MimeHeaders;
@@ -48,11 +48,11 @@ public class CrossSubdomainSessionValve 
         request.getSession(true);
 
         // replace any Tomcat-generated session cookies with our own
-        Cookie[] cookies = response.getCookies();
+        Cookie[] cookies = request.getCookies();
         if (cookies != null) {
             for (int i = 0; i < cookies.length; i++) {
                 Cookie cookie = cookies[i];
-                if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) {
+                if (ApplicationSessionCookieConfig.getSessionCookieName(null).equals(cookie.getName())) {
                     replaceCookie(request, response, cookie);
                 }
             }
@@ -107,7 +107,7 @@ public class CrossSubdomainSessionValve 
             }
 
             // find the Set-Cookie header for the existing cookie and replace its value with new cookie
-            MimeHeaders mimeHeaders = response.getCoyoteResponse().getMimeHeaders();
+            MimeHeaders mimeHeaders = request.getCoyoteRequest().getMimeHeaders();
             for (int i = 0, size = mimeHeaders.size(); i < size; i++) {
                 if (mimeHeaders.getName(i).equals("Set-Cookie")) {
                     MessageBytes value = mimeHeaders.getValue(i);

Modified: ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java Mon Nov 28 08:04:21 2011
@@ -44,7 +44,6 @@ public class OfbizStore extends StoreBas
     public static final String module = OfbizStore.class.getName();
     public static final String entityName = "CatalinaSession";
 
-    protected static String info = "OfbizStore/1.0";
     protected static String storeName = "OfbizStore";
 
     protected Delegator delegator = null;
@@ -54,11 +53,6 @@ public class OfbizStore extends StoreBas
     }
 
     @Override
-    public String getInfo() {
-        return info;
-    }
-
-    @Override
     public String getStoreName() {
         return storeName;
     }

Modified: ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Mon Nov 28 08:04:21 2011
@@ -25,11 +25,12 @@ import java.security.cert.X509Certificat
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 
+import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.ServerSocketFactory;
-import org.apache.tomcat.util.net.jsse.JSSEFactory;
 import org.apache.tomcat.util.net.jsse.JSSEImplementation;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.SSLUtil;
+import org.ofbiz.base.util.UtilValidate;
 
 /**
  * SSLImpl
@@ -42,13 +43,15 @@ public class SSLImpl extends JSSEImpleme
 
     public SSLImpl() throws ClassNotFoundException {
         super();
-        this.ssFactory = (new JSSEFactory()).getSocketFactory();
         this.allow =  new TrustManager[] { new AllowTrustManager() };
         Debug.log("SSLImpl loaded; using custom ServerSocketFactory", module);
     }
 
     @Override
-    public ServerSocketFactory getServerSocketFactory() {
+    public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) {
+        if (UtilValidate.isEmpty(this.ssFactory)) {
+            this.ssFactory = (new JSSEImplementation()).getServerSocketFactory(endpoint);
+        }
         return ssFactory;
     }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/common/config/CommonUiLabels.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/common/config/CommonUiLabels.xml Mon Nov 28 08:04:21 2011
@@ -9220,6 +9220,9 @@
         <value xml:lang="zh_CN">更新</value>
         <value xml:lang="zh_TW">更新</value>
     </property>
+    <property key="CommonUpdatingData">
+        <value xml:lang="en">Updating data</value>
+    </property>
     <property key="CommonUpdateLink">
         <value xml:lang="ar">ربطة التحديث</value>
         <value xml:lang="de">Aktualisieren Link</value>

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/dtd/entitymodel.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/dtd/entitymodel.xsd?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/dtd/entitymodel.xsd (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/dtd/entitymodel.xsd Mon Nov 28 08:04:21 2011
@@ -346,9 +346,10 @@ under the License.
         </xs:complexType>
     </xs:element>
     <xs:attributeGroup name="attlist.complex-alias-field">
-        <xs:attribute name="entity-alias" type="xs:string" use="required"/>
-        <xs:attribute name="field" type="xs:string" use="required"/>
+        <xs:attribute name="entity-alias" type="xs:string"/>
+        <xs:attribute name="field" type="xs:string"/>
         <xs:attribute name="default-value" type="xs:string"/>
+        <xs:attribute name="value" type="xs:string"/>
         <xs:attribute name="function" type="aggregate-function"/>
     </xs:attributeGroup>
     <xs:element name="view-link">

Modified: ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Mon Nov 28 08:04:21 2011
@@ -1045,12 +1045,14 @@ public class ModelViewEntity extends Mod
         protected final String field;
         protected final String defaultValue;
         protected final String function;
+        protected final String value;
 
         public ComplexAliasField(Element complexAliasFieldElement) {
             this.entityAlias = complexAliasFieldElement.getAttribute("entity-alias").intern();
             this.field = complexAliasFieldElement.getAttribute("field").intern();
             this.defaultValue = complexAliasFieldElement.getAttribute("default-value").intern();
             this.function = complexAliasFieldElement.getAttribute("function").intern();
+            this.value = complexAliasFieldElement.getAttribute("value").intern();
         }
 
         public ComplexAliasField(String entityAlias, String field, String defaultValue, String function) {
@@ -1058,36 +1060,49 @@ public class ModelViewEntity extends Mod
             this.field = field;
             this.defaultValue = defaultValue;
             this.function = function;
+            this.value = null;
+        }
+        public ComplexAliasField(String entityAlias, String field, String defaultValue, String function, String value) {
+            this.entityAlias = entityAlias;
+            this.field = field;
+            this.defaultValue = defaultValue;
+            this.function = function;
+            this.value = value;
         }
 
         /**
          * Make the alias as follows: function(coalesce(entityAlias.field, defaultValue))
          */
         public void makeAliasColName(StringBuilder colNameBuffer, StringBuilder fieldTypeBuffer, ModelViewEntity modelViewEntity, ModelReader modelReader) {
-            ModelEntity modelEntity = modelViewEntity.getAliasedEntity(entityAlias, modelReader);
-            ModelField modelField = modelViewEntity.getAliasedField(modelEntity, field, modelReader);
-
-            String colName = entityAlias + "." + modelField.getColName();
-
-            if (UtilValidate.isNotEmpty(defaultValue)) {
-                colName = "COALESCE(" + colName + "," + defaultValue + ")";
-            }
-
-            if (UtilValidate.isNotEmpty(function)) {
-                String prefix = functionPrefixMap.get(function);
-                if (prefix == null) {
-                    Debug.logWarning("[" + modelViewEntity.getEntityName() + "]: Specified alias function [" + function + "] not valid; must be: min, max, sum, avg, count or count-distinct; using a column name with no function function", module);
-                } else {
-                    colName = prefix + colName + ")";
+            if(UtilValidate.isEmpty(entityAlias) 
+                    && UtilValidate.isEmpty(field) 
+                    && UtilValidate.isNotEmpty(value)){
+                colNameBuffer.append(value);
+            }
+            else {
+                ModelEntity modelEntity = modelViewEntity.getAliasedEntity(entityAlias, modelReader);
+                ModelField modelField = modelViewEntity.getAliasedField(modelEntity, field, modelReader);
+                String colName = entityAlias + "." + modelField.getColName();
+    
+                if (UtilValidate.isNotEmpty(defaultValue)) {
+                    colName = "COALESCE(" + colName + "," + defaultValue + ")";
+                }
+    
+                if (UtilValidate.isNotEmpty(function)) {
+                    String prefix = functionPrefixMap.get(function);
+                    if (prefix == null) {
+                        Debug.logWarning("[" + modelViewEntity.getEntityName() + "]: Specified alias function [" + function + "] not valid; must be: min, max, sum, avg, count or count-distinct; using a column name with no function function", module);
+                    } else {
+                        colName = prefix + colName + ")";
+                    }
+                }
+    
+                colNameBuffer.append(colName);
+                //set fieldTypeBuffer if not already set
+                if (fieldTypeBuffer.length() == 0) {
+                    fieldTypeBuffer.append(modelField.type);
                 }
             }
-
-            colNameBuffer.append(colName);
-
-            //set fieldTypeBuffer if not already set
-            if (fieldTypeBuffer.length() == 0) {
-                fieldTypeBuffer.append(modelField.type);
-            }
         }
     }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java Mon Nov 28 08:04:21 2011
@@ -236,7 +236,7 @@ public class Start {
     }
 
     private String sendSocketCommand(String command) throws IOException, ConnectException {
-    	String response = "OFBiz Down";
+    	String response = "OFBiz is Down";
     	
     	try {
     	Socket socket = new Socket(config.adminAddress, config.adminPort);

Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java Mon Nov 28 08:04:21 2011
@@ -22,7 +22,6 @@ package org.ofbiz.testtools.seleniumxml;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -45,7 +44,7 @@ import org.apache.http.conn.ClientConnec
 import org.apache.http.conn.scheme.PlainSocketFactory;
 import org.apache.http.conn.scheme.Scheme;
 import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.scheme.SocketFactory;
+import org.apache.http.conn.scheme.SchemeSocketFactory;
 import org.apache.http.cookie.Cookie;
 import org.apache.http.impl.client.BasicCookieStore;
 import org.apache.http.impl.client.BasicResponseHandler;
@@ -56,8 +55,10 @@ import org.apache.http.params.BasicHttpP
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 import org.apache.http.protocol.BasicHttpContext;
+import org.apache.http.util.EntityUtils;
 import org.jdom.Element;
 
+import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilValidate;
 
 
@@ -67,13 +68,11 @@ public class RemoteRequest {
 
     /**
      * The default parameters.
-     * Instantiated in {@link #setup setup}.
      */
     private static HttpParams defaultParameters = null;
 
     /**
      * The scheme registry.
-     * Instantiated in {@link #setup setup}.
      */
     private static SchemeRegistry supportedSchemes;
     final private static String JsonHandleMode = "JSON_HANDLE";
@@ -93,23 +92,20 @@ public class RemoteRequest {
     private String loginAsUserParam;
     private String loginAsPasswordParam;
 
-    private int currentRowIndx;
-
     static {
 
         supportedSchemes = new SchemeRegistry();
 
         // Register the "http" protocol scheme, it is required
         // by the default operator to look up socket factories.
-        SocketFactory sf = PlainSocketFactory.getSocketFactory();
-        supportedSchemes.register(new Scheme("http", sf, 80));
+        SchemeSocketFactory sf = PlainSocketFactory.getSocketFactory();
+        supportedSchemes.register(new Scheme("http", 80, sf));
 
         // prepare parameters
         HttpParams params = new BasicHttpParams();
         HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
         HttpProtocolParams.setContentCharset(params, "UTF-8");
         HttpProtocolParams.setUseExpectContinue(params, true);
-        //HttpClientParams.setAuthenticating(params, true);
         defaultParameters = params;
 
     }
@@ -133,8 +129,10 @@ public class RemoteRequest {
         this.host = hostString;
         this.children = children;
         this.responseHandlerMode = (HttpHandleMode.equals(responseHandlerMode)) ? HttpHandleMode : JsonHandleMode;
-        System.out.println("RemoteRequest, requestUrl: " + this.requestUrl);
-        System.out.println("RemoteRequest, host: " + this.host);
+        if(Debug.infoOn()) {
+            Debug.logInfo("RemoteRequest, requestUrl: " + this.requestUrl, module);
+            Debug.logInfo("RemoteRequest, host: " + this.host, module);
+        }
         initData();
     }
 
@@ -148,7 +146,8 @@ public class RemoteRequest {
             if (nm.equals("param-in")) {
                 name = elem.getAttributeValue("name");
                 value = this.parent.replaceParam(elem.getAttributeValue("value"));
-                System.out.println("RemoteRequest, param-in, name: " + name + ", value: " + value);
+                if(Debug.infoOn()) Debug.logInfo("RemoteRequest, param-in, name: " + name
+                        + ", value: " + value, module);
                 this.inMap.put(name, value);
             } else if (nm.equals("param-out")) {
                 name = elem.getAttributeValue("result-name");
@@ -159,22 +158,16 @@ public class RemoteRequest {
                 this.outMap.put(name, fieldName);
             }
         }
-        return;
     }
 
     public void runTest() {
 
-        ClientConnectionManager ccm =
-            new ThreadSafeClientConnManager(defaultParameters, supportedSchemes);
-        //  new SingleClientConnManager(getParams(), supportedSchemes);
-
+        ClientConnectionManager ccm = new ThreadSafeClientConnManager(supportedSchemes);
         DefaultHttpClient client = new DefaultHttpClient(ccm, defaultParameters);
         client.setKeepAliveStrategy(new DefaultConnectionKeepAliveStrategy());
 
-        //
         // We first try to login with the loginAs to set the session.
         // Then we call the remote service.
-        //
         HttpEntity entity = null;
         ResponseHandler <String> responseHandler = null;
         try {
@@ -191,50 +184,26 @@ public class RemoteRequest {
                 String loginAsParamString = "?" + this.loginAsUserParam + "&" + this.loginAsPasswordParam;
 
                 HttpGet req2 = new HttpGet ( loginAsUri + loginAsParamString );
-                System.out.println("loginAsUrl:" + loginAsUri + loginAsParamString);
+                if(Debug.infoOn()) Debug.logInfo("loginAsUrl:" + loginAsUri + loginAsParamString, module);
 
                 req2.setHeader("Connection","Keep-Alive");
                 HttpResponse rsp = client.execute(req2, localContext);
 
                 Header[] headers = rsp.getAllHeaders();
-                for (int i=0; i<headers.length; i++) {
-                    Header hdr = headers[i];
+                for (Header hdr : headers) {
                     String headerValue = hdr.getValue();
                     if (headerValue.startsWith("JSESSIONID")) {
                         sessionHeader = hdr;
                     }
-                    System.out.println("login: " + hdr.getName() + " : " + hdr.getValue());
+                    if(Debug.infoOn()) Debug.logInfo("login: " + hdr.getName() + " : " + hdr.getValue(), module);
                 }
                 List<Cookie> cookies = cookieStore.getCookies();
-                System.out.println("cookies.size(): " + cookies.size());
-                for (int i = 0; i < cookies.size(); i++) {
-                    System.out.println("Local cookie(0): " + cookies.get(i));
+                if(Debug.infoOn()) Debug.logInfo("cookies.size(): " + cookies.size(), module);
+                for (Cookie cookie : cookies) {
+                    if(Debug.infoOn()) Debug.logInfo("Local cookie(0): " + cookie, module);
                 }
             }
-            //String paramString2 = "USERNAME=" + this.parent.getUserName()
-            //                   + "&PASSWORD=" + this.parent.getPassword();
-            //String thisUri2 = this.host + "/eng/control/login?" + paramString2;
-            //HttpGet req2 = new HttpGet ( thisUri2 );
-            //req2.setHeader("Connection","Keep-Alive");
-            //HttpResponse rsp = client.execute(req2, localContext);
-
-            //Header sessionHeader = null;
-            //Header[] headers = rsp.getAllHeaders();
-            //for (int i=0; i<headers.length; i++) {
-            //    Header hdr = headers[i];
-            //    String headerValue = hdr.getValue();
-            //    if (headerValue.startsWith("JSESSIONID")) {
-            //        sessionHeader = hdr;
-            //    }
-            //    System.out.println(headers[i]);
-            //    System.out.println(hdr.getName() + " : " + hdr.getValue());
-            //}
-
-            //List<Cookie> cookies = cookieStore.getCookies();
-            //System.out.println("cookies.size(): " + cookies.size());
-            //for (int i = 0; i < cookies.size(); i++) {
-            //    System.out.println("Local cookie(0): " + cookies.get(i));
-            //}
+
             if (HttpHandleMode.equals(this.responseHandlerMode)) {
 
             } else {
@@ -253,14 +222,7 @@ public class RemoteRequest {
             } else {
                 thisUri = this.host + this.requestUrl + "?" + paramString;
             }
-            //String sessionHeaderValue = sessionHeader.getValue();
-            //int pos1 = sessionHeaderValue.indexOf("=");
-            //int pos2 = sessionHeaderValue.indexOf(";");
-            //String sessionId = sessionHeaderValue.substring(pos1 + 1, pos2);
-            //System.out.println("sessionId: " + sessionId);
-            //String thisUri = this.host + this.requestUrl + ";jsessionid=" + sessionId + "?"  + paramString;
-            //String thisUri = this.host + this.requestUrl + "?"  + paramString;
-            System.out.println("thisUri: " + thisUri);
+            if(Debug.infoOn()) Debug.logInfo("thisUri: " + thisUri, module);
 
             HttpGet req = new HttpGet ( thisUri );
             if(sessionHeader != null) {
@@ -268,21 +230,6 @@ public class RemoteRequest {
             }
 
             String responseBody = client.execute( req, responseHandler, localContext);
-            /*
-            entity = rsp.getEntity();
-
-            System.out.println("----------------------------------------");
-            System.out.println(rsp.getStatusLine());
-            Header[] headers = rsp.getAllHeaders();
-            for (int i=0; i<headers.length; i++) {
-                System.out.println(headers[i]);
-            }
-            System.out.println("----------------------------------------");
-
-            if (entity != null) {
-                System.out.println(EntityUtils.toString(rsp.getEntity()));
-            }
-            */
         } catch(HttpResponseException e) {
             System.out.println(e.getMessage());
         } catch(IOException e) {
@@ -295,29 +242,14 @@ public class RemoteRequest {
             // if there is no entity, the connection is already released
             try {
               if (entity != null)
-                entity.consumeContent(); // release connection gracefully
+                EntityUtils.consume(entity); // release connection gracefully
             } catch(IOException e) {
                 System.out.println("in 'finally'  " + e.getMessage());
             }
 
         }
-        return;
     }
 
-    private void login(DefaultHttpClient client, BasicHttpContext localContext) throws IOException{
-
-        String paramString = "USERNAME=" + this.parent.getUserName()
-                           + "&PASSWORD=" + this.parent.getPassword();
-        String thisUri = this.host + "/eng/control/login?" + paramString;
-        HttpGet req = new HttpGet ( thisUri );
-        req.setHeader("Connection","Keep-Alive");
-        client.execute(req, localContext);
-
-        //client.getCredentialsProvider().setCredentials(new AuthScope("localhost", 8080),
-        //        new UsernamePasswordCredentials(this.parent.getUserName(),                        this.parent.getPassword()));
-
-        return;
-    }
         /** URL Encodes a Map of arguements */
     public static String urlEncodeArgs(Map<String, ? extends Object> args, boolean useExpandedEntites) {
         StringBuilder buf = new StringBuilder();
@@ -367,9 +299,8 @@ public class RemoteRequest {
             super();
             this.parentRemoteRequest = parentRemoteRequest;
         }
-        public String handleResponse(org.apache.http.HttpResponse response)
-            throws HttpResponseException, IOException {
 
+        public String handleResponse(org.apache.http.HttpResponse response) throws IOException {
             String bodyString = super.handleResponse(response);
             JSONObject jsonObject = null;
             try {
@@ -378,13 +309,12 @@ public class RemoteRequest {
                 throw new HttpResponseException(0, e.getMessage());
             }
             Set<Map.Entry<String, String>> paramSet = this.parentRemoteRequest.outMap.entrySet();
-            Iterator<Map.Entry<String, String>> paramIter = paramSet.iterator();
             Map<String, Object> parentDataMap = this.parentRemoteRequest.parent.getMap();
-            while (paramIter.hasNext()) {
-                Map.Entry<String, String> paramPair = paramIter.next();
+            for (Map.Entry<String, String> paramPair : paramSet) {
                 if (jsonObject.containsKey(paramPair.getKey())) {
                    Object obj = jsonObject.get(paramPair.getKey());
-                   System.out.println("RemoteRequest, param-out, name: " + paramPair.getKey() + ", value: " + obj);
+                    if(Debug.infoOn()) Debug.logInfo("RemoteRequest, param-out, name: " + paramPair.getKey()
+                            + ", value: " + obj, module);
                    parentDataMap.put(paramPair.getKey(), obj);
                 }
             }

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Mon Nov 28 08:04:21 2011
@@ -613,19 +613,17 @@ public class MacroScreenRenderer impleme
                     fullUrlString = request.getRequestURI() + "?" + queryString;
                 }
             }
-            if (!collapsed) {
-                StringWriter sb = new StringWriter();
-                if (navMenu != null) {
-                    MenuStringRenderer savedRenderer = (MenuStringRenderer) context.get("menuStringRenderer");
-                    MenuStringRenderer renderer = new ScreenletMenuRenderer(request, response);
-                    context.put("menuStringRenderer", renderer);
-                    navMenu.renderWidgetString(sb, context, this);
-                    context.put("menuStringRenderer", savedRenderer);
-                } else if (navForm != null) {
-                    renderScreenletPaginateMenu(sb, context, navForm);
-                }
-                menuString = sb.toString();
+            StringWriter sb = new StringWriter();
+            if (navMenu != null) {
+                MenuStringRenderer savedRenderer = (MenuStringRenderer) context.get("menuStringRenderer");
+                MenuStringRenderer renderer = new ScreenletMenuRenderer(request, response);
+                context.put("menuStringRenderer", renderer);
+                navMenu.renderWidgetString(sb, context, this);
+                context.put("menuStringRenderer", savedRenderer);
+            } else if (navForm != null) {
+                renderScreenletPaginateMenu(sb, context, navForm);
             }
+            menuString = sb.toString();
         }
 
         Map<String, Object> parameters = FastMap.newInstance();

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Nov 28 08:04:21 2011
@@ -691,9 +691,9 @@ Parameter: lastViewName, String, optiona
 <li class="${paginateNextStyle}<#if highIndex lt listSize>"><a href="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxNextUrl}')<#else>${nextUrl}</#if>">${paginateNextLabel}</a><#else>-disabled"><span>${paginateNextLabel}</span></#if></li>
 <li class="${paginateLastStyle}<#if highIndex lt listSize>"><a href="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxLastUrl}')<#else>${lastUrl}</#if>">${paginateLastLabel}</a><#else>-disabled"><span>${paginateLastLabel}</span></#if></li>
 <#if javaScriptEnabled><li class="nav-pagesize"><select name="pageSize" size="1" onchange="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxSelectSizeUrl}')<#else>location.href='${selectSizeUrl}';</#if>"><#rt/>
-<#assign availPageSizes = [20, 30, 50, 100, 200]>
+<#assign availPageSizes = [viewSize, 20, 30, 50, 100, 200]>
 <#list availPageSizes as ps>
-  <option <#if viewSize == ps>selected="selected" </#if> value="${ps}">${ps}</option>
+  <option<#if viewSize == ps> selected="selected" </#if> value="${ps}">${ps}</option>
 </#list>
 </select> ${paginateViewSizeLabel}</li></#if>
 <li class="nav-displaying">${commonDisplaying}</li>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlScreenMacroLibrary.ftl Mon Nov 28 08:04:21 2011
@@ -157,9 +157,12 @@ expanded"><a <#if javaScriptEnabled>oncl
 </#if>
 >&nbsp;</a></li>
 </#if>
+<#--
 <#if !collapsed>
 ${menuString}
 </#if>
+ -->
+${menuString}
 </ul><br class="clear" /></div>
 </#if>
 <div <#if collapsibleAreaId?has_content> id="${collapsibleAreaId}" <#if collapsed> style="display: none;"</#if></#if><#if padded> class="screenlet-body"<#else> class="screenlet-body no-padding"</#if>>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml Mon Nov 28 08:04:21 2011
@@ -129,8 +129,8 @@ under the License.
     <ProductStoreEmailSetting productStoreId="9000" emailType="UNSUB_CONT_LIST_NOTI" bodyScreenLocation="component://ecommerce/widget/EmailContactListScreens.xml#ContactListUnsubscribeEmail" subject="Unsubscribe Contact List" fromAddress="ofbiztest@example.com"/>
     <ProductStoreEmailSetting productStoreId="9000" emailType="CONT_EMAIL_TEMPLATE" bodyScreenLocation="component://ecommerce/widget/EmailContactListScreens.xml#ContactListEmailTemplate"/>
 
-    <WebAnalyticsConfig productStoreId="9000" webAnalyticsTypeId="GOOGLE_ANALYTICS" webAnalyticsCode="--  enter here your analytic script code --" isEnabled="Y" description="This is code provided from google analytics"/>
-    <WebAnalyticsConfig productStoreId="9000" webAnalyticsTypeId="BING_ANALYTICS" webAnalyticsCode="--  enter here your analytic script code --" isEnabled="Y" description="This is code provided from bing analytics"/>
+    <WebAnalyticsConfig webSiteId="WebStore" webAnalyticsTypeId="GOOGLE_ANALYTICS" webAnalyticsCode="--  enter here your analytic script code --"/>
+    <WebAnalyticsConfig webSiteId="WebStore" webAnalyticsTypeId="BING_ANALYTICS" webAnalyticsCode="--  enter here your analytic script code --"/>
 
     <ProductStoreFacility productStoreId="9000" facilityId="WebStoreWarehouse" fromDate="2001-05-13 12:00:00.0"/>
     <ProductStoreRole partyId="admin" roleTypeId="SALES_REP" productStoreId="9000" fromDate="2001-05-13 12:00:00.0"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Mon Nov 28 08:04:21 2011
@@ -964,24 +964,6 @@ under the License.
         </if-empty>
     </simple-method>
 
-    <simple-method method-name="setAnonUserLogin" short-description="Set user login in the session" login-required="false">
-        <if-empty field="userLogin">
-            <entity-one entity-name="UserLogin" value-field="userLogin">
-                <field-map field-name="userLoginId" value="anonymous"/>
-            </entity-one>
-            <set field="userLogin.partyId" from-field="partyId"/>
-            <set-current-user-login value-field="userLogin"/>
-        <else>
-            <!-- If an anonymous vistor is coming back, update the party id in the userLogin object -->
-            <if-compare field="userLogin.userLoginId" operator="equals" value="anonymous">
-                <set field="userLogin.partyId" from-field="partyId"/>
-            </if-compare>
-        </else>
-        </if-empty>
-        <field-to-request field="userLogin" request-name="userLogin"/>
-        <log level="info" message="userLogin is ${userLogin}"/>
-    </simple-method>
-
     <simple-method method-name="getShipOptions" short-description="Get shipping options" login-required="false">
         <set field="dispatcher" from-field="parameters.dispatcher" type="Object"/>
         <set field="shoppingCart" from-field="parameters.shoppingCart"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Mon Nov 28 08:04:21 2011
@@ -263,7 +263,7 @@ function createUpdateCustomerAndShipping
                     jQuery('#shipToPartyId').val(json.partyId);
                     jQuery('#billToPartyId').val(json.partyId);
                     jQuery('#shipToContactMechId').val(json.contactMechId);
-                    jQuery('#shipToPhoneContactMechId').val(json.phoneContactMechId);
+                    jQuery('#shipToPhoneContactMechId').val(json.shipToPhoneContactMechId);
                     jQuery('#emailContactMechId').val(json.emailContactMechId);
                     //jQuery('#completedShippingMethod').html(json.shippingDescription);
                     updateShippingSummary();
@@ -394,7 +394,7 @@ function processBillingAndPayment() {
                     isBillStepValidate = true;
                     jQuery('#billToContactMechId').val(json.contactMechId);
                     jQuery('#paymentMethodId').val(json.paymentMethodId);
-                    jQuery('#billToPhoneContactMechId').val(json.phoneContactMechId);
+                    jQuery('#billToPhoneContactMechId').val(json.billToPhoneContactMechId);
                     updateBillingSummary();
                     result = true;
                 } else {

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Mon Nov 28 08:04:21 2011
@@ -62,8 +62,10 @@ under the License.
                   <input type="hidden" id="shipToContactMechId" name="shipToContactMechId" value="${shipToContactMechId?if_exists}" />
                   <input type="hidden" id="billToContactMechIdInShipingForm" name="billToContactMechId" value="${billToContactMechId?if_exists}" />
                   <input type="hidden" id="shipToPartyId" name="partyId" value="${partyId?if_exists}" />
-                  <input type="hidden" id="shipToPhoneContactMechId" name="phoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="shipToPhoneContactMechId" name="shipToPhoneContactMechId" value="${(shipToTelecomNumber.contactMechId)?if_exists}" />
                   <input type="hidden" id="emailContactMechId" name="emailContactMechId" value="${emailContactMechId?if_exists}" />
+                  <input type="hidden" name="shipToName" value="${shipToName?if_exists}" />
+                  <input type="hidden" name="shipToAttnName" value="${shipToAttnName?if_exists}" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultShipping" value="Y" />
@@ -287,7 +289,9 @@ under the License.
                   <input type="hidden" id="paymentMethodTypeId" name="paymentMethodTypeId" value="${paymentMethodTypeId?default("CREDIT_CARD")}" />
                   <input type="hidden" id="billToPartyId" name="partyId" value="${parameters.partyId?if_exists}" />
                   <input type="hidden" name="expireDate" value="${expireDate?if_exists}" />
-                  <input type="hidden" id="billToPhoneContactMechId" name="phoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" id="billToPhoneContactMechId" name="billToPhoneContactMechId" value="${(billToTelecomNumber.contactMechId)?if_exists}" />
+                  <input type="hidden" name="billToName" value="${billToName?if_exists}" />
+                  <input type="hidden" name="billToAttnName" value="${billToAttnName?if_exists}" />
                   <#if userLogin?exists>
                     <input type="hidden" name="keepAddressBook" value="Y" />
                     <input type="hidden" name="setDefaultBilling" value="Y" />

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CommonScreens.xml Mon Nov 28 08:04:21 2011
@@ -62,7 +62,6 @@ under the License.
                 <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/>
                 <entity-and list="webAnalyticsConfigs" entity-name="WebAnalyticsConfig">
                     <field-map field-name="webSiteId"/>
-                    <field-map field-name="isEnabled" value="Y"/>
                 </entity-and>
             </actions>
             <widgets>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CustomerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CustomerScreens.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/widget/CustomerScreens.xml Mon Nov 28 08:04:21 2011
@@ -476,9 +476,45 @@ under the License.
             </widgets>
         </section>
     </screen>
+    <screen name="newcustomer">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleNewCustomer"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/NewCustomer.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/customer/newcustomer.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="viewprofile">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleViewProfile"/>
+
+                <set field="partyId" from-field="userLogin.partyId"/>
+                <entity-one entity-name="Party" value-field="party"/>
+                <entity-one entity-name="Person" value-field="person"/>
+                <entity-one entity-name="PartyGroup" value-field="partyGroup"/>
+
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/customer/viewprofile.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <!-- To use new pages uncomment following screens i.e. newcustomer and viewprofile and comment existing newcustomer and viewprofile screens above -->
 
-    <screen name="newcustomer">
+    <!--screen name="newcustomer">
         <section>
             <actions>
                 <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
@@ -519,7 +555,7 @@ under the License.
                 </decorator-screen>
             </widgets>
         </section>
-    </screen>
+    </screen-->
 
 
     <screen name="EditProfile">

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/entitydef/entitymodel.xml?rev=1207005&r1=1207004&r2=1207005&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/projectmgr/entitydef/entitymodel.xml Mon Nov 28 08:04:21 2011
@@ -252,6 +252,168 @@ under the License.
     </relation>
   </view-entity>
 
+  <view-entity entity-name="ProjectPhaseTaskAssignmentView"
+    package-name="org.ofbiz.specialpurpose.project">
+    <description>This view is used to deduct project's status from its children tasks status and
+        to deduct the status of a task depending on its assigned resources and time entries</description>
+    <member-entity entity-alias="WEP" entity-name="WorkEffort"/><!--project -->
+    <member-entity entity-alias="WEPH" entity-name="WorkEffort"/><!-- phase -->
+    <member-entity entity-alias="WET" entity-name="WorkEffort"/><!-- task -->
+    <member-entity entity-alias="PAS" entity-name="WorkEffortPartyAssignment"/> <!-- Party assigned -->
+    <member-entity entity-alias="TE" entity-name="TimeEntry"/>
+
+    <alias entity-alias="WEP" field="workEffortId" name="projectId" group-by="true"/>
+    <alias entity-alias="WEPH" field="workEffortId" name="phaseId" group-by="true"/>
+    <alias entity-alias="WET" field="workEffortId" name="taskId" group-by="true"/>
+    <alias entity-alias="WET" field="currentStatusId" name="taskStatusId" group-by="true"/>
+    <alias entity-alias="PAS" field="partyId" name="resourceCount" function="count-distinct"/>
+    <alias entity-alias="TE" field="timeEntryId" name="entriesCount" function="count-distinct"/>
+    
+    <view-link entity-alias="WEP" rel-entity-alias="WEPH" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WEPH" rel-entity-alias="WET" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WET" rel-entity-alias="PAS" rel-optional="true">
+      <key-map field-name="workEffortId" />
+    </view-link>
+        <view-link entity-alias="WET" rel-entity-alias="TE" rel-optional="true">
+      <key-map field-name="workEffortId" />
+    </view-link>
+  </view-entity>
+
+  <view-entity entity-name="ProjectPhaseTaskSummaryView"
+    package-name="org.ofbiz.specialpurpose.project">
+    <description>Retrieve actual, estimated start and end dates, priority, planned hours</description>
+
+    <member-entity entity-alias="WEP" entity-name="WorkEffort"/><!--project -->
+    <member-entity entity-alias="WEPH" entity-name="WorkEffort"/><!-- phase -->
+    <member-entity entity-alias="WET" entity-name="WorkEffort"/><!-- task -->
+    <member-entity entity-alias="TE" entity-name="TimeEntry"/><!-- to get actualStartDate from declared times-->
+    <member-entity entity-alias="SKL" entity-name="WorkEffortSkillStandard"/> <!-- for planned hours -->
+
+    <alias entity-alias="WEP" field="workEffortId" name="projectId" group-by="true"/>
+    <alias entity-alias="WEPH" field="workEffortId" name="phaseId" group-by="true"/>
+    <alias entity-alias="WET" field="workEffortId" name="taskId" group-by="true"/>
+
+    <!-- get minimum for start dates -->
+    <alias entity-alias="WET" name="estimatedStartDate" function="min"/>
+    <alias entity-alias="WET" name="actualStartDate" function="min"/>
+    <alias entity-alias="TE" field="fromDate" name="actualEntryStartDate" function="min"/>
+
+    <!-- and maximum for completion dates -->
+    <alias entity-alias="WET" name="estimatedCompletionDate" function="max"/>
+    <alias entity-alias="WET" name="actualCompletionDate" function="max"/>
+    <alias entity-alias="TE" field="fromDate" name="actualEntryCompletionDate" function="max"/>
+
+    <!-- get the sum of planned and actual hours -->
+    <alias entity-alias="SKL" field="estimatedDuration" name="plannedHours" function="sum"/>
+    <!-- get the minimum priority -->
+    <alias entity-alias="WET" field="priority" name="priority" function="min"/>
+
+    <view-link entity-alias="WEP" rel-entity-alias="WEPH" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WEPH" rel-entity-alias="WET" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WET" rel-entity-alias="SKL" rel-optional="true">
+      <key-map field-name="workEffortId" />
+    </view-link>
+    <view-link entity-alias="WET" rel-entity-alias="TE" rel-optional="true">
+      <key-map field-name="workEffortId" />
+    </view-link>
+  </view-entity>
+
+  <view-entity entity-name="ProjectPhaseTaskActualHoursView"
+    package-name="org.ofbiz.specialpurpose.project">
+    <description>prepare actual hours total per project, phase or task,
+        this view is used by another view that do sums</description>
+    <member-entity entity-alias="WEP" entity-name="WorkEffort"/><!--project -->
+    <member-entity entity-alias="WEPH" entity-name="WorkEffort"/><!-- phase -->
+    <member-entity entity-alias="WET" entity-name="WorkEffort"/><!-- task -->
+    <member-entity entity-alias="TE" entity-name="TimeEntry"/>
+    <member-entity entity-alias="TS" entity-name="Timesheet"/>
+    <member-entity entity-alias="PR" entity-name="PartyRate"/>
+
+    <alias entity-alias="WEP" field="workEffortId" name="projectId" group-by="true"/>
+    <alias entity-alias="WEPH" field="workEffortId" name="phaseId" group-by="true"/>
+    <alias entity-alias="WET" field="workEffortId" name="taskId" group-by="true"/>
+    <alias entity-alias="TE" name="timeEntryId" group-by="true"/>
+    <alias entity-alias="TE" name="hours" group-by="true"/>
+    <alias entity-alias="TE" name="invoiceId" group-by="true"/>
+    <alias entity-alias="PR" name="partyId" group-by="true"/>
+    <alias entity-alias="PR" name="percentageUsed" function="max"/>
+
+    <view-link entity-alias="WEP" rel-entity-alias="WEPH" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WEPH" rel-entity-alias="WET" rel-optional="true">
+      <key-map field-name="workEffortId" rel-field-name="workEffortParentId"/>
+    </view-link>
+    <view-link entity-alias="WET" rel-entity-alias="TE" rel-optional="true">
+      <key-map field-name="workEffortId" />
+    </view-link>
+    <view-link entity-alias="TE" rel-entity-alias="TS" rel-optional="true">
+      <key-map field-name="timesheetId" />
+    </view-link>
+    <view-link entity-alias="TE" rel-entity-alias="PR" rel-optional="true">
+      <key-map field-name="rateTypeId"/>
+      <entity-condition>
+        <condition-list>
+            <condition-expr entity-alias="TS" field-name="partyId" rel-entity-alias="PR" rel-field-name="partyId"/>
+            <condition-expr entity-alias="PR" field-name="fromDate" operator="less-equals" rel-entity-alias="TE" rel-field-name="fromDate"/>
+            <condition-list combine="or">
+                <condition-expr entity-alias="PR" field-name="thruDate" operator="equals" value=""/>
+                <condition-expr entity-alias="PR" field-name="thruDate" operator="greater-equals" rel-entity-alias="TE" rel-field-name="fromDate"/>
+            </condition-list>
+        </condition-list>
+    </entity-condition>
+    </view-link>
+  </view-entity>
+
+  <view-entity entity-name="ProjectPhaseTaskActualRatedHoursView"
+    package-name="org.ofbiz.specialpurpose.project">
+    <description>get total actual hour for which there is a valid partyRate that can be applicable</description>
+    <member-entity entity-alias="PPAH" entity-name="ProjectPhaseTaskActualHoursView"/>
+
+    <alias entity-alias="PPAH" name="projectId" group-by="true"/>
+    <alias entity-alias="PPAH" name="phaseId" group-by="true"/>
+    <alias entity-alias="PPAH" name="taskId" group-by="true"/>
+    <alias entity-alias="PPAH" name="invoiceId" group-by="true"/>
+    <alias entity-alias="PPAH" name="totalOriginalHours" field="hours" function="sum"/>
+    <alias name="totalRatedHours" function="sum">
+        <complex-alias operator="/">
+            <complex-alias operator="*">
+                <complex-alias-field entity-alias="PPAH" field="hours"/>
+                <complex-alias-field entity-alias="PPAH" field="percentageUsed"/>
+            </complex-alias>
+            <complex-alias-field entity-alias="" field="" value="100"/>
+        </complex-alias>
+    </alias>
+
+    <entity-condition>
+        <condition-expr entity-alias="PPAH" field-name="percentageUsed" operator="not-equals" value=""/>
+    </entity-condition>
+  </view-entity>
+
+  <view-entity entity-name="ProjectPhaseTaskActualNotRatedHoursView"
+    package-name="org.ofbiz.specialpurpose.project">
+    <description>get total actual hour for which there is NO valid partyRate applicable</description>
+    <member-entity entity-alias="PPAH" entity-name="ProjectPhaseTaskActualHoursView"/>
+
+    <alias entity-alias="PPAH" name="projectId" group-by="true"/>
+    <alias entity-alias="PPAH" name="phaseId" group-by="true"/>
+    <alias entity-alias="PPAH" name="taskId" group-by="true"/>
+        <alias entity-alias="PPAH" name="invoiceId" group-by="true"/>
+    <alias entity-alias="PPAH" name="totalOriginalHours" field="hours" function="sum"/>
+
+    <entity-condition>
+        <condition-expr entity-alias="PPAH" field-name="percentageUsed" operator="equals" value=""/>
+    </entity-condition>
+  </view-entity>
+
   <view-entity entity-name="TimesheetAndTimeEntry"
     package-name="org.ofbiz.specialpurpose.project"
     title="Time entry for Timesheets, time entries always have a timesheet and are always for one day only and recording the hours for one person which is defined on the timesheet. A timesheet will always have at least one time entry.">