svn commit: r1153560 [13/15] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounti...

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

svn commit: r1153560 [13/15] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounti...

sascharodekamp
Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Wed Aug  3 16:12:58 2011
@@ -37,7 +37,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
 
 import javolution.util.FastList;
 
@@ -127,7 +126,7 @@ public class ContextFilter implements Fi
      */
     public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
         HttpServletRequest httpRequest = (HttpServletRequest) request;
-        HttpServletResponseWrapper wrapper = new HttpServletResponseWrapper((HttpServletResponse) response);
+        HttpServletResponse httpResponse = (HttpServletResponse) response;
 
         // Debug.logInfo("Running ContextFilter.doFilter", module);
 
@@ -139,7 +138,7 @@ public class ContextFilter implements Fi
         }
 
         // set the ServletContext in the request for future use
-        request.setAttribute("servletContext", config.getServletContext());
+        httpRequest.setAttribute("servletContext", config.getServletContext());
 
         // set the webSiteId in the session
         if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))){
@@ -147,11 +146,11 @@ public class ContextFilter implements Fi
         }
 
         // set the filesystem path of context root.
-        request.setAttribute("_CONTEXT_ROOT_", config.getServletContext().getRealPath("/"));
+        httpRequest.setAttribute("_CONTEXT_ROOT_", config.getServletContext().getRealPath("/"));
 
         // set the server root url
         StringBuffer serverRootUrl = UtilHttp.getServerRootUrl(httpRequest);
-        request.setAttribute("_SERVER_ROOT_URL_", serverRootUrl.toString());
+        httpRequest.setAttribute("_SERVER_ROOT_URL_", serverRootUrl.toString());
 
         // request attributes from redirect call
         String reqAttrMapHex = (String) httpRequest.getSession().getAttribute("_REQ_ATTR_MAP_");
@@ -160,7 +159,7 @@ public class ContextFilter implements Fi
             Map<String, Object> reqAttrMap = checkMap(UtilObject.getObject(reqAttrMapBytes), String.class, Object.class);
             if (reqAttrMap != null) {
                 for (Map.Entry<String, Object> entry: reqAttrMap.entrySet()) {
-                    request.setAttribute(entry.getKey(), entry.getValue());
+                    httpRequest.setAttribute(entry.getKey(), entry.getValue());
                 }
             }
             httpRequest.getSession().removeAttribute("_REQ_ATTR_MAP_");
@@ -170,7 +169,7 @@ public class ContextFilter implements Fi
         // check if we are disabled
         String disableSecurity = config.getInitParameter("disableContextSecurity");
         if (disableSecurity != null && "Y".equalsIgnoreCase(disableSecurity)) {
-            chain.doFilter(request, response);
+            chain.doFilter(httpRequest, httpResponse);
             return;
         }
 
@@ -185,11 +184,11 @@ public class ContextFilter implements Fi
                 if (!redirectAllTo.toLowerCase().startsWith("http")) {
                     redirectAllTo = httpRequest.getContextPath() + redirectAllTo;
                 }
-                wrapper.sendRedirect(redirectAllTo);
+                httpResponse.sendRedirect(redirectAllTo);
                 return;
             } else {
                 httpRequest.getSession().removeAttribute("_FORCE_REDIRECT_");
-                chain.doFilter(request, response);
+                chain.doFilter(httpRequest, httpResponse);
                 return;
             }
         }
@@ -197,7 +196,7 @@ public class ContextFilter implements Fi
         // test to see if we have come through the control servlet already, if not do the processing
         String requestPath = null;
         String contextUri = null;
-        if (request.getAttribute(ContextFilter.FORWARDED_FROM_SERVLET) == null) {
+        if (httpRequest.getAttribute(ContextFilter.FORWARDED_FROM_SERVLET) == null) {
             // Debug.logInfo("In ContextFilter.doFilter, FORWARDED_FROM_SERVLET is NOT set", module);
             String allowedPath = config.getInitParameter("allowedPaths");
             String redirectPath = config.getInitParameter("redirectPath");
@@ -207,7 +206,7 @@ public class ContextFilter implements Fi
             allowList.add("/");  // No path is allowed.
             allowList.add("");   // No path is allowed.
 
-            if (debug) Debug.log("[Request]: " + httpRequest.getRequestURI(), module);
+            if (debug) Debug.log("[Domain]: " + httpRequest.getServerName() + " [Request]: " + httpRequest.getRequestURI(), module);
 
             requestPath = httpRequest.getServletPath();
             if (requestPath == null) requestPath = "";
@@ -261,24 +260,24 @@ public class ContextFilter implements Fi
                         }
                     }
                     filterMessage = filterMessage + " (" + error + ")";
-                    wrapper.sendError(error, contextUri);
+                    httpResponse.sendError(error, contextUri);
                 } else {
                     filterMessage = filterMessage + " (" + redirectPath + ")";
                     if (!redirectPath.toLowerCase().startsWith("http")) {
                         redirectPath = httpRequest.getContextPath() + redirectPath;
                     }
-                    wrapper.sendRedirect(redirectPath);
+                    httpResponse.sendRedirect(redirectPath);
                 }
                 Debug.logWarning(filterMessage, module);
                 return;
             }
         }
-        
+
         // check if multi tenant is enabled
         String useMultitenant = UtilProperties.getPropertyValue("general.properties", "multitenant");
         if ("Y".equals(useMultitenant)) {
             // get tenant delegator by domain name
-            String serverName = request.getServerName();
+            String serverName = httpRequest.getServerName();
             try {
                 // if tenant was specified, replace delegator with the new per-tenant delegator and set tenantId to session attribute
                 Delegator delegator = getDelegator(config.getServletContext());
@@ -286,7 +285,7 @@ public class ContextFilter implements Fi
                 if (UtilValidate.isNotEmpty(tenants)) {
                     GenericValue tenant = EntityUtil.getFirst(tenants);
                     String tenantId = tenant.getString("tenantId");
-                    
+
                     // if the request path is a root mount then redirect to the initial path
                     if (UtilValidate.isNotEmpty(requestPath) && requestPath.equals(contextUri)) {
                         String initialPath = tenant.getString("initialPath");
@@ -295,34 +294,34 @@ public class ContextFilter implements Fi
                             return;
                         }
                     }
-                    
+
                     // make that tenant active, setup a new delegator and a new dispatcher
                     String tenantDelegatorName = delegator.getDelegatorBaseName() + "#" + tenantId;
                     httpRequest.getSession().setAttribute("delegatorName", tenantDelegatorName);
-                
+
                     // after this line the delegator is replaced with the new per-tenant delegator
                     delegator = DelegatorFactory.getDelegator(tenantDelegatorName);
                     config.getServletContext().setAttribute("delegator", delegator);
-                    
+
                     // clear web context objects
                     config.getServletContext().setAttribute("authorization", null);
                     config.getServletContext().setAttribute("security", null);
                     config.getServletContext().setAttribute("dispatcher", null);
-                    
+
                     // initialize authorizer
                     getAuthz();
                     // initialize security
                     Security security = getSecurity();
                     // initialize the services dispatcher
                     LocalDispatcher dispatcher = getDispatcher(config.getServletContext());
-                    
+
                     // set web context objects
                     httpRequest.getSession().setAttribute("dispatcher", dispatcher);
                     httpRequest.getSession().setAttribute("security", security);
                     
-                    request.setAttribute("tenantId", tenantId);
+                    httpRequest.setAttribute("tenantId", tenantId);
                 }
-                
+
                 // NOTE DEJ20101130: do NOT always put the delegator name in the user's session because the user may
                 // have logged in and specified a tenant, and even if no Tenant record with a matching domainName field
                 // is found this will change the user's delegator back to the base one instead of the one for the
@@ -334,7 +333,7 @@ public class ContextFilter implements Fi
         }
 
         // we're done checking; continue on
-        chain.doFilter(request, response);
+        chain.doFilter(httpRequest, httpResponse);
 
         // reset thread local security
         AbstractAuthorization.clearThreadLocal();
@@ -362,7 +361,7 @@ public class ContextFilter implements Fi
         }
         return dispatcher;
     }
-    
+
     /** This method only sets up a dispatcher for the current webapp and passed in delegator, it does not save it to the ServletContext or anywhere else, just returns it */
     public static LocalDispatcher makeWebappDispatcher(ServletContext servletContext, Delegator delegator) {
         if (delegator == null) {
@@ -392,12 +391,12 @@ public class ContextFilter implements Fi
             Debug.logError("No localDispatcherName specified in the web.xml file", module);
             dispatcherName = delegator.getDelegatorName();
         }
-        
+
         LocalDispatcher dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator, readers, null);
         if (dispatcher == null) {
             Debug.logError("[ContextFilter.init] ERROR: dispatcher could not be initialized.", module);
         }
-        
+
         return dispatcher;
     }
 

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Wed Aug  3 16:12:58 2011
@@ -138,7 +138,7 @@ public class ControlServlet extends Http
         if (Debug.timingOn()) {
             timer = new UtilTimer();
             timer.setLog(true);
-            timer.timerString("[" + rname + "] Request Begun, encoding=[" + charset + "]", module);
+            timer.timerString("[" + rname + "(Domain:" + request.getServerName() + ")] Request Begun, encoding=[" + charset + "]", module);
         }
 
         // Setup the CONTROL_PATH for JSP dispatching.
@@ -321,7 +321,7 @@ public class ControlServlet extends Http
                 Debug.logError(t, "Error in ControlServlet saving ServerHit/Bin information; the output was successful, but can't save this tracking information. The error was: " + t.toString(), module);
             }
         }
-        if (Debug.timingOn()) timer.timerString("[" + rname + "] Request Done", module);
+        if (Debug.timingOn()) timer.timerString("[" + rname + "(Domain:" + request.getServerName() + ")] Request Done", module);
 
         // sanity check 2: make sure there are no user or session infos in the delegator, ie clear the thread
         GenericDelegator.clearUserIdentifierStack();

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Wed Aug  3 16:12:58 2011
@@ -39,6 +39,8 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.ofbiz.base.component.ComponentConfig;
+import org.ofbiz.base.container.ContainerConfig;
+import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.KeyStoreUtil;
@@ -435,7 +437,7 @@ public class LoginWorker {
         if (ModelService.RESPOND_SUCCESS.equals(result.get(ModelService.RESPONSE_MESSAGE))) {
             if (setupNewDelegatorEtc) {
                 // now set the delegator and dispatcher in a bunch of places just in case they were changed
-                setWebContextObjects(request, response, delegator, dispatcher);
+                setWebContextObjects(request, response, delegator, dispatcher, true);
             }
             
             // check to see if a password change is required for the user
@@ -466,33 +468,46 @@ public class LoginWorker {
         }
     }
     
-    private static void setWebContextObjects(HttpServletRequest request, HttpServletResponse response, Delegator delegator, LocalDispatcher dispatcher) {
+    /*         persistSerialized is set at false in the context of a cluster when using (at least) DeltaManager.
+            Because we have no easy ways to set DeltaManager.pathname to null from OFBiz
+           So persistSerialized is set to true when login out. This prevent a NPE due to non serialized objects put in session*/
+    private static void setWebContextObjects(HttpServletRequest request, HttpServletResponse response, Delegator delegator, LocalDispatcher dispatcher, Boolean persistSerialized) {
         HttpSession session = request.getSession();
         
         // NOTE: we do NOT want to set this in the servletContet, only in the request and session
         session.setAttribute("delegatorName", delegator.getDelegatorName());
         
         request.setAttribute("delegator", delegator);
-        session.setAttribute("delegator", delegator);
+        if (!persistSerialized) {
+            session.setAttribute("delegator", null);
+        } else {
+            session.setAttribute("delegator", delegator);
+        }
         
         request.setAttribute("dispatcher", dispatcher);
-        session.setAttribute("dispatcher", dispatcher);
-        
-        // we also need to setup the security and authz objects since they are dependent on the delegator
-        try {
-            Security security = SecurityFactory.getInstance(delegator);
-            request.setAttribute("security", security);
-            session.setAttribute("security", security);
-        } catch (SecurityConfigurationException e) {
-            Debug.logError(e, module);
+        if (!persistSerialized) {
+            session.setAttribute("dispatcher", null);
+        } else {
+            session.setAttribute("dispatcher", dispatcher);
         }
         
-        try {
-            Authorization authz = AuthorizationFactory.getInstance(delegator);
-            request.setAttribute("authz", authz);
-            session.setAttribute("authz", authz);
-        } catch (SecurityConfigurationException e) {
-            Debug.logError(e, module);
+        if (persistSerialized) {
+            // we also need to setup the security and authz objects since they are dependent on the delegator
+            try {
+                Security security = SecurityFactory.getInstance(delegator);
+                request.setAttribute("security", security);
+                session.setAttribute("security", security);
+            } catch (SecurityConfigurationException e) {
+                Debug.logError(e, module);
+            }
+            
+            try {
+                Authorization authz = AuthorizationFactory.getInstance(delegator);
+                request.setAttribute("authz", authz);
+                session.setAttribute("authz", authz);
+            } catch (SecurityConfigurationException e) {
+                Debug.logError(e, module);
+            }
         }
         
         // get rid of the visit info since it was pointing to the previous database, and get a new one
@@ -628,7 +643,22 @@ public class LoginWorker {
 
             delegator = DelegatorFactory.getDelegator(delegatorName);
             LocalDispatcher dispatcher = ContextFilter.makeWebappDispatcher(session.getServletContext(), delegator);
-            setWebContextObjects(request, response, delegator, dispatcher);
+            // get the container configuration          
+            String ofbizHome = System.getProperty("ofbiz.home");
+            String configFile = ofbizHome + "/framework/base/config/ofbiz-containers.xml";
+            ContainerConfig.Container cc = null;
+            String mgrClassName = null;
+            try {
+                cc = ContainerConfig.getContainer("catalina-container", configFile);
+                mgrClassName = ContainerConfig.getPropertyValue(cc, "manager-class", "org.apache.catalina.ha.session.DeltaManager");
+            } catch (ContainerException e) {
+                Debug.logError(e, "No catalina-container configuration found in container config!");
+            }
+            if ("org.apache.catalina.ha.session.DeltaManager".equals(mgrClassName)) {
+                setWebContextObjects(request, response, delegator, dispatcher, false);
+            } else {
+                setWebContextObjects(request, response, delegator, dispatcher, true);
+            }
         }
         
         // DON'T save the cart, causes too many problems: if (shoppingCart != null) session.setAttribute("shoppingCart", new WebShoppingCart(shoppingCart, session));
@@ -942,7 +972,7 @@ public class LoginWorker {
             if (!oldDelegatorName.equals(userLogin.getDelegator().getDelegatorName())) {
                 delegator = DelegatorFactory.getDelegator(userLogin.getDelegator().getDelegatorName());
                 dispatcher = ContextFilter.makeWebappDispatcher(servletContext, delegator);
-                setWebContextObjects(request, response, delegator, dispatcher);
+                setWebContextObjects(request, response, delegator, dispatcher, true);
             }
             // found userLogin, do the external login...
 

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Wed Aug  3 16:12:58 2011
@@ -308,14 +308,18 @@ public class RequestHandler {
                             if (returnString.length() > 0) {
                                 request.setAttribute("_ERROR_MESSAGE_", returnString);
                             }
-                            eventReturn = "protect";
-                            // check to see if there is an "protect" response, if so it's ok else show the default_error_response_view
+                            eventReturn = null;
+                            // check to see if there is a "protect" response, if so it's ok else show the default_error_response_view
                             if (!requestMap.requestResponseMap.containsKey("protect")) {
                                 String protectView = controllerConfig.getProtectView();
                                 if (protectView != null) {
                                     overrideViewUri = protectView;
                                 } else {
                                     overrideViewUri = UtilProperties.getPropertyValue("security.properties", "default.error.response.view");
+                                    overrideViewUri = overrideViewUri.replace("view:", "");
+                                    if ("none:".equals(overrideViewUri)) {
+                                        interruptRequest = true;
+                                    }
                                 }
                             }
                         }

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java Wed Aug  3 16:12:58 2011
@@ -44,7 +44,7 @@ public class OfbizContentTransform imple
     public final static String module = OfbizContentTransform.class.getName();
 
     @SuppressWarnings("unchecked")
- private static String getArg(Map args, String key) {
+    private static String getArg(Map args, String key) {
         String  result = "";
         Object obj = args.get(key);
         if (obj != null) {
@@ -62,9 +62,9 @@ public class OfbizContentTransform imple
         }
         return result;
     }
-    
+
     @SuppressWarnings("unchecked")
- public Writer getWriter(final Writer out, Map args) {
+    public Writer getWriter(final Writer out, Map args) {
         final StringBuilder buf = new StringBuilder();
         final String imgSize = OfbizContentTransform.getArg(args, "variant");
         return new Writer(out) {
@@ -87,6 +87,12 @@ public class OfbizContentTransform imple
 
                     String requestUrl = buf.toString();
 
+                    // If the URL starts with http(s) then there is nothing for us to do here
+                    if (requestUrl.startsWith("http")) {
+                        out.write(requestUrl);
+                        return;
+                    }
+
                     try {
                         requestUrl = StringUtil.defaultWebEncoder.decodeFromURL(requestUrl);
                     } catch (EncodingException e) {

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/website/WebSiteWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/website/WebSiteWorker.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/website/WebSiteWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/website/WebSiteWorker.java Wed Aug  3 16:12:58 2011
@@ -18,17 +18,11 @@
  *******************************************************************************/
 package org.ofbiz.webapp.website;
 
-import java.util.Map;
-
 import javax.servlet.ServletContext;
 import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
 
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -41,29 +35,10 @@ public class WebSiteWorker {
     public static final String module = WebSiteWorker.class.getName();
 
     public static String getWebSiteId(ServletRequest request) {
-        HttpSession session = ((HttpServletRequest) request).getSession();
-        Map<String, Object> requestParameters = UtilHttp.getParameterMap((HttpServletRequest) request);
-        String webSiteId = null;
-        boolean fromSession = false;
-
-        // first see if a new webSiteId was specified as a parameter
-        webSiteId = (String) requestParameters.get("webSiteId");
-        // if no parameter, try from session
-        if (UtilValidate.isEmpty(webSiteId)) {
-            webSiteId = (String) session.getAttribute("webSiteId");
-            if (webSiteId != null) fromSession = true;
-        }
-        // get it from the servlet context
-        if (UtilValidate.isEmpty(webSiteId)) {
-            ServletContext application = ((ServletContext) request.getAttribute("servletContext"));
-            if (application != null) webSiteId = application.getInitParameter("webSiteId");
-        }
-
-        if (UtilValidate.isNotEmpty(webSiteId) && !fromSession) {
-            session.setAttribute("webSiteId", webSiteId);
-        }
+        ServletContext application = ((ServletContext) request.getAttribute("servletContext"));
 
-        return webSiteId;
+        if (application == null) return null;
+        return application.getInitParameter("webSiteId");
     }
 
     public static GenericValue getWebSite(ServletRequest request) {

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties Wed Aug  3 16:12:58 2011
@@ -34,7 +34,7 @@ widget.autocompleter.defaultViewSize=10
 widget.autocompleter.defaultMinLength=2
 
 # Default delay in milliseconds the Autocomplete waits after a keystroke to activate itself. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.
-#widget.autocompleter.delay=300
+widget.autocompleter.defaultDelay=300
 
 # Show/hide the ID field that is returned from ajax autocompleter
 widget.autocompleter.displayReturnField=Y

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-tree.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-tree.xsd?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-tree.xsd (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/dtd/widget-tree.xsd Wed Aug  3 16:12:58 2011
@@ -744,43 +744,9 @@ under the License.
 </xs:schema>
 <!--
     examples
-    <trees>
-        <tree name="ProductCategoryTree" root-node-name="ChildProductCategory">
-            <node name="ChildProductCategory">
-                <entity-one entity-name="ProductCategory"/>
-                <label text="${description} [${productCategoryId}]" style="tabletext"/>
-                <sub-node node-name="ChildProductCategory">
-                    <entity-and entity-name="ProductCategoryRollup">
-                        <constraint field-name="parentProductCategoryId" from-field="productCategoryId"/>
-                        <order-by field-name="sequenceNum"/>
-                    </entity-many>
-                </sub-node>
-                <out-field-map field-name="productCategoryId"/>
-            </node>
-        </tree>
-        <tree name="ProductCategoryAndProductsTree" root-node-name="ChildProductCategory">
-            <node name="ChildProductCategory">
-                <entity-one entity-name="ProductCategory"/>
-                <label text="${description} [${productCategoryId}]" style="tableheadtext"/>
-                <sub-node node-name="ChildProductCategory">
-                    <entity-and entity-name="ProductCategoryRollup">
-                        <constraint field-name="parentProductCategoryId" from-field="productCategoryId"/>
-                        <order-by field-name="sequenceNum"/>
-                    </entity-many>
-                    <out-field-map field-name="productCategoryId"/>
-                </sub-node>
-                <sub-node node-name="ChildProduct">
-                    <entity-and entity-name="ProductCategoryMember">
-                        <constraint field-name="productCategoryId"/>
-                        <order-by field-name="sequenceNum"/>
-                    </entity-many>
-                    <out-field-map field-name="productId"/>
-                </sub-node>
-            </node>
-            <node name="ChildProduct">
-                <service service-name="getProductInfo"/>
-                <label text="${productName} [${productId}] - ${price}" style="tabletext"/>
-            </node>
-        </tree>
-    </trees>
--->
+do search  xml for
+ root-node-name
+ you will see many examples.
+
+
+ -->

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Wed Aug  3 16:12:58 2011
@@ -507,10 +507,11 @@ public class MacroFormRenderer implement
                 alert = "true";
             }
         }
+        boolean useTimeDropDown = "time-dropdown".equals(dateTimeField.getInputMethod());
         String stepString = dateTimeField.getStep();
         int step = 1;
         StringBuilder timeValues = new StringBuilder();
-        if ( "time-dropdown".equals(dateTimeField.getInputMethod()) && UtilValidate.isNotEmpty(step)) {
+        if (useTimeDropDown && UtilValidate.isNotEmpty(step)) {
             try {
                 step = Integer.valueOf(stepString).intValue();
             } catch (IllegalArgumentException e) {
@@ -534,9 +535,9 @@ public class MacroFormRenderer implement
         String localizedInputTitle = "", localizedIconTitle = "";
 
         // whether the date field is short form, yyyy-mm-dd
-        boolean shortDateInput = ("date".equals(dateTimeField.getType()) || "time-dropdown".equals(dateTimeField.getInputMethod()) ? true : false);
+        boolean shortDateInput = ("date".equals(dateTimeField.getType()) || useTimeDropDown ? true : false);
 
-        if ("time-dropdown".equals(dateTimeField.getInputMethod())) {
+        if (useTimeDropDown) {
             name = UtilHttp.makeCompositeParam(paramName, "date");
         } else {
             name = paramName;
@@ -562,7 +563,14 @@ public class MacroFormRenderer implement
             }
         }
 
-        String value = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
+        String contextValue = null;
+        //if time-dropdow desactive encodingOutput for found hour and minutes
+        boolean memEncodeOutput = modelFormField.getEncodeOutput();
+        if (useTimeDropDown) modelFormField.setEncodeOutput(false);
+        contextValue = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
+        if (useTimeDropDown) modelFormField.setEncodeOutput(memEncodeOutput);
+
+        String value = contextValue;
         if (UtilValidate.isNotEmpty(value)) {
             if (value.length() > maxlength) {
                 value = value.substring(0, maxlength);
@@ -586,7 +594,7 @@ public class MacroFormRenderer implement
 
         if (!"time".equals(dateTimeField.getType())) {
             String tempParamName;
-            if ("time-dropdown".equals(dateTimeField.getInputMethod())) {
+            if (useTimeDropDown) {
                 tempParamName = UtilHttp.makeCompositeParam(paramName, "date");
             } else {
                 tempParamName = paramName;
@@ -597,7 +605,7 @@ public class MacroFormRenderer implement
 
         // if we have an input method of time-dropdown, then render two
         // dropdowns
-        if ("time-dropdown".equals(dateTimeField.getInputMethod())) {
+        if (useTimeDropDown) {
             className = modelFormField.getWidgetStyle();
             classString = (className != null ? className : "");
             isTwelveHour = "12".equals(dateTimeField.getClock());
@@ -605,7 +613,7 @@ public class MacroFormRenderer implement
             // set the Calendar to the default time of the form or now()
             Calendar cal = null;
             try {
-                Timestamp defaultTimestamp = Timestamp.valueOf(dateTimeField.getDefaultDateTimeString(context));
+                Timestamp defaultTimestamp = Timestamp.valueOf(contextValue);
                 cal = Calendar.getInstance();
                 cal.setTime(defaultTimestamp);
             } catch (IllegalArgumentException e) {
@@ -639,7 +647,7 @@ public class MacroFormRenderer implement
         //check for required field style on single forms
         if ("single".equals(modelFormField.getModelForm().getType()) && modelFormField.getRequiredField()) {
             String requiredStyle = modelFormField.getRequiredFieldStyle();
-            if (UtilValidate.isEmpty(requiredStyle)) requiredStyle = "required";            
+            if (UtilValidate.isEmpty(requiredStyle)) requiredStyle = "required";
             if (UtilValidate.isEmpty(className)) className = requiredStyle;
             else className = requiredStyle + " " + className;
         }
@@ -666,14 +674,10 @@ public class MacroFormRenderer implement
         sr.append(value);
         sr.append("\" title=\"");
         sr.append(localizedInputTitle);
-        sr.append("\" value=\"");
-        sr.append(value);
         sr.append("\" size=\"");
         sr.append(Integer.toString(size));
         sr.append("\" maxlength=\"");
         sr.append(Integer.toString(maxlength));
-        sr.append("\" value=\"");
-        sr.append(value);
         sr.append("\" step=\"");
         sr.append(Integer.toString(step));
         sr.append("\" timeValues=\"");
@@ -1486,7 +1490,10 @@ public class MacroFormRenderer implement
         sr.append("\" style=\"");
         sr.append(FlexibleStringExpander.expandString(modelForm.getDefaultTableStyle(), context));
         sr.append("\" columnStyles=[");
-        sr.append(columnStyleListString);
+        if (UtilValidate.isNotEmpty(columnStyleListString)) {
+            // this is a fix for forms with no fields
+            sr.append(columnStyleListString);
+        }
         sr.append("] />");
         executeMacro(writer, sr.toString());
 
@@ -2149,6 +2156,14 @@ public class MacroFormRenderer implement
 
         boolean showDescription = "Y".equals(UtilProperties.getPropertyValue("widget", "widget.lookup.showDescription", "N"));
 
+        // lastViewName, used by lookup to remember the real last view name
+        String lastViewName = request.getParameter("_LAST_VIEW_NAME_"); // Try to get it from parameters firstly
+        if (UtilValidate.isEmpty(lastViewName)) { // get from session
+            lastViewName = (String) request.getSession().getAttribute("_LAST_VIEW_NAME_");
+        }
+        if (UtilValidate.isEmpty(lastViewName)) {
+            lastViewName = "";
+        }
         StringWriter sr = new StringWriter();
         sr.append("<@renderLookupField ");
         sr.append(" className=\"");
@@ -2208,6 +2223,8 @@ public class MacroFormRenderer implement
         sr.append(Boolean.toString(showDescription));
         sr.append("\" initiallyCollapsed=\"");
         sr.append(Boolean.toString(isInitiallyCollapsed));
+        sr.append("\" lastViewName=\"");
+        sr.append(lastViewName);
         sr.append("\" />");
         executeMacro(writer, sr.toString());
 

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Wed Aug  3 16:12:58 2011
@@ -41,6 +41,8 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.StringUtil.SimpleEncoder;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
+import org.ofbiz.base.util.template.FreeMarkerWorker;
+import org.ofbiz.entity.Delegator;
 import org.ofbiz.webapp.control.RequestHandler;
 import org.ofbiz.webapp.taglib.ContentUrlTag;
 import org.ofbiz.widget.ModelWidget;
@@ -69,6 +71,7 @@ import org.ofbiz.widget.form.ModelFormFi
 import org.ofbiz.widget.form.ModelFormField.TextField;
 import org.ofbiz.widget.form.ModelFormField.TextFindField;
 import org.ofbiz.widget.form.ModelFormField.TextareaField;
+import org.ofbiz.widget.form.UtilHelpText;
 
 import com.ibm.icu.util.Calendar;
 
@@ -556,6 +559,10 @@ public class HtmlFormRenderer extends Ht
 
         if (shortDateInput) {
             size = maxlength = 10;
+            if ("time".equals(dateTimeField.getType())) {
+                // the style attribute is a little bit messy but when using display:none the timepicker is shown on a wrong place
+                writer.append(" style=\"height:1px;width:1px;border:none;background-color:transparent\"");
+            }
             if (uiLabelMap != null) {
                 localizedInputTitle = uiLabelMap.get("CommonFormatDate");
             }
@@ -1271,9 +1278,26 @@ public class HtmlFormRenderer extends Ht
         String titleText = UtilHttp.encodeAmpersands(tempTitleText);
 
         if (UtilValidate.isNotEmpty(titleText)) {
-            if (UtilValidate.isNotEmpty(modelFormField.getTitleStyle())) {
-                writer.append("<span class=\"");
-                writer.append(modelFormField.getTitleStyle());
+            // copied from MacroFormRenderer renderFieldTitle
+            String displayHelpText = UtilProperties.getPropertyValue("widget.properties", "widget.form.displayhelpText");
+            String helpText = null;
+            if ("Y".equals(displayHelpText)) {
+                Delegator delegator = WidgetWorker.getDelegator(context);
+                Locale locale = (Locale)context.get("locale");
+                String entityName = modelFormField.getEntityName();
+                String fieldName = modelFormField.getFieldName();
+                helpText = UtilHelpText.getEntityFieldDescription(entityName, fieldName, delegator, locale);
+            }
+            if (UtilValidate.isNotEmpty(modelFormField.getTitleStyle()) || UtilValidate.isNotEmpty(helpText)) {
+                writer.append("<span");
+                if (UtilValidate.isNotEmpty(modelFormField.getTitleStyle())){
+                    writer.append(" class=\"");
+                    writer.append(modelFormField.getTitleStyle());
+                }
+                if (UtilValidate.isNotEmpty(helpText)){
+                    writer.append(" title=\"");
+                    writer.append(FreeMarkerWorker.encodeDoubleQuotes(helpText));
+                }
                 writer.append("\">");
             }
             if (" ".equals(titleText)) {

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/csvFormMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/csvFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/csvFormMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -103,7 +103,7 @@ under the License.
 <@renderField value />
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action disabled autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
+<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete><@renderField value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/foFormMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/foFormMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -123,7 +123,7 @@ under the License.
 <@makeBlock className value />
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action disabled autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
+<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete><@makeBlock className value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete><@makeBlock className "" /></#macro>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -103,12 +103,14 @@ under the License.
 
 <#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName mask="" event="" action="" step="" timeValues="">
   <span class="view-calendar">
+    <#if dateType!="time" >
       <input type="text" name="${name}_i18n" <@renderClass className alert /><#rt/>
         <#if title?has_content> title="${title}"</#if>
         <#if value?has_content> value="${value}"</#if>
         <#if size?has_content> size="${size}"</#if><#rt/>
         <#if maxlength?has_content>  maxlength="${maxlength}"</#if>
         <#if id?has_content> id="${id}_i18n"</#if>/><#rt/>
+    </#if>
         <#-- the style attribute is a little bit messy but when using disply:none the timepicker is shown on a wrong place -->
         <input type="text" name="${name}" style="height:1px;width:1px;border:none;background-color:transparent" <#if event?has_content && action?has_content> ${event}="${action}"</#if> <@renderClass className alert /><#rt/>
         <#if title?has_content> title="${title}"</#if>
@@ -127,20 +129,23 @@ under the License.
                       if (initDate.indexOf('.') != -1) {
                           initDate = initDate.substring(0, initDate.indexOf('.'));
                       }
-                      var dateObj = Date.parse(initDate);
+                      var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+                      var dateObj = Date.parseExact(initDate, ofbizTime);
                       var formatedObj = dateObj.toString(dateFormat);
                       jQuery("#${id}_i18n").val(formatedObj);
                   }
 
                   jQuery("#${id}").change(function() {
+                      var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
+                      var dateObj = Date.parseExact(this.value, ofbizTime);
                       var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
-                      var dateObj = Date.parse(this.value);
                       var formatedObj = dateObj.toString(dateFormat);
                       jQuery("#${id}_i18n").val(formatedObj);
                   });
                   jQuery("#${id}_i18n").change(function() {
+                      var dateFormat = Date.CultureInfo.formatPatterns.shortDate<#if shortDateInput?exists && !shortDateInput> + " " + Date.CultureInfo.formatPatterns.longTime</#if>;
+                      var dateObj = Date.parseExact(this.value, dateFormat);
                       var ofbizTime = "<#if shortDateInput?exists && shortDateInput>yyyy-MM-dd<#else>yyyy-MM-dd HH:mm:ss</#if>";
-                      var dateObj = Date.parse(this.value);
                       var formatedObj = dateObj.toString(ofbizTime);
                       jQuery("#${id}").val(formatedObj);
                   });
@@ -543,7 +548,55 @@ ${item.description}</span>
 </#if>
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed>
+<#--
+@renderLookupField
+
+Description: Renders a text input field as a lookup field.
+
+Parameter: name, String, required - The name of the lookup field.
+Parameter: formName, String, required - The name of the form that contains the lookup field.
+Parameter: fieldFormName, String, required - Contains the lookup window form name.
+Parameter: className, String, optional - The CSS class name for the lookup field.
+Parameter: alert, String, optional - If "true" then the "alert" CSS class will be added to the lookup field.
+Parameter: value, Object, optional - The value of the lookup field.
+Parameter: size, String, optional - The size of the lookup field.
+Parameter: maxlength, String or Integer, optional - The max length of the lookup field.
+Parameter: id, String, optional - The ID of the lookup field.
+Parameter: event, String, optional - The lookup field event that invokes "action". If the event parameter is not empty, then the action parameter must be specified as well.
+Parameter: action, String, optional - The action that is invoked on "event". If action parameter is not empty, then the event parameter must be specified as well.
+Parameter: readonly, boolean, optional - If true, the lookup field is made read-only.
+Parameter: autocomplete, String, optional - If not empty, autocomplete is turned off for the lookup field.
+Parameter: descriptionFieldName, String, optional - If not empty and the presentation parameter contains "window", specifies an alternate input field for updating.
+Parameter: targetParameterIter, List, optional - Contains a list of form field names whose values will be passed to the lookup window.
+Parameter: imgSrc, Not used.
+Parameter: ajaxUrl, String, optional - Contains the Ajax URL, used only when the ajaxEnabled parameter contains true.
+Parameter: ajaxEnabled, boolean, optional - If true, invokes the Ajax auto-completer.
+Parameter: presentation, String, optional - Contains the lookup window type, either "layer" or "window".
+Parameter: width, String or Integer, optional - The width of the lookup field.
+Parameter: height, String or Integer, optional - The height of the lookup field.
+Parameter: position, String, optional - The position style of the lookup field.
+Parameter: fadeBackground, ?
+Parameter: clearText, String, optional - If the readonly parameter is true, clearText contains the text to be displayed in the field.
+Parameter: showDescription, String, optional - ? (contains "true" or "false").
+Parameter: initiallyCollapsed, Not used.
+Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is true, the contents of lastViewName will be appended to the Ajax URL.
+-->
+<#macro renderLookupField name formName fieldFormName className="" alert="false" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" width="" height="" position="" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" lastViewName="main" >
+<#if Static["org.ofbiz.widget.ModelWidget"].widgetBoundaryCommentsEnabled(context)>
+<!-- @renderLookupField -->
+</#if>
+<#if (!ajaxUrl?has_content) && ajaxEnabled>
+    <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, fieldFormName)/>
+    <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" />
+</#if>
+<#if (!showDescription?has_content)>
+    <#local showDescriptionProp = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.showDescription", "N")>
+    <#if "Y" == showDescriptionProp>
+        <#local showDescription = "true" />
+    <#else>
+        <#local showDescription = "false" />
+    </#if>
+</#if>
 <#if ajaxEnabled?has_content && ajaxEnabled>
     <script type="text/javascript">
     jQuery(document).ready(function(){
@@ -575,11 +628,7 @@ ${item.description}</span>
     <#if ajaxEnabled?has_content && ajaxEnabled>
       <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")>
       <#assign defaultDelay = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultDelay")>
-      <#if parameters?has_content && parameters._LAST_VIEW_NAME_?has_content>
-        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + parameters._LAST_VIEW_NAME_ />
-      <#else>
-        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=main"/>
-      </#if>      
+      <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
       <#if !ajaxUrl?contains("searchValueFieldName=")>
           <#if descriptionFieldName?has_content && showDescription == "true">
             <#local ajaxUrl = ajaxUrl + "&amp;searchValueFieldName=" + descriptionFieldName />
@@ -590,7 +639,7 @@ ${item.description}</span>
     </#if>
     <script type="text/javascript">
         jQuery(document).ready(function(){
-            new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>, "${presentation!}", "${defaultMinLength!2}", "${defaultDelay!300}"<#rt/>
+            new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", ${showDescription}<#else>"", false</#if>, "${presentation!}", "${defaultMinLength!2}", "${defaultDelay!300}"<#rt/>
     <#if targetParameterIter?has_content>
       <#assign isFirst = true>
       <#lt/>, [<#rt/>
@@ -611,10 +660,8 @@ ${item.description}</span>
 <#if readonly?has_content && readonly><a id="${id}_clear" style="background:none;margin-left:5px;margin-right:15px;" class="clearField" href="javascript:void();" onclick="javascript:document.${formName}.${name}.value='';<#if descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">${clearText}</a></#if>
 </span>
 <#if ajaxEnabled?has_content && ajaxEnabled>
-      <#if parameters?has_content && parameters._LAST_VIEW_NAME_?has_content && ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>
-        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + parameters._LAST_VIEW_NAME_ />
-      <#elseif ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>
-        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=main"/>
+      <#if ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>
+        <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
       </#if>      
     <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', ${showDescription}, ${defaultMinLength!2}, ${defaultDelay!300});</script><#t/>
 </#if>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlTreeMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlTreeMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlTreeMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/htmlTreeMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -52,7 +52,7 @@ under the License.
 <#if style?has_content> class="${style}"</#if><#rt/>
 <#if name?has_content> name="${name}"</#if><#rt/>
 <#if title?has_content> title="${title}"</#if><#rt/>
-<#if targetWindow?has_content> target="${targetWindow}</#if> href="${linkUrl}"><#rt/>
+<#if targetWindow?has_content> target="${targetWindow}</#if><#if linkUrl?has_content> href="${linkUrl}"<#else> href="javascript:void(0);"</#if>><#rt/>
 <#if imgStr?has_content>${imgStr}<#elseif linkText?has_content/>${linkText}<#else/>&nbsp;</#if></a><#rt/>
 </#macro>
 

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/textFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/textFormMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/textFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/textFormMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -103,7 +103,7 @@ under the License.
 <@renderField value />
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action disabled autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed><@renderField value /></#macro>
+<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed><@renderField value /></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete><@renderField value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/templates/xmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/templates/xmlFormMacroLibrary.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/templates/xmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/templates/xmlFormMacroLibrary.ftl Wed Aug  3 16:12:58 2011
@@ -96,7 +96,7 @@ under the License.
 <#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru>
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action disabled autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
+<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>

Modified: ofbiz/branches/jackrabbit20100709/macros.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/macros.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/macros.xml (original)
+++ ofbiz/branches/jackrabbit20100709/macros.xml Wed Aug  3 16:12:58 2011
@@ -23,6 +23,13 @@ under the License.
  </condition>
  <fail unless="antatleast171" message="Please upgrade ant to at least 1.7.1"/>
 
+ <condition property="javaatleast16">
+  <not>
+   <matches pattern="^1\.[0-5]($|\..*)" string="${ant.java.version}"/>
+  </not>
+ </condition>
+ <fail unless="javaatleast16" message="Please upgrade java to at least 1.6"/>
+
  <dirname property="ofbiz.home.dir" file="${ant.file.Ant - Macros}"/>
  <macrodef name="iterate">
   <attribute name="filelist" default="subdirs"/>
@@ -73,6 +80,10 @@ under the License.
  <presetdef name="javac16">
   <default-javac compiler="javac1.6" target="1.6" source="1.6" encoding="UTF-8" sourcepathref="src-path" includeantruntime="false">
    <compilerarg value="-Xlint:-path"/>
+   <!--
+   Please leave this line here.  It makes it easier to enable/disable it.
+   <compilerarg value="-Xlint:unchecked"/>
+   -->
   </default-javac>
  </presetdef>
 
@@ -81,7 +92,7 @@ under the License.
              destdir="${build.dir}/javadocs"
              windowtitle="Open for Business - ${desc}"
              useexternalfile="yes"
-             maxmemory="256M"
+             maxmemory="512M"
              encoding="UTF-8"
              packagenames="org.ofbiz.*">
       <fileset dir="${basedir}" defaultexcludes="yes">

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/assetmaint/config/AssetMaintUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/assetmaint/config/AssetMaintUiLabels.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/assetmaint/config/AssetMaintUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/assetmaint/config/AssetMaintUiLabels.xml Wed Aug  3 16:12:58 2011
@@ -85,10 +85,12 @@
     <property key="AssetMaintProblemCallingService">
         <value xml:lang="en">Problem in calling service issueInventoryItemToFixedAssetMaint</value>
         <value xml:lang="it">Problema durante la chiamata al servizio issueInventoryItemToFixedAssetMaint</value>
+        <value xml:lang="zh">调用发送库存明细到固定资产维护(issueInventoryItemToFixedAssetMaint)服务时出错</value>
     </property>
     <property key="AssetMaintProblemGettingInventoryLevel">
         <value xml:lang="en">Problem in getting Inventory level for </value>
         <value xml:lang="it">Problema ad ottenere il livello di inventario per </value>
+        <value xml:lang="zh">获取库存水平时出错: </value>
     </property>
     <property key="AssetMaintProductMaint">
         <value xml:lang="en">Product Maint</value>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/build.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/build.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/build.xml Wed Aug  3 16:12:58 2011
@@ -31,6 +31,7 @@
         ebay/build.xml,
         ebaystore/build.xml,
         projectmgr/build.xml,
+        scrum/build.xml,
         ldap/build.xml,
         crowd/build.xml,
         webpos/build.xml

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/component-load.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/component-load.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/component-load.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/component-load.xml Wed Aug  3 16:12:58 2011
@@ -27,6 +27,7 @@ under the License.
     <load-component component-location="cmssite"/>
     <load-component component-location="ofbizwebsite"/>
     <load-component component-location="projectmgr"/>
+    <load-component component-location="scrum"/>
     <load-component component-location="oagis"/>
     <load-component component-location="googlebase"/>
     <load-component component-location="googlecheckout"/>

Propchange: ofbiz/branches/jackrabbit20100709/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug  3 16:12:58 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/specialpurpose/ebaystore/lib:951708-952957
 /ofbiz/branches/jquery/specialpurpose/ebaystore/lib:952958-1044489
 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:962442-1128853
+/ofbiz/trunk/specialpurpose/ebaystore/lib:962442-1153542

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/config/EcommerceUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/config/EcommerceUiLabels.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/config/EcommerceUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/config/EcommerceUiLabels.xml Wed Aug  3 16:12:58 2011
@@ -244,6 +244,10 @@
         <value xml:lang="zh">调整</value>
         <value xml:lang="zh_TW">調整</value>
     </property>
+    <property key="EcommerceAffiliateCreatedSuccessfully">
+        <value xml:lang="en">Affiliate record successfully created.</value>
+        <value xml:lang="it">Record affiliato creato con successo.</value>
+    </property>
     <property key="EcommerceAlwaysViewCartAfterAddingAnItem">
         <value xml:lang="cs">Vždy se podívat do košíku, pokud byla přidána další položka</value>
         <value xml:lang="da">Check altid indkøbskurven nÃ¥r der er lagt en ny vare i den</value>
@@ -1553,6 +1557,9 @@
         <value xml:lang="zh">明细来自购物清单;从列表页更新数量</value>
         <value xml:lang="zh_TW">明細來自購物清單; 從列表頁更新數量</value>
     </property>
+    <property key="EcommerceLanguage">
+        <value xml:lang="en">Language</value>
+    </property>
     <property key="EcommerceLastCategories">
         <value xml:lang="cs">Poslední kategorie</value>
         <value xml:lang="da">Seneste kategorier</value>
@@ -1943,6 +1950,9 @@
         <value xml:lang="zh">请选择送货方法</value>
         <value xml:lang="zh_TW">請選擇送貨方法</value>
     </property>
+    <property key="EcommerceModifyDate">
+        <value xml:lang="en">Modified Date</value>
+    </property>
     <property key="EcommerceMonths">
         <value xml:lang="da">MÃ¥neder</value>
         <value xml:lang="de">Monate</value>
@@ -2396,6 +2406,9 @@
         <value xml:lang="zh">订单没有激活</value>
         <value xml:lang="zh_TW">訂單沒有啟動</value>
     </property>
+    <property key="EcommerceOwner">
+        <value xml:lang="en">Owner</value>
+    </property>
     <property key="EcommerceOwningDepartment">
         <value xml:lang="da">Ejende afdeling</value>
         <value xml:lang="de">Besitzende Abteilung</value>
@@ -4729,4 +4742,7 @@
         <value xml:lang="zh">浏览询价</value>
         <value xml:lang="zh_TW">瀏覽報價</value>
     </property>
+    <property key="ProductCategories">
+        <value xml:lang="en">Product Categories</value>
+    </property>
 </resource>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoConfigurator.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoConfigurator.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoConfigurator.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoConfigurator.xml Wed Aug  3 16:12:58 2011
@@ -276,6 +276,32 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="PEPPERS-R-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRPEPPERS-R-ALTEN" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="PC-100-ALT" textData="configurable-pcs"/>
+    <ElectronicText dataResourceId="FOOD-001-ALT" textData="configurable-foods"/>
+    <ElectronicText dataResourceId="PC001-ALT" textData="configurable-pc"/>
+    <ElectronicText dataResourceId="RAM1GB_BRAND-ALT" textData="ram-1-gb-ddr2"/>
+    <ElectronicText dataResourceId="HD250GB_BRAND-ALT" textData="hd-250-gb"/>
+    <ElectronicText dataResourceId="HD500GB_BRAND-ALT" textData="hd-450-gb"/>
+    <ElectronicText dataResourceId="ETH_BRAND-ALT" textData="ethernet-card-10-100"/>
+    <ElectronicText dataResourceId="MOD_BRAND-ALT" textData="modem-card-56k"/>
+    <ElectronicText dataResourceId="MOTHER_BOARD_ASS-ALT" textData="motherboard-assembly"/>
+    <ElectronicText dataResourceId="MOTHER_BOARD-ALT" textData="motherboard"/>
+    <ElectronicText dataResourceId="CPU-586-ALT" textData="cpu-intel-586"/>
+    <ElectronicText dataResourceId="ENCHILADAS-ALT" textData="enchiladas"/>
+    <ElectronicText dataResourceId="FAJITA_BEEF-ALT" textData="fajita-beef"/>
+    <ElectronicText dataResourceId="JALAPENOS-ALT" textData="jalapenos"/>
+    <ElectronicText dataResourceId="PIZZA-ALT" textData="pizza"/>
+    <ElectronicText dataResourceId="DOUGH-ALT" textData="dough"/>
+    <ElectronicText dataResourceId="SAUCE-ALT" textData="sauce"/>
+    <ElectronicText dataResourceId="SAUCE-TM-ALT" textData="tomato-sauce-with-mozzarella"/>
+    <ElectronicText dataResourceId="SAUCE-CM-ALT" textData="chili-sauce-with-mozzarella"/>
+    <ElectronicText dataResourceId="SAUCE-TP-ALT" textData="tomato-sauce-with-parmesan"/>
+    <ElectronicText dataResourceId="SAUCE-CP-ALT" textData="chili-sauce-with-parmesan"/>
+    <ElectronicText dataResourceId="PEPPERS-ALT" textData="pepper"/>
+    <ElectronicText dataResourceId="PEPPERS-G-ALT" textData="green-peppers"/>
+    <ElectronicText dataResourceId="PEPPERS-H-ALT" textData="hot-peppers"/>
+    <ElectronicText dataResourceId="PEPPERS-R-ALT" textData="roasted-peppers"/>
+    
     <ElectronicText dataResourceId="DRPC-100-ALTEN" textData="configurable-pcs"/>
     <ElectronicText dataResourceId="DRFOOD-001-ALTEN" textData="configurable-foods"/>
     <ElectronicText dataResourceId="DRPC001-ALTEN" textData="configurable-pc"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoFinAccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoFinAccount.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoFinAccount.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoFinAccount.xml Wed Aug  3 16:12:58 2011
@@ -99,6 +99,12 @@
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRFA-001-50-ALTEN" localeString="en_US"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="FA-001-O-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRFA-001-O-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="FA-100-ALT" textData="account-activation"/>
+    <ElectronicText dataResourceId="FA-001-ALT" textData="financial-account-activation"/>
+    <ElectronicText dataResourceId="FA-001-30-ALT" textData="financial-account-activation-30"/>
+    <ElectronicText dataResourceId="FA-001-50-ALT" textData="financial-account-activation-50"/>
+    <ElectronicText dataResourceId="FA-001-O-ALT" textData="financial-account-activation-o"/>
+    
     <ElectronicText dataResourceId="DRFA-100-ALTEN" textData="account-activation"/>
     <ElectronicText dataResourceId="DRFA-001-ALTEN" textData="financial-account-activation"/>
     <ElectronicText dataResourceId="DRFA-001-30-ALTEN" textData="financial-account-activation-30"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoPopularCategoriesData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoPopularCategoriesData.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoPopularCategoriesData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoPopularCategoriesData.xml Wed Aug  3 16:12:58 2011
@@ -43,6 +43,8 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRBEST-SELL-1-ALTEN" localeString="en_US"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="BEST-SELL-2-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRBEST-SELL-2-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="BEST-SELL-1-ALT" textData="best-sell-1"/>
+    <ElectronicText dataResourceId="BEST-SELL-2-ALT" textData="best-sell-2"/>
     <ElectronicText dataResourceId="DRBEST-SELL-1-ALTEN" textData="best-sell-1"/>
     <ElectronicText dataResourceId="DRBEST-SELL-2-ALTEN" textData="best-sell-2"/>
     <Content contentTypeId="DOCUMENT" localeString="en" contentId="BEST-SELL-1-ALT" dataResourceId="BEST-SELL-1-ALT"/>

Modified: ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1153560&r1=1153559&r2=1153560&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/branches/jackrabbit20100709/specialpurpose/ecommerce/data/DemoProduct.xml Wed Aug  3 16:12:58 2011
@@ -232,6 +232,16 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="20111-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DR20111-ALTEN" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="100-ALT" textData="gismos"/>
+    <ElectronicText dataResourceId="101-ALT" textData="small-gizmos"/>
+    <ElectronicText dataResourceId="102-ALT" textData="large-gizmos"/>
+    <ElectronicText dataResourceId="200-ALT" textData="widgets"/>
+    <ElectronicText dataResourceId="201-ALT" textData="small-widgets"/>
+    <ElectronicText dataResourceId="202-ALT" textData="large-widgets"/>
+    <ElectronicText dataResourceId="2011-ALT" textData="mini-widgets"/>
+    <ElectronicText dataResourceId="2012-ALT" textData="other-mini-widgets"/>
+    <ElectronicText dataResourceId="20111-ALT" textData="micro-widgets"/>
+    
     <ElectronicText dataResourceId="DR100-ALTEN" textData="gismos"/>
     <ElectronicText dataResourceId="DR101-ALTEN" textData="small-gizmos"/>
     <ElectronicText dataResourceId="DR102-ALTEN" textData="large-gizmos"/>
@@ -352,6 +362,11 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GZ-1005-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGZ-1005-ALTEN" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="GZ-1000-ALT" textData="tiny-gismo"/>
+    <ElectronicText dataResourceId="GZ-1001-ALT" textData="nan-gismo"/>
+    <ElectronicText dataResourceId="GZ-1004-ALT" textData="rainbow-gismo"/>
+    <ElectronicText dataResourceId="GZ-1005-ALT" textData="dot-net-gismo"/>
+    
     <ElectronicText dataResourceId="DRGZ-1000-ALTEN" textData="tiny-gismo"/>
     <ElectronicText dataResourceId="DRGZ-1001-ALTEN" textData="nan-gismo"/>
     <ElectronicText dataResourceId="DRGZ-1004-ALTEN" textData="rainbow-gismo"/>
@@ -445,6 +460,26 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="WG-9944-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRWG-9944-ALTEN" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="GZ-1006-ALT" textData="open-gismo"/>
+    <ElectronicText dataResourceId="GZ-1006-1-ALT" textData="open-gismo-lgpl"/>
+    <ElectronicText dataResourceId="GZ-1006-2-ALT" textData="open-gismo-gpl"/>
+    <ElectronicText dataResourceId="GZ-1006-3-ALT" textData="open-gismo-bsd"/>
+    <ElectronicText dataResourceId="GZ-1006-3-ALT" textData="open-gismo-mit"/>
+    <ElectronicText dataResourceId="GZ-2002-ALT" textData="square-gismo"/>
+    <ElectronicText dataResourceId="GZ-2644-ALT" textData="round-gizmo"/>
+    <ElectronicText dataResourceId="GZ-5005-ALT" textData="purple-gizmo"/>
+    <ElectronicText dataResourceId="GZ-7000-ALT" textData="massive-gizmo"/>
+    <ElectronicText dataResourceId="GZ-8544-ALT" textData="big-gizmo"/>
+    <ElectronicText dataResourceId="GZ-9290-ALT" textData="his-her-gizmo"/>
+    <ElectronicText dataResourceId="WG-1111-ALT" textData="micro-chrome-widget"/>
+    <ElectronicText dataResourceId="WG-5569-ALT" textData="tiny-chrome-widget"/>
+    <ElectronicText dataResourceId="WG-9943-ALT" textData="giant-widget-with-variant-explosion"/>
+    <ElectronicText dataResourceId="WG-9943-B3-ALT" textData="giant-widget-b3"/>
+    <ElectronicText dataResourceId="WG-9943-B4-ALT" textData="giant-widget-b4"/>
+    <ElectronicText dataResourceId="WG-9943-S3-ALT" textData="giant-widget-s3"/>
+    <ElectronicText dataResourceId="WG-9943-S4-ALT" textData="giant-widget-s4"/>
+    <ElectronicText dataResourceId="WG-9944-ALT" textData="giant-widget-with-feature-explosion"/>
+    
     <ElectronicText dataResourceId="DRGZ-1006-ALTEN" textData="open-gismo"/>
     <ElectronicText dataResourceId="DRGZ-1006-1-ALTEN" textData="open-gismo-lgpl"/>
     <ElectronicText dataResourceId="DRGZ-1006-2-ALTEN" textData="open-gismo-gpl"/>
@@ -597,6 +632,7 @@ under the License.
     <ProductPrice productId="GZ-NEWS-1MO" productPricePurposeId="PURCHASE" productPriceTypeId="LIST_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2001-05-13 12:00:00.0" price="5.0" createdDate="2001-05-13 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2001-05-13 12:00:00.0" lastModifiedByUserLogin="admin"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GZ-NEWS-1MO-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGZ-NEWS-1MO-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="GZ-NEWS-1MO-ALT" textData="gizmo-newsletter-1-month"/>
     <ElectronicText dataResourceId="DRGZ-NEWS-1MO-ALTEN" textData="gizmo-newsletter-1-month"/>
     <Content contentId="GZ-NEWS-1MO-ALT" contentTypeId="DOCUMENT" dataResourceId="GZ-NEWS-1MO-ALT" localeString="en"/>
     <Content contentId="CGZ-NEWS-1MO-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRGZ-NEWS-1MO-ALTEN" localeString="en_US"/>
@@ -608,6 +644,7 @@ under the License.
     <DataResource dataResourceId="GZ-DIG" dataResourceTypeId="OFBIZ_FILE_BIN" mimeTypeId="image/gif" dataResourceName="Digital Gizmo Image" objectInfo="framework/images/webapp/images/ofbiz_logo.gif"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GZ-DIG-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGZ-DIG-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="GZ-DIG-ALT" textData="digital-gizmo"/>
     <ElectronicText dataResourceId="DRGZ-DIG-ALTEN" textData="digital-gizmo"/>
     <Content contentId="GZ-DIG" contentTypeId="DOCUMENT" dataResourceId="GZ-DIG" mimeTypeId="image/gif" contentName="ofbiz_logo.gif" description="Image of Digital Gizmo (actually the OFBiz logo)"/>
     <Content contentId="GZ-DIG-ALT" contentTypeId="DOCUMENT" dataResourceId="GZ-DIG-ALT" localeString="en"/>
@@ -630,6 +667,7 @@ under the License.
     <ProductAssoc productId="GZ-BASKET" productIdTo="GZ-1004" productAssocTypeId="MANUF_COMPONENT" quantity="3" fromDate="2001-05-13 12:00:00.0"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GZ-BASKET-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGZ-BASKET-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="GZ-BASKET-ALT" textData="gizmo-basket"/>
     <ElectronicText dataResourceId="DRGZ-BASKET-ALTEN" textData="gizmo-basket"/>
     <Content contentId="GZ-BASKET-ALT" contentTypeId="DOCUMENT" dataResourceId="GZ-BASKET-ALT" localeString="en"/>
     <Content contentId="CGZ-BASKET-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRGZ-BASKET-ALTEN" localeString="en_US"/>
@@ -648,6 +686,7 @@ under the License.
     <ProductAssoc productId="GZ-BASKET-PICK" productIdTo="GZ-1004" productAssocTypeId="PRODUCT_COMPONENT" quantity="3" fromDate="2007-01-01 12:00:00.0"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GZ-BASKET-PICK-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGZ-BASKET-PICK-ALT" localeString="en_US"/>
+    <ElectronicText dataResourceId="GZ-BASKET-PICK-ALT" textData="gizmo-basket-assembly-pick"/>
     <ElectronicText dataResourceId="DRGZ-BASKET-PICK-ALT" textData="gizmo-basket-assembly-pick"/>
     <Content contentId="GZ-BASKET-PICK-ALT" contentTypeId="DOCUMENT" dataResourceId="GZ-BASKET-PICK-ALT" localeString="en"/>
     <Content contentId="CGZ-BASKET-PICK-ALT" contentTypeId="DOCUMENT" dataResourceId="DRGZ-BASKET-PICK-ALT" localeString="en_US"/>
@@ -667,6 +706,8 @@ under the License.
     <DataResource dataResourceId="SV-1000-ALT" dataResourceTypeId="LINK" objectInfo="service-product-SV-1000-p"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="SV-1000-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRSV-1000-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="SERV-001-ALT" textData="services"/>
+    <ElectronicText dataResourceId="SERV-001-ALT" textData="service-product"/>
     <ElectronicText dataResourceId="DRSERV-001-ALTEN" textData="services"/>
     <ElectronicText dataResourceId="DRSERV-001-ALTEN" textData="service-product"/>
     
@@ -1204,6 +1245,22 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="GC-001-HO-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRGC-001-HO-ALTEN" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="GC-100-ALT" textData="gift-cards"/>
+    <ElectronicText dataResourceId="GC-101-ALT" textData="gift-cards-purchases"/>
+    <ElectronicText dataResourceId="GC-102-ALT" textData="gift-cards-reloads"/>
+    <ElectronicText dataResourceId="GC-002-ALT" textData="gift-card-reload"/>
+    <ElectronicText dataResourceId="GC-001-ALT" textData="gift-card-activation"/>
+    <ElectronicText dataResourceId="GC-001-C10-ALT" textData="gift-card-activation-c10"/>
+    <ElectronicText dataResourceId="GC-001-C100-ALT" textData="gift-card-activation-c100"/>
+    <ElectronicText dataResourceId="GC-001-C25-ALT" textData="gift-card-activation-c25"/>
+    <ElectronicText dataResourceId="GC-001-C50-ALT" textData="gift-card-activation-c50"/>
+    <ElectronicText dataResourceId="GC-001-CO-ALT" textData="gift-card-activation-co"/>
+    <ElectronicText dataResourceId="GC-001-H10-ALT" textData="gift-card-activation-h10"/>
+    <ElectronicText dataResourceId="GC-001-H100-ALT" textData="gift-card-activation-h100"/>
+    <ElectronicText dataResourceId="GC-001-H25-ALT" textData="gift-card-activation-h25"/>
+    <ElectronicText dataResourceId="GC-001-H50-ALT" textData="gift-card-activation-h50"/>
+    <ElectronicText dataResourceId="GC-001-HO-ALT" textData="gift-card-activation-ho"/>
+    
     <ElectronicText dataResourceId="DRGC-100-ALTEN" textData="gift-cards"/>
     <ElectronicText dataResourceId="DRGC-101-ALTEN" textData="gift-cards-purchases"/>
     <ElectronicText dataResourceId="DRGC-102-ALTEN" textData="gift-cards-reloads"/>
@@ -1412,6 +1469,15 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="WG-9943-S4-BX5-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRWG-9943-S4-BX5-ALT" localeString="en_US"/>
     
+    <ElectronicText dataResourceId="WG-9943-B3-BX2-ALT" textData="giant-widget-b3-bx2"/>
+    <ElectronicText dataResourceId="WG-9943-B3-BX5-ALT" textData="giant-widget-b3-bx5"/>
+    <ElectronicText dataResourceId="WG-9943-B4-BX2-ALT" textData="giant-widget-b4-bx2"/>
+    <ElectronicText dataResourceId="WG-9943-B4-BX5-ALT" textData="giant-widget-b4-bx5"/>
+    <ElectronicText dataResourceId="WG-9943-S3-BX2-ALT" textData="giant-widget-s3-bx2"/>
+    <ElectronicText dataResourceId="WG-9943-S3-BX5-ALT" textData="giant-widget-s3-bx5"/>
+    <ElectronicText dataResourceId="WG-9943-S4-BX2-ALT" textData="giant-widget-s4-bx2"/>
+    <ElectronicText dataResourceId="WG-9943-S4-BX5-ALT" textData="giant-widget-s4-bx5"/>
+    
     <ElectronicText dataResourceId="DRWG-9943-B3-BX2-ALT" textData="giant-widget-b3-bx2"/>
     <ElectronicText dataResourceId="DRWG-9943-B3-BX5-ALT" textData="giant-widget-b3-bx5"/>
     <ElectronicText dataResourceId="DRWG-9943-B4-BX2-ALT" textData="giant-widget-b4-bx2"/>
@@ -1466,6 +1532,8 @@ under the License.
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRWG-1111-BX2-ALTEN" localeString="en_US"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="WG-1111-BX4-ALT" localeString="en"/>
     <DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRWG-1111-BX4-ALTEN" localeString="en_US"/>
+    <ElectronicText dataResourceId="WG-1111-BX2-ALT" textData="micro-chrome-widget-bx2"/>
+    <ElectronicText dataResourceId="WG-1111-BX4-ALT" textData="micro-chrome-widget-bx4"/>
     <ElectronicText dataResourceId="DRWG-1111-BX2-ALTEN" textData="micro-chrome-widget-bx2"/>
     <ElectronicText dataResourceId="DRWG-1111-BX4-ALTEN" textData="micro-chrome-widget-bx4"/>
     <Content contentId="WG-1111-BX2-ALT" contentTypeId="DOCUMENT" dataResourceId="WG-1111-BX2-ALT" localeString="en"/>