You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2009/09/01 23:34:36 UTC

svn commit: r810248 [11/13] - in /ofbiz/branches/executioncontext20090812: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/documents/ applications/accounting/script/org/ofb...

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Tue Sep  1 21:33:41 2009
@@ -36,6 +36,7 @@
 import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
@@ -44,42 +45,47 @@
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityOperator;
+import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ServiceUtil;
+import org.ofbiz.product.product.ProductContentWrapper;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;
 
 public class ProductsExportToEbay {
 
     private static final String resource = "EbayUiLabels";
+    private static final String configFileName = "ebayExport.properties";
     private static final String module = ProductsExportToEbay.class.getName();
 
     public static Map exportToEbay(DispatchContext dctx, Map context) {
         Locale locale = (Locale) context.get("locale");
         Map result = null;
         try {
-            String configString = "ebayExport.properties";
+            String configFileName = "ebayExport.properties";
 
             // get the Developer Key
-            String devID = UtilProperties.getPropertyValue(configString, "eBayExport.devID");
+            String devID = UtilProperties.getPropertyValue(configFileName, "eBayExport.devID");
 
             // get the Application Key
-            String appID = UtilProperties.getPropertyValue(configString, "eBayExport.appID");
+            String appID = UtilProperties.getPropertyValue(configFileName, "eBayExport.appID");
 
             // get the Certifcate Key
-            String certID = UtilProperties.getPropertyValue(configString, "eBayExport.certID");
+            String certID = UtilProperties.getPropertyValue(configFileName, "eBayExport.certID");
 
             // get the Token
-            String token = UtilProperties.getPropertyValue(configString, "eBayExport.token");
+            String token = UtilProperties.getPropertyValue(configFileName, "eBayExport.token");
 
             // get the Compatibility Level
-            String compatibilityLevel = UtilProperties.getPropertyValue(configString, "eBayExport.compatibilityLevel");
+            String compatibilityLevel = UtilProperties.getPropertyValue(configFileName, "eBayExport.compatibilityLevel");
 
             // get the Site ID
-            String siteID = UtilProperties.getPropertyValue(configString, "eBayExport.siteID");
+            String siteID = UtilProperties.getPropertyValue(configFileName, "eBayExport.siteID");
 
             // get the xmlGatewayUri
-            String xmlGatewayUri = UtilProperties.getPropertyValue(configString, "eBayExport.xmlGatewayUri");
+            String xmlGatewayUri = UtilProperties.getPropertyValue(configFileName, "eBayExport.xmlGatewayUri");
 
             StringBuffer dataItemsXml = new StringBuffer();
 
@@ -91,13 +97,14 @@
             }
             */
 
-            if (!ServiceUtil.isFailure(buildDataItemsXml(dctx, context, dataItemsXml, token))) {
+            Map resultMap = buildDataItemsXml(dctx, context, dataItemsXml, token);
+            if (!ServiceUtil.isFailure(resultMap)) {
                 result = postItem(xmlGatewayUri, dataItemsXml, devID, appID, certID, "AddItem", compatibilityLevel, siteID);
                 if (ServiceUtil.isFailure(result)) {
                     return ServiceUtil.returnFailure(ServiceUtil.getErrorMessage(result));
                 }
             } else {
-                return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToEbay.exceptionInExportToEbay", locale));
+                return ServiceUtil.returnFailure(ServiceUtil.getErrorMessage(resultMap));
             }
         } catch (Exception e) {
             Debug.logError("Exception in exportToEbay " + e, module);
@@ -135,7 +142,6 @@
         if (Debug.verboseOn()) {
             Debug.logVerbose("Request of " + callName + " To eBay:\n" + dataItems.toString(), module);
         }
-
         HttpURLConnection connection = (HttpURLConnection)(new URL(postItemsUrl)).openConnection();
         connection.setDoInput(true);
         connection.setDoOutput(true);
@@ -178,8 +184,11 @@
         Locale locale = (Locale)context.get("locale");
         try {
             GenericDelegator delegator = dctx.getDelegator();
+            String webSiteUrl = (String)context.get("webSiteUrl");
             List selectResult = (List)context.get("selectResult");
 
+            StringUtil.SimpleEncoder encoder = StringUtil.getEncoder("xml");
+
             // Get the list of products to be exported to eBay
             List productsList  = delegator.findList("Product", EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult), null, null, null, false);
 
@@ -194,10 +203,20 @@
                 Iterator productsListItr = productsList.iterator();
                 while (productsListItr.hasNext()) {
                     GenericValue prod = (GenericValue)productsListItr.next();
-                    String title = parseText(prod.getString("internalName"));
-                    String description = parseText(prod.getString("internalName"));
+                    String title = encoder.encode(prod.getString("internalName"));
                     String qnt = (String)context.get("quantity");
-
+                    if (UtilValidate.isEmpty(qnt)) {
+                        qnt = "1";
+                    }
+                    String startPrice = (String)context.get("startPrice");
+                    if (UtilValidate.isEmpty(startPrice)) {
+                        GenericValue startPriceValue = EntityUtil.getFirst(EntityUtil.filterByDate(prod.getRelatedByAnd("ProductPrice", UtilMisc.toMap("productPricePurposeId", "EBAY", "productPriceTypeId", "MINIMUM_PRICE"))));
+                        if (UtilValidate.isNotEmpty(startPriceValue)) {
+                            startPrice = startPriceValue.getString("price");
+                        } else {
+                            return ServiceUtil.returnFailure("Unable to find a starting price for auction of product with id [" + prod.getString("productId") + "]");
+                        }
+                    }
                     Element itemElem = UtilXml.addChildElement(itemRequestElem, "Item", itemDocument);
                     UtilXml.addChildElementValue(itemElem, "Country", (String)context.get("country"), itemDocument);
                     UtilXml.addChildElementValue(itemElem, "Location", (String)context.get("location"), itemDocument);
@@ -205,43 +224,65 @@
                     UtilXml.addChildElementValue(itemElem, "ApplicationData", prod.getString("productId"), itemDocument);
                     UtilXml.addChildElementValue(itemElem, "SKU", prod.getString("productId"), itemDocument);
                     UtilXml.addChildElementValue(itemElem, "Title", title, itemDocument);
-                    UtilXml.addChildElementValue(itemElem, "Description", description, itemDocument);
                     UtilXml.addChildElementValue(itemElem, "ListingDuration", (String)context.get("listingDuration"), itemDocument);
                     UtilXml.addChildElementValue(itemElem, "Quantity", qnt, itemDocument);
 
+                    ProductContentWrapper pcw = new ProductContentWrapper(dctx.getDispatcher(), prod, locale, "text/html");
+                    StringUtil.StringWrapper ebayDescription = pcw.get("EBAY_DESCRIPTION");
+                    if (UtilValidate.isNotEmpty(ebayDescription)) {
+                        UtilXml.addChildElementCDATAValue(itemElem, "Description", ebayDescription.toString(), itemDocument);
+                    } else {
+                        UtilXml.addChildElementValue(itemElem, "Description", encoder.encode(prod.getString("productName")), itemDocument);
+                    }
+                    String smallImage = prod.getString("smallImageUrl");
+                    String mediumImage = prod.getString("mediumImageUrl");
+                    String largeImage = prod.getString("largeImageUrl");
+                    String ebayImage = null;
+                    if (UtilValidate.isNotEmpty(largeImage)) {
+                        ebayImage = largeImage;
+                    } else if (UtilValidate.isNotEmpty(mediumImage)) {
+                        ebayImage = mediumImage;
+                    } else if (UtilValidate.isNotEmpty(smallImage)) {
+                        ebayImage = smallImage;
+                    }
+                    if (UtilValidate.isNotEmpty(ebayImage)) {
+                        Element pictureDetails = UtilXml.addChildElement(itemElem, "PictureDetails", itemDocument);
+                        UtilXml.addChildElementValue(pictureDetails, "PictureURL", webSiteUrl + ebayImage, itemDocument);
+                    }
                     setPaymentMethodAccepted(itemDocument, itemElem, context);
-                    setShippingDetails(itemDocument, itemElem, context);
                     setMiscDetails(itemDocument, itemElem, context);
 
+                    String primaryCategoryId = "";
                     String categoryCode = (String)context.get("ebayCategory");
-                    String categoryParent = "";
-                    String levelLimit = "";
-
                     if (categoryCode != null) {
                         String[] params = categoryCode.split("_");
 
                         if (params == null || params.length != 3) {
                             ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToEbay.parametersNotCorrectInGetEbayCategories", locale));
                         } else {
-                            categoryParent = params[1];
-                            levelLimit = params[2];
+                            primaryCategoryId = params[1];
+                        }
+                    } else {
+                        GenericValue productCategoryValue = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("ProductCategoryAndMember", UtilMisc.toMap("productCategoryTypeId", "EBAY_CATEGORY", "productId", prod.getString("productId")))));
+                        if (UtilValidate.isNotEmpty(productCategoryValue)) {
+                            primaryCategoryId = productCategoryValue.getString("categoryName");
                         }
                     }
 
                     Element primaryCatElem = UtilXml.addChildElement(itemElem, "PrimaryCategory", itemDocument);
-                    UtilXml.addChildElementValue(primaryCatElem, "CategoryID", categoryParent, itemDocument);
+                    UtilXml.addChildElementValue(primaryCatElem, "CategoryID", primaryCategoryId, itemDocument);
 
-                    Element startPriceElem = UtilXml.addChildElementValue(itemElem, "StartPrice", (String)context.get("startPrice"), itemDocument);
+                    Element startPriceElem = UtilXml.addChildElementValue(itemElem, "StartPrice", startPrice, itemDocument);
                     startPriceElem.setAttribute("currencyID", "USD");
                 }
 
                 dataItemsXml.append(UtilXml.writeXmlDocument(itemDocument));
             } catch (Exception e) {
-                Debug.logError("Exception during building data items to eBay", module);
+                Debug.logError("Exception during building data items to eBay: " + e.getMessage(), module);
                 return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToEbay.exceptionDuringBuildingDataItemsToEbay", locale));
             }
         } catch (Exception e) {
-            Debug.logError("Exception during building data items to eBay", module);
+            Debug.logError("Exception during building data items to eBay: " + e.getMessage(), module);
             return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToEbay.exceptionDuringBuildingDataItemsToEbay", locale));
         }
         return ServiceUtil.returnSuccess();
@@ -396,24 +437,19 @@
         }
     }
 
-    // TODO: these are mandatory values that have been hardcoded
-    private static void setShippingDetails(Document itemDocument, Element itemElem, Map context) {
-        Element shippingDetails = UtilXml.addChildElement(itemElem, "ShippingDetails", itemDocument);
-        UtilXml.addChildElementValue(shippingDetails, "ShippingType", "Flat", itemDocument);
-        Element shippingServiceOptions = UtilXml.addChildElement(shippingDetails, "ShippingServiceOptions", itemDocument);
-        UtilXml.addChildElementValue(shippingServiceOptions, "ShippingService", "UPS2ndDay", itemDocument);
-        UtilXml.addChildElementValue(shippingServiceOptions, "ShippingServicePriority", "1", itemDocument);
-        UtilXml.addChildElementValue(shippingServiceOptions, "ShippingServiceCost", "5", itemDocument);
-        UtilXml.addChildElementValue(shippingServiceOptions, "ShippingServiceAdditionalCost", "2", itemDocument);
-        UtilXml.addChildElementValue(shippingServiceOptions, "ShippingSurcharge", "1", itemDocument);
-    }
-
-    // TODO: these are mandatory values that have been hardcoded
-    private static void setMiscDetails(Document itemDocument, Element itemElem, Map context) {
-        UtilXml.addChildElementValue(itemElem, "UseTaxTable", "false", itemDocument);
-        UtilXml.addChildElementValue(itemElem, "DispatchTimeMax", "3", itemDocument);
-        Element returnPolicy = UtilXml.addChildElement(itemElem, "ReturnPolicy", itemDocument);
-        UtilXml.addChildElementValue(returnPolicy, "ReturnsAcceptedOption", "ReturnsNotAccepted", itemDocument);
+    private static void setMiscDetails(Document itemDocument, Element itemElem, Map context) throws Exception {
+        String customXml = UtilProperties.getPropertyValue(configFileName, "eBayExport.customXml");
+        if (UtilValidate.isNotEmpty(customXml)) {
+            Document customXmlDoc = UtilXml.readXmlDocument(customXml);
+            if (UtilValidate.isNotEmpty(customXmlDoc)) {
+                Element customXmlElement = customXmlDoc.getDocumentElement();
+                List<? extends Element> eBayElements = UtilXml.childElementList(customXmlElement);
+                for (Element eBayElement: eBayElements) {
+                    Node importedElement = itemElem.getOwnerDocument().importNode(eBayElement, true);
+                    itemElem.appendChild(importedElement);
+                }
+            }
+        }
     }
     
     public static Map getEbayCategories(DispatchContext dctx, Map context) {
@@ -525,18 +561,4 @@
         }
         return results;
     }
-
-    private static String parseText(String text) {
-        Pattern htmlPattern = Pattern.compile("[<](.+?)[>]");
-        Pattern tabPattern = Pattern.compile("\\s");
-        if (null != text && text.length() > 0) {
-            Matcher matcher = htmlPattern.matcher(text);
-            text = matcher.replaceAll("");
-            matcher = tabPattern.matcher(text);
-            text = matcher.replaceAll(" ");
-        } else {
-            text = "";
-        }
-        return text;
-    }
 }

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy Tue Sep  1 21:33:41 2009
@@ -18,6 +18,7 @@
  */
 
 categoryCode = parameters.categoryCode;
+context.categoryCode = categoryCode; 
 userLogin = parameters.userLogin;
 
 results = dispatcher.runSync("getEbayCategories", [categoryCode : categoryCode, userLogin : userLogin]);
@@ -26,8 +27,12 @@
     context.categories = results.categories;
 }
 
-if (!categoryCode || !"Y".equals(categoryCode.substring(0, 1))) {
-    context.hideExportOptions = "Y";
+if (categoryCode) {
+    if (!"Y".equals(categoryCode.substring(0, 1)) && !"".equals(categoryCode)) {
+        context.hideExportOptions = "Y";
+    } else {
+        context.hideExportOptions = "N";
+    }
 } else {
     context.hideExportOptions = "N";
 }

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl Tue Sep  1 21:33:41 2009
@@ -17,14 +17,14 @@
 under the License.
 -->
 <script language="JavaScript" type="text/javascript">
-     function changeEbayCategory(categ, cat_desc) {
+     function changeEbayCategory(categ) {
          document.forms["ProductsExportToEbay"].action = "<@o...@ofbizUrl>";
          document.forms["ProductsExportToEbay"].submit();
      }
 
      function activateSubmitButton() {
          categ = document.forms["ProductsExportToEbay"].ebayCategory.value;
-         if (categ != null && categ.substring(0, 1) == 'Y') {
+         if (categ != null && (categ.substring(0, 1) == 'Y' || categ == '')) {
              document.forms["ProductsExportToEbay"].submitButton.disabled = false;
          } else {
              document.forms["ProductsExportToEbay"].submitButton.disabled = true;
@@ -40,10 +40,11 @@
                 <td>&nbsp;</td>
                 <td>
                     <input type="hidden" name="selectResult" value="${selectResult}"/>
-                    <select name="ebayCategory" onchange="changeEbayCategory(this.value, this.options[this.selectedIndex].text)">
+                    <select name="ebayCategory" onchange="changeEbayCategory(this.value)">
+                        <option value=""> </option>
                         <#if categories?exists>
                             <#list categories as category>
-                                <option value="${category.CategoryCode}">${category.CategoryName}</option>
+                                <option value="${category.CategoryCode}" <#if categoryCode?exists && categoryCode == category.CategoryCode>selected</#if>>${category.CategoryName}</option>
                             </#list>
                         </#if>
                     </select>
@@ -85,7 +86,7 @@
                 <td align="right" class="label">${uiLabelMap.FormFieldTitle_startPrice}</td>
                 <td>&nbsp;</td>
                 <td>
-                    <input type="text" name="startPrice" size="12" maxlength="12" value="1.0"/>
+                    <input type="text" name="startPrice" size="12" maxlength="12" value=""/>
                 </td>
             </tr>
             <tr>
@@ -96,6 +97,13 @@
                 </td>
             </tr>
             <tr>
+                <td align="right" class="label">${uiLabelMap.FormFieldTitle_webSiteUrl}</td>
+                <td>&nbsp;</td>
+                <td>
+                    <input type="text" name="webSiteUrl" size="100" value="${webSiteUrl?if_exists}"/>
+                </td>
+            </tr>
+            <tr>
                 <td align="center" colspan="3"><b><u>${uiLabelMap.FormFieldTitle_paymentMethodsAccepted}</u></b></td>
             </tr>
             <tr>
@@ -106,19 +114,19 @@
                     <table class="basic-table" cellspacing="0">
                         <tr>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentPayPal}</td>
-                            <td width="2%"><input type="checkbox" name="paymentPayPal" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentPayPal"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentVisaMC}</td>
-                            <td width="2%"><input type="checkbox" name="paymentVisaMC" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentVisaMC"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentAmEx}</td>
-                            <td width="2%"><input type="checkbox" name="paymentAmEx" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentAmEx"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentDiscover}</td>
-                            <td width="2%"><input type="checkbox" name="paymentDiscover" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentDiscover"/></td>
                         </tr>
                         <tr>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentMOCC}</td>
-                            <td width="2%"><input type="checkbox" name="paymentMOCC" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentMOCC"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentPersonalCheck}</td>
-                            <td width="2%"><input type="checkbox" name="paymentPersonalCheck" checked="checked"/></td>
+                            <td width="2%"><input type="checkbox" name="paymentPersonalCheck"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCCAccepted}</td>
                             <td width="2%"><input type="checkbox" name="paymentCCAccepted"/></td>
                             <td align="right" width="23%" class="label">${uiLabelMap.FormFieldTitle_paymentCashInPerson}</td>
@@ -156,4 +164,4 @@
     <script language="JavaScript" type="text/javascript">
         activateSubmitButton();
     </script>
-</div>
\ No newline at end of file
+</div>

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ebay/widget/EbayScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ebay/widget/EbayScreens.xml?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ebay/widget/EbayScreens.xml (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ebay/widget/EbayScreens.xml Tue Sep  1 21:33:41 2009
@@ -170,6 +170,8 @@
     <screen name="ProductsExportToEbay">
         <section>
             <actions>
+                <property-map resource="ebayExport.properties" map-name="ebayExportProperties" global="true"/>
+                <set field="webSiteUrl" value="${ebayExportProperties.webSiteUrl}"/>
                 <set field="headerItem" value="export"/>
                 <set field="titleProperty" value="PageTitleEbayProductsExportToEbay"/>
                 <set field="selectResult" from-field="parameters.selectResult"/>

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/data/DemoProduct.xml?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/data/DemoProduct.xml Tue Sep  1 21:33:41 2009
@@ -200,7 +200,53 @@
         linkInfo="http://www.google.com/"/>
     <ProductCategoryLink productCategoryId="100" linkSeqId="03" fromDate="2001-05-13 12:00:00.0"
         sequenceNum="3" linkTypeEnumId="PCLT_CAT_ID" linkInfo="101"/>
-
+    
+    <ProdCatalog prodCatalogId="GoogleCatalog" catalogName="Google Catalog"/>
+    <ProductStoreCatalog productStoreId="9000" prodCatalogId="GoogleCatalog" fromDate="2001-05-13 12:00:00.0" sequenceNum="3"/>
+                
+    <!-- Categories Specific to Google Base -->
+    <ProductCategory categoryName="Google Base Browse Root"
+        longDescription="Google Base Primary Browse Root Category" productCategoryId="GOOGLE_BASE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Animals"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_ANIMALS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Arts &amp; Entertainment"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_ART_N_ENTMNT" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Business &amp; Industrial"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_BUZ_N_INDSTRL" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Cameras &amp; Optics"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_CMRA_N_OPTCS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Clothing &amp; Accessories"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_CLTNG_N_ACECRS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Food, Beverages &amp; Tobacco"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_FD_BVRG_N_TBCO" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Furniture"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_FURNITURE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Hardware"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_HARDWARE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Health &amp; Beauty"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_HLTH_N_BEAUTY" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Home &amp; Garden"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_HME_N_GRDN" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Luggage"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_LUGGAGE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Mature"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_MATURE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Media"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_MEDIA" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Motor Vehicles"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_MTR_VEHICL" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Offices Supplies"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_OFFC_SPPLS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Software"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_SOFTWARE" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Sporting Goods"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_SPRTNG_GDS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+    <ProductCategory categoryName="Toys &amp; Games"
+        primaryParentCategoryId="GOOGLE_BASE" productCategoryId="GB_TYS_GMS" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/>
+
+    <ProdCatalogCategory prodCatalogId="GoogleCatalog" productCategoryId="GOOGLE_BASE" fromDate="2001-05-13 12:00:00.0"
+        sequenceNum="1" prodCatalogCategoryTypeId="PCCT_BROWSE_ROOT"/>
+        
     <Product productId="GZ-1000" productTypeId="FINISHED_GOOD" primaryProductCategoryId="101" productName="Tiny Gizmo" internalName="Tiny Gizmo" description="The smallest gizmo in town." longDescription="This gizmo is very small and runs on solar power." taxable="Y" chargeShipping="Y" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2001-05-13 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2001-05-13 12:00:00.0" lastModifiedByUserLogin="admin"/>
     <Product productId="GZ-1001" productTypeId="FINISHED_GOOD" primaryProductCategoryId="101" productName="Nan Gizmo" internalName="Nan Gizmo" description="Indian style Nan gizmo" taxable="Y" chargeShipping="Y" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2001-05-13 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2001-05-13 12:00:00.0" lastModifiedByUserLogin="admin"/>
     <Product productId="GZ-1004" productTypeId="FINISHED_GOOD" primaryProductCategoryId="102" productName="Rainbow Gizmo" internalName="Rainbow Gizmo" description="The only multi-colored gizmo" longDescription="This is the original multi-colored gizmo, only available from OFBiz!" taxable="Y" chargeShipping="Y" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2001-05-13 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2001-05-13 12:00:00.0" lastModifiedByUserLogin="admin"/>
@@ -507,6 +553,41 @@
     <!-- Added record to check role based permission for limited admin user -->
     <ProductCategoryMember productCategoryId="TSTLTDADMIN" productId="GZ-2644" fromDate="2003-03-04 18:55:14.547"/>
     
+    <!-- Product Category Member records specific to Google Base -->
+    <ProductCategoryMember productCategoryId="GB_HARDWARE" productId="GZ-1001" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_HARDWARE" productId="GZ-1000" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_HARDWARE" productId="GZ-1005" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_HARDWARE" productId="GZ-2002" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_HARDWARE" productId="GZ-2644" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_LUGGAGE" productId="GZ-1004" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_TYS_GMS" productId="GZ-7000" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_TYS_GMS" productId="GZ-9290" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_TYS_GMS" productId="GZ-2644" fromDate="2009-07-28 12:15:00.0"/>        
+    <ProductCategoryMember productCategoryId="GB_MTR_VEHICL" productId="GZ-8544" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_MTR_VEHICL" productId="WG-9943" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_MTR_VEHICL" productId="WG-9944" fromDate="2009-07-28 12:15:00.0"/>
+    <ProductCategoryMember productCategoryId="GB_OFFC_SPPLS" productId="WG-1111" fromDate="2009-07-28 12:15:00.0"/>
+    
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_ANIMALS"/>        
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_ART_N_ENTMNT"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_BUZ_N_INDSTRL"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_CMRA_N_OPTCS"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_CLTNG_N_ACECRS"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_FD_BVRG_N_TBCO"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_FURNITURE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_HARDWARE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_HLTH_N_BEAUTY"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_HME_N_GRDN"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_LUGGAGE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_MATURE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_MEDIA"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_MATURE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_MTR_VEHICL"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_OFFC_SPPLS"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_SOFTWARE"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_SPRTNG_GDS"/>
+    <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="GOOGLE_BASE" productCategoryId="GB_TYS_GMS"/>
+    
     <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="CATALOG1" productCategoryId="100"/>
     <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="100" productCategoryId="101"/>
     <ProductCategoryRollup fromDate="2001-05-13 12:00:00.0" parentProductCategoryId="100" productCategoryId="102"/>

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditBillToAddress.ftl Tue Sep  1 21:33:41 2009
@@ -18,90 +18,72 @@
 -->
 
 <div id="billToServerError" class="errorMessage"></div>
-<form id="editBillToPostalAddress" name="editBillToPostalAddress" method="post" action="<@o...@ofbizUrl>">
-  <div>
+<form id="editBillToPostalAddress" method="post" action="<@o...@ofbizUrl>">
+  <fieldset>
     <input type="hidden" name="setBillingPurpose" value="Y"/>
     <input type="hidden" name="contactMechId" value="${billToContactMechId?if_exists}"/>
     <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/>
     <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine1}*</label>
-      <span>
-        <input type="text" class="left required" name="address1" id="billToAddress1" value="${billToAddress1?if_exists}" size="30" maxlength="30">
-        <span id="advice-required-billToAddress1" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine2}</label>
-      <span>
-        <input type="text" class="left" name="address2" value="${billToAddress2?if_exists}" size="30" maxlength="30">
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCity}*</label>
-      <span>
-        <input type="text" class="left required" name="city" id="billToCity" value="${billToCity?if_exists}" size="30" maxlength="30">
-        <span id="advice-required-billToCity" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyZipCode}*</label>
-      <span>
-        <input type="text" class="left required" name="postalCode" id="billToPostalCode" value="${billToPostalCode?if_exists}" size="12" maxlength="10">
-        <span id="advice-required-billToPostalCode" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCountry}*</label>
-      <span>
-        <select name="countryGeoId" id="billToCountryGeoId" class="left required" style="width: 70%">
-          <#if billToCountryGeoId??>
-            <option value='${billToCountryGeoId!}'>${billToCountryProvinceGeo!(billToCountryGeoId!)}</option>
-          </#if>
-          ${screens.render("component://common/widget/CommonScreens.xml#countries")}
-        </select>
-        <span id="advice-required-billToCountryGeoId" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div id="billToStates" class="form-row">
-      <label>${uiLabelMap.PartyState}*<span id="advice-required-billToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label>
-      <span>
-        <select name="stateProvinceGeoId" id="billToStateProvinceGeoId" style="width: 70%">
-          <#if billToStateProvinceGeoId?has_content>
-            <option value='${billToStateProvinceGeoId!}'>${billToStateProvinceGeo!(billToStateProvinceGeoId!)}</option>
-          <#else>
-            <option value="_NA_">${uiLabelMap.PartyNoState}</option>
-          </#if>
-        </select>
-      </span>
+    <div>
+      <label for="billToAddress1">${uiLabelMap.PartyAddressLine1}*</label>
+      <input type="text" class="left required" name="address1" id="billToAddress1" value="${billToAddress1?if_exists}" size="30" maxlength="30" />
+      <span id="advice-required-billToAddress1" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="billToAddress2">${uiLabelMap.PartyAddressLine2}</label>
+      <input type="text" class="left" name="address2" id="billToAddress2" value="${billToAddress2?if_exists}" size="30" maxlength="30" />
+    </div>
+    <div>
+      <label for="billToCity">${uiLabelMap.PartyCity}*</label>
+      <input type="text" class="left required" name="city" id="billToCity" value="${billToCity?if_exists}" size="30" maxlength="30" />
+      <span id="advice-required-billToCity" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="billToPostalCode">${uiLabelMap.PartyZipCode}*</label>
+      <input type="text" class="left required" name="postalCode" id="billToPostalCode" value="${billToPostalCode?if_exists}" size="12" maxlength="10" />
+      <span id="advice-required-billToPostalCode" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="billToCountryGeoId">${uiLabelMap.PartyCountry}*</label>
+      <select name="countryGeoId" id="billToCountryGeoId" class="left required" style="width: 70%">
+        <#if billToCountryGeoId??>
+          <option value='${billToCountryGeoId!}'>${billToCountryProvinceGeo!(billToCountryGeoId!)}</option>
+        </#if>
+        ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+      </select>
+      <span id="advice-required-billToCountryGeoId" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div id="billToStates">
+      <label for="billToStateProvinceGeoId">${uiLabelMap.PartyState}*<span id="advice-required-billToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label>
+      <select name="stateProvinceGeoId" id="billToStateProvinceGeoId" style="width: 70%">
+        <#if billToStateProvinceGeoId?has_content>
+          <option value='${billToStateProvinceGeoId!}'>${billToStateProvinceGeo!(billToStateProvinceGeoId!)}</option>
+        <#else>
+          <option value="_NA_">${uiLabelMap.PartyNoState}</option>
+        </#if>
+      </select>
     </div>
     <#if billToTelecomNumber?has_content>
-      <div class="form-row">
-        <div class="field-label">
-          <label>${uiLabelMap.PartyPhoneNumber}*</label>
-          <span id="advice-required-billToCountryCode" style="display:none" class="errorMessage"></span>
-          <span id="advice-required-billToAreaCode" style="display:none" class="errorMessage"></span>
-          <span id="advice-required-billToContactNumber" style="display:none" class="errorMessage"></span>
-          <span id="billToPhoneRequired" style="display: none;" class="errorMessage">(required)</span>
-        </div>
-        <div>
-          <input type="hidden" name="phoneContactMechId" value="${billToTelecomNumber.contactMechId?if_exists}"/>
-          <input type="text" name="countryCode" id="billToCountryCode" class="required" value="${billToTelecomNumber.countryCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="areaCode" id="billToAreaCode" class="required" value="${billToTelecomNumber.areaCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="contactNumber" id="billToContactNumber" class="required" value="${contactNumber?default("${billToTelecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7"/>
-          - <input type="text" name="extension" value="${extension?default("${billToExtension?if_exists}")}" size="3" maxlength="3"/>
-        </div>
+      <div>
+        <label>${uiLabelMap.PartyPhoneNumber}*</label>
+        <span id="advice-required-billToCountryCode" style="display:none" class="errorMessage"></span>
+        <span id="advice-required-billToAreaCode" style="display:none" class="errorMessage"></span>
+        <span id="advice-required-billToContactNumber" style="display:none" class="errorMessage"></span>
+        <span id="billToPhoneRequired" style="display: none;" class="errorMessage">(required)</span>
+        <input type="hidden" name="phoneContactMechId" value="${billToTelecomNumber.contactMechId?if_exists}" />
+        <input type="text" name="countryCode" id="billToCountryCode" class="required" value="${billToTelecomNumber.countryCode?if_exists}" size="3" maxlength="3" />
+        - <input type="text" name="areaCode" id="billToAreaCode" class="required" value="${billToTelecomNumber.areaCode?if_exists}" size="3" maxlength="3" />
+        - <input type="text" name="contactNumber" id="billToContactNumber" class="required" value="${contactNumber?default("${billToTelecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7" />
+        - <input type="text" name="extension" value="${extension?default("${billToExtension?if_exists}")}" size="3" maxlength="3" />
       </div>
     </#if>
-    <div class="form-row">
-      <b>${uiLabelMap.EcommerceMyDefaultShippingAddress}</b>
-      <input type="checkbox" name="setShippingPurpose" value="Y" <#if setShippingPurpose?exists>checked</#if>/>
-    </div>
-    <div class="form-row">
-      <a name="submitEditBillToPostalAddress" id="submitEditBillToPostalAddress" class="buttontext" onclick="updatePartyBillToPostalAddress('submitEditBillToPostalAddress')">${uiLabelMap.CommonSubmit}</a>
-      <form action="">
-        <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
-      </form>
+    <div>
+      <label for="setShippingPurposeForBilling">${uiLabelMap.EcommerceMyDefaultShippingAddress}</label>
+      <input type="checkbox" name="setShippingPurpose" id="setShippingPurposeForBilling" value="Y" <#if setShippingPurpose?exists>checked="checked"</#if> />
+    </div>
+    <div>
+      <a name="submitEditBillToPostalAddress" id="submitEditBillToPostalAddress" class="button" onclick="updatePartyBillToPostalAddress('submitEditBillToPostalAddress')">${uiLabelMap.CommonSubmit}</a>
+      <a class="popup_closebox button" href="javascript:void(0);">${uiLabelMap.CommonClose}</a>
     </div>
-  </div>
+  </fieldset>
 </form>

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditPostalAddress.ftl Tue Sep  1 21:33:41 2009
@@ -18,80 +18,68 @@
 -->
 
 <div id="serverError_${contactMech.contactMechId}" class="errorMessage"></div>
-<#assign postalAddress = delegator.findOne("PostalAddress", Static["org.ofbiz.base.util.UtilMisc"].toMap("contactMechId", contactMech.contactMechId), true)>
+<#assign postalAddress = delegator.findOne("PostalAddress", Static["org.ofbiz.base.util.UtilMisc"].toMap("contactMechId", contactMech.contactMechId), true) />
 
-<form id="editPostalAddress_${contactMech.contactMechId}" name="editPostalAddress_${contactMech.contactMechId}" method="post" action="<@o...@ofbizUrl>">
-  <input type="hidden" name="contactMechId" value="${postalAddress.contactMechId?if_exists}"/>
-  <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/>
-  <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/>
-  <div class="screenlet-body">
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine1}*</label>
-      <span>
-        <input type="text" class="left required" name="address1" id="address1_${contactMech.contactMechId}" value="${postalAddress.address1?if_exists}" style="width: 50%" size="30" maxlength="30">
+<form id="editPostalAddress_${contactMech.contactMechId}" method="post" action="<@o...@ofbizUrl>">
+  <fieldset>
+    <input type="hidden" name="contactMechId" value="${postalAddress.contactMechId?if_exists}" />
+    <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request) />
+    <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}" />
+    <div class="screenlet-body">
+      <div>
+        <label for="address1_${contactMech.contactMechId}">${uiLabelMap.PartyAddressLine1}*</label>
+        <input type="text" class="left required" name="address1" id="address1_${contactMech.contactMechId}" value="${postalAddress.address1?if_exists}" style="width: 50%" size="30" maxlength="30" />
         <span id="advice-required-address1_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine2}</label>
-      <span>
-        <input type="text" class="left" name="address2" value="${postalAddress.address2?if_exists}" style="width: 50%" size="30" maxlength="30">
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCity}*</label>
-      <span>
-        <input type="text" class="left required" name="city" id="city_${contactMech.contactMechId}" value="${postalAddress.city?if_exists}" size="30" maxlength="30">
+      </div>
+      <div>
+        <label for="additionalAddress2_${contactMech.contactMechId}">${uiLabelMap.PartyAddressLine2}</label>
+        <input type="text" class="left" name="address2" id="additionalAddress2_${contactMech.contactMechId}" value="${postalAddress.address2?if_exists}" style="width: 50%" size="30" maxlength="30" />
+      </div>
+      <div>
+        <label for="city_${contactMech.contactMechId}">${uiLabelMap.PartyCity}*</label>
+        <input type="text" class="left required" name="city" id="city_${contactMech.contactMechId}" value="${postalAddress.city?if_exists}" size="30" maxlength="30" />
         <span id="advice-required-city_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyZipCode}*</label>
-      <span>
-        <input type="text" class="left required" name="postalCode" id="postalCode_${contactMech.contactMechId}" value="${postalAddress.postalCode?if_exists}" size="12" maxlength="10">
+      </div>
+      <div>
+        <label for="postalCode_${contactMech.contactMechId}">${uiLabelMap.PartyZipCode}*</label>
+        <input type="text" class="left required" name="postalCode" id="postalCode_${contactMech.contactMechId}" value="${postalAddress.postalCode?if_exists}" size="12" maxlength="10" />
         <span id="advice-required-postalCode_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCountry}*</label>
-      <span>
+      </div>
+      <div>
+        <label for="countryGeoId_${contactMech.contactMechId}">${uiLabelMap.PartyCountry}*</label>
         <select name="countryGeoId" id="countryGeoId_${contactMech.contactMechId}" class="left required" style="width: 70%">
           <#if postalAddress.countryGeoId??>
-            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.countryGeoId), true)>
+            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.countryGeoId), true) />
             <option value="${postalAddress.countryGeoId}">${geo.geoName!(postalAddress.countryGeoId)}</option>
           </#if>
           ${screens.render("component://common/widget/CommonScreens.xml#countries")}
         </select>
         <span id="advice-required-countryGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div id="states_${contactMech.contactMechId}" class="form-row">
-      <label>${uiLabelMap.PartyState}*</label>
-      <span>
+      </div>
+      <div id="states_${contactMech.contactMechId}">
+        <label for="stateProvinceGeoId_${contactMech.contactMechId}">${uiLabelMap.PartyState}*</label>
         <select name="stateProvinceGeoId" id="stateProvinceGeoId_${contactMech.contactMechId}" style="width: 70%">
           <#if postalAddress.stateProvinceGeoId??>
-            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.stateProvinceGeoId), true)>
+            <#assign geo = delegator.findOne("Geo", Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId", postalAddress.stateProvinceGeoId), true) />
             <option value="${postalAddress.stateProvinceGeoId}">${geo.geoName!(postalAddress.stateProvinceGeoId)}</option>
           <#else>
             <option value="_NA_">${uiLabelMap.PartyNoState}</option>
           </#if>
         </select>
         <span id="advice-required-stateProvinceGeoId_${contactMech.contactMechId}" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <b>${uiLabelMap.EcommerceMyDefaultBillingAddress}</b>
-      <input type="checkbox" name="setBillingPurpose" value="Y" <#if setBillingPurpose?exists>checked</#if>/>
-    </div>
-    <div class="form-row">
-      <b>${uiLabelMap.EcommerceMyDefaultShippingAddress}</b>
-      <input type="checkbox" name="setShippingPurpose" value="Y" <#if setShippingPurpose?exists>checked</#if>/>
-    </div>
-    <div class="form-row">
-      <a name="submitEditPostalAddress_${contactMech.contactMechId}" id="submitEditPostalAddress_${contactMech.contactMechId}" class="buttontext" onclick="updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}')">${uiLabelMap.CommonSubmit}</a>
-      <form action="">
-        <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
-      </form>
+      </div>
+      <div>
+        <label for="setBillingPurposeForPostalAddress">${uiLabelMap.EcommerceMyDefaultBillingAddress}</label>
+        <input type="checkbox" name="setBillingPurpose" id="setBillingPurposeForPostalAddress" value="Y" <#if setBillingPurpose?exists>checked="checked"</#if> />
+      </div>
+      <div>
+        <label for="setShippingPurposeForPostalAddress">${uiLabelMap.EcommerceMyDefaultShippingAddress}</label>
+        <input type="checkbox" name="setShippingPurpose" id="setShippingPurposeForPostalAddress" value="Y" <#if setShippingPurpose?exists>checked="checked"</#if> />
+      </div>
+      <div>
+        <a name="submitEditPostalAddress_${contactMech.contactMechId}" id="submitEditPostalAddress_${contactMech.contactMechId}" class="button" onclick="updatePartyPostalAddress('submitEditPostalAddress_${contactMech.contactMechId}')">${uiLabelMap.CommonSubmit}</a>
+        <a href="javascript:void(0);" class="popup_closebox button">${uiLabelMap.CommonClose}</a>
+      </div>
     </div>
-  </div>
+  </fieldset>
 </form>
\ No newline at end of file

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/EditShipToAddress.ftl Tue Sep  1 21:33:41 2009
@@ -18,90 +18,72 @@
 -->
 
 <div id="shipToServerError" class="errorMessage"></div>
-<form id="editShipToPostalAddress" name="editShipToPostalAddress" method="post" action="<@o...@ofbizUrl>">
-  <div>
+<form id="editShipToPostalAddress" method="post" action="<@o...@ofbizUrl>">
+  <fieldset>
     <input type="hidden" name="setShippingPurpose" value="Y"/>
     <input type="hidden" name="contactMechId" value="${shipToContactMechId?if_exists}"/>
     <#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/>
     <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine1}*</label>
-      <span>
-        <input type="text" class="left required" name="address1" id="shipToAddress1" value="${shipToAddress1?if_exists}" size="30" maxlength="30">
-        <span id="advice-required-shipToAddress1" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyAddressLine2}</label>
-      <span>
-        <input type="text" class="left" name="address2" value="${shipToAddress2?if_exists}" size="30" maxlength="30">
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCity}*</label>
-      <span>
-        <input type="text" class="left required" name="city" id="shipToCity" value="${shipToCity?if_exists}" size="30" maxlength="30">
-        <span id="advice-required-shipToCity" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyZipCode}*</label>
-      <span>
-        <input type="text" class="left required" name="postalCode" id="shipToPostalCode" value="${shipToPostalCode?if_exists}" size="12" maxlength="10">
-        <span id="advice-required-shipToPostalCode" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div class="form-row">
-      <label>${uiLabelMap.PartyCountry}*</label>
-      <span>
-        <select name="countryGeoId" id="shipToCountryGeoId" class="left required" style="width: 70%">
-          <#if shipToCountryGeoId??>
-            <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryGeoId!)}</option>
-          </#if>
-          ${screens.render("component://common/widget/CommonScreens.xml#countries")}
-        </select>
-        <span id="advice-required-shipToCountryGeoId" style="display: none" class="errorMessage">(required)</span>
-      </span>
-    </div>
-    <div id="shipToStates" class="form-row">
-      <label>${uiLabelMap.PartyState}*<span id="advice-required-shipToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label>
-      <span>
-        <select name="stateProvinceGeoId" id="shipToStateProvinceGeoId" style="width: 70%">
-          <#if shipToStateProvinceGeoId?has_content>
-            <option value='${shipToStateProvinceGeoId!}'>${shipToStateProvinceGeo!(shipToStateProvinceGeoId!)}</option>
-          <#else>
-            <option value="_NA_">${uiLabelMap.PartyNoState}</option>
-          </#if>
-        </select>
-      </span>
+    <div>
+      <label for="shipToAddress1">${uiLabelMap.PartyAddressLine1}*</label>
+      <input type="text" class="left required" name="address1" id="shipToAddress1" value="${shipToAddress1?if_exists}" size="30" maxlength="30" />
+      <span id="advice-required-shipToAddress1" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="shipToAddress2">${uiLabelMap.PartyAddressLine2}</label>
+      <input type="text" class="left" name="address2" id="shipToAddress2" value="${shipToAddress2?if_exists}" size="30" maxlength="30" />
+    </div>
+    <div>
+      <label for="shipToCity">${uiLabelMap.PartyCity}*</label>
+      <input type="text" class="left required" name="city" id="shipToCity" value="${shipToCity?if_exists}" size="30" maxlength="30" />
+      <span id="advice-required-shipToCity" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="shipToPostalCode">${uiLabelMap.PartyZipCode}*</label>
+      <input type="text" class="left required" name="postalCode" id="shipToPostalCode" value="${shipToPostalCode?if_exists}" size="12" maxlength="10" />
+      <span id="advice-required-shipToPostalCode" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div>
+      <label for="shipToCountryGeoId">${uiLabelMap.PartyCountry}*</label>
+      <select name="countryGeoId" id="shipToCountryGeoId" class="left required" style="width: 70%">
+        <#if shipToCountryGeoId??>
+          <option value="${shipToCountryGeoId!}">${shipToCountryProvinceGeo!(shipToCountryGeoId!)}</option>
+        </#if>
+        ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+      </select>
+      <span id="advice-required-shipToCountryGeoId" style="display: none" class="errorMessage">(required)</span>
+    </div>
+    <div id="shipToStates">
+      <label for="shipToStateProvinceGeoId">${uiLabelMap.PartyState}*<span id="advice-required-shipToStateProvinceGeoId" style="display: none" class="errorMessage">(required)</span></label>
+      <select name="stateProvinceGeoId" id="shipToStateProvinceGeoId" style="width: 70%">
+        <#if shipToStateProvinceGeoId?has_content>
+          <option value='${shipToStateProvinceGeoId!}'>${shipToStateProvinceGeo!(shipToStateProvinceGeoId!)}</option>
+        <#else>
+          <option value="_NA_">${uiLabelMap.PartyNoState}</option>
+        </#if>
+      </select>
     </div>
     <#if shipToTelecomNumber?has_content>
-      <div class="form-row">
-        <div class="field-label">
-          <label>${uiLabelMap.PartyPhoneNumber}*</label>
-          <span id="advice-required-shipToCountryCode" style="display:none" class="errorMessage"></span>
-          <span id="advice-required-shipToAreaCode" style="display:none" class="errorMessage"></span>
-          <span id="advice-required-shipToContactNumber" style="display:none" class="errorMessage"></span>
-          <span id="shipToPhoneRequired" style="display: none;" class="errorMessage">(required)</span>
-        </div>
-        <div>
-          <input type="hidden" name="phoneContactMechId" value="${shipToTelecomNumber.contactMechId?if_exists}"/>
-          <input type="text" name="countryCode" id="shipToCountryCode" class="required" value="${shipToTelecomNumber.countryCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="areaCode" id="shipToAreaCode" class="required" value="${shipToTelecomNumber.areaCode?if_exists}" size="3" maxlength="3"/>
-          - <input type="text" name="contactNumber" id="shipToContactNumber" class="required" value="${contactNumber?default("${shipToTelecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7"/>
-          - <input type="text" name="extension" value="${extension?default("${shipToExtension?if_exists}")}" size="3" maxlength="3"/>
-        </div>
+      <div>
+        <label>${uiLabelMap.PartyPhoneNumber}*</label>
+        <span id="advice-required-shipToCountryCode" style="display:none" class="errorMessage"></span>
+        <span id="advice-required-shipToAreaCode" style="display:none" class="errorMessage"></span>
+        <span id="advice-required-shipToContactNumber" style="display:none" class="errorMessage"></span>
+        <span id="shipToPhoneRequired" style="display: none;" class="errorMessage">(required)</span>
+        <input type="hidden" name="phoneContactMechId" value="${shipToTelecomNumber.contactMechId?if_exists}" />
+        <input type="text" name="countryCode" id="shipToCountryCode" class="required" value="${shipToTelecomNumber.countryCode?if_exists}" size="3" maxlength="3" />
+        - <input type="text" name="areaCode" id="shipToAreaCode" class="required" value="${shipToTelecomNumber.areaCode?if_exists}" size="3" maxlength="3" />
+        - <input type="text" name="contactNumber" id="shipToContactNumber" class="required" value="${contactNumber?default("${shipToTelecomNumber.contactNumber?if_exists}")}" size="6" maxlength="7" />
+        - <input type="text" name="extension" value="${extension?default("${shipToExtension?if_exists}")}" size="3" maxlength="3" />
       </div>
     </#if>
-    <div class="form-row">
-      <b>${uiLabelMap.EcommerceMyDefaultBillingAddress}</b>
-      <input type="checkbox" name="setBillingPurpose" value="Y" <#if setBillingPurpose?exists>checked</#if>/>
-    </div>
-    <div class="form-row">
-      <a name="submitEditShipToPostalAddress" id="submitEditShipToPostalAddress" class="buttontext" onclick="updatePartyShipToPostalAddress('submitEditShipToPostalAddress')">${uiLabelMap.CommonSubmit}</a>
-      <form action="">
-        <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
-      </form>
+    <div>
+      <label for="setBillingPurposeForShipping">${uiLabelMap.EcommerceMyDefaultBillingAddress}</label>
+      <input type="checkbox" name="setBillingPurpose" id="setBillingPurposeForShipping" value="Y" <#if setBillingPurpose?exists>checked="checked"</#if>/>
+    </div>
+    <div>
+      <a name="submitEditShipToPostalAddress" id="submitEditShipToPostalAddress" class="button" onclick="updatePartyShipToPostalAddress('submitEditShipToPostalAddress')">${uiLabelMap.CommonSubmit}</a>
+      <a class="popup_closebox button">${uiLabelMap.CommonClose}</a>
     </div>
-  </div>
+  </fieldset>
 </form>

Modified: ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl?rev=810248&r1=810247&r2=810248&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl (original)
+++ ofbiz/branches/executioncontext20090812/specialpurpose/ecommerce/webapp/ecommerce/customer/profile/ManageAddress.ftl Tue Sep  1 21:33:41 2009
@@ -17,229 +17,237 @@
 under the License.
 -->
 
-<#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request)/>
+<#assign productStoreId = Static["org.ofbiz.product.store.ProductStoreWorker"].getProductStoreId(request) />
 <div class="screenlet">
-  <form id="refreshRequestForm" name="refreshRequestForm" method="post" action="<@o...@ofbizUrl>">
+  <form id="refreshRequestForm" method="post" action="<@o...@ofbizUrl>">
   </form>
 
-  <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.EcommerceAddressBook}</div></div>
+  <h3>${uiLabelMap.EcommerceAddressBook}</h3>
   <div class="screenlet-body">
     <#-- Add address -->
-    <div class="form-row" align="right">
-      <a class="buttontext" id="addAddress" href="javascript:void(0)">${uiLabelMap.EcommerceAddNewAddress}</a>
-    </div>
+    <a class="button" id="addAddress" href="javascript:void(0)">${uiLabelMap.EcommerceAddNewAddress}</a>
     <div id="displayCreateAddressForm" class="popup" style="display: none;">
       <div id="serverError" class="errorMessage"></div>
-      <form id="createPostalAddressForm" name="createPostalAddressForm" method="post" action="<@o...@ofbizUrl>">
-        <input type="hidden" name="roleTypeId" value="CUSTOMER">
-        <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}"/>
-        <div class="form-row">
-          ${uiLabelMap.PartyAddressLine1}*
-          <span id="advice-required-address1" style="display: none" class="errorMessage">(required)</span>
-          <div class="form-field">
-            <input type="text" class="required" name="address1" id="address1" value="" size="30" maxlength="30">
-          </div>
-        </div>
-        <div class="form-row">
-          ${uiLabelMap.PartyAddressLine2}<div class="form-field"><input type="text" name="address2" value="" size="30" maxlength="30"></div>
-        </div>
-        <div class="form-row">
-          ${uiLabelMap.PartyCity}*
-          <span id="advice-required-city" style="display: none" class="errorMessage">(required)</span>
-          <div class="form-field">
-            <input type="text" class="required" name="city" id="city" value="" size="30" maxlength="30">
-          </div>
-        </div>
-        <div class="form-row">
-          ${uiLabelMap.PartyZipCode}*
-          <span id="advice-required-postalCode" style="display: none" class="errorMessage">(required)</span>
-          <div class="form-field">
-            <input type="text" class="required" name="postalCode" id="postalCode" value="" size="30" maxlength="10">
-          </div>
-        </div>
-        <div class="form-row">
-          ${uiLabelMap.PartyCountry}*
-          <span id="advice-required-countryGeoId" style="display: none" class="errorMessage">(required)</span>
-          <div class="form-field">
-            <select name="countryGeoId" id="countryGeoId" class="required" style="width: 70%">
-              <#if countryGeoId??>
-                <option value="${countryGeoId}">${countryGeoId}</option>
-              </#if>
-              ${screens.render("component://common/widget/CommonScreens.xml#countries")}
-            </select>
-          </div>
-        </div>
-        <div id="states" class="form-row">
-          ${uiLabelMap.PartyState}*
-          <span id="advice-required-stateProvinceGeoId" style="display: none" class="errorMessage">(required)</span>
-          <div class="form-field">
-            <select name="stateProvinceGeoId" id="stateProvinceGeoId" style="width: 70%">
+      <form id="createPostalAddressForm" method="post" action="<@o...@ofbizUrl>">
+        <fieldset>
+          <input type="hidden" name="roleTypeId" value="CUSTOMER" />
+          <input type="hidden" name="productStoreId" value="${productStoreId?if_exists}" />
+          <div>
+            <label for="address1">${uiLabelMap.PartyAddressLine1}*
+               <span id="advice-required-address1" style="display: none" class="errorMessage">(required)</span>
+            </label>
+            <input type="text" class="required" name="address1" id="address1" value="" maxlength="30" />
+          </div>
+          <div>
+            <label for="address2">${uiLabelMap.PartyAddressLine2}</label>
+            <input type="text" name="address2" id="address2" value="" maxlength="30" />
+          </div>
+          <div>
+            <label for="city">${uiLabelMap.PartyCity}*
+              <span id="advice-required-city" style="display: none" class="errorMessage">(required)</span>
+            </label>
+            <input type="text" class="required" name="city" id="city" value="" maxlength="30" />
+          </div>
+          <div>
+            <label for="postalCode">${uiLabelMap.PartyZipCode}*
+              <span id="advice-required-postalCode" style="display: none" class="errorMessage">(required)</span>
+            </label>
+            <input type="text" class="required" name="postalCode" id="postalCode" value="" maxlength="10" />
+          </div>
+          <div>
+            <label for="countryGeoId">${uiLabelMap.PartyCountry}*
+              <span id="advice-required-countryGeoId" style="display: none" class="errorMessage">(required)</span>
+            </label>
+             <select name="countryGeoId" id="countryGeoId" class="required" style="width: 70%">
+               <#if countryGeoId??>
+                 <option value="${countryGeoId}">${countryGeoId}</option>
+               </#if>
+               ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+             </select>
+          </div>
+          <div id="states">
+            <label for="stateProvinceGeoId">${uiLabelMap.PartyState}*
+              <span id="advice-required-stateProvinceGeoId" style="display: none" class="errorMessage">(required)</span>
+            </label>  
+              <select name="stateProvinceGeoId" id="stateProvinceGeoId" style="width: 70%">
               <#if stateProvinceGeoId?has_content>
                 <option value="${stateProvinceGeoId}">${stateProvinceGeoId}</option>
               <#else>
                 <option value="_NA_">${uiLabelMap.PartyNoState}</option>
               </#if>
-            </select>
+              </select>
           </div>
-        </div>
-        <div class="form-row">
-          <b>${uiLabelMap.EcommerceMyDefaultBillingAddress}</b>
-          <input type="checkbox" name="setBillingPurpose" id="setBillingPurpose" value="Y" <#if setBillingPurpose?exists>checked</#if>/>
-        </div>
-        <div class="form-row">
-          <b>${uiLabelMap.EcommerceMyDefaultShippingAddress}</b>
-          <input type="checkbox" name="setShippingPurpose" id="setShippingPurpose" value="Y" <#if setShippingPurpose?exists>checked</#if>/>
-        </div>
-        <div class="form-row">
-          <a href="javascript:void(0);" id="submitPostalAddressForm" class="buttontext" onclick="createPartyPostalAddress('submitPostalAddressForm')">${uiLabelMap.CommonSubmit}</a>
-          <form action="">
-            <input class="popup_closebox buttontext" type="button" value="${uiLabelMap.CommonClose}"/>
-          </form>
-        </div>
+          <div>
+            <label for="setBillingPurpose">${uiLabelMap.EcommerceMyDefaultBillingAddress}</label>
+            <input type="checkbox" name="setBillingPurpose" id="setBillingPurpose" value="Y" <#if setBillingPurpose?exists>checked="checked"</#if> />
+          </div>
+          <div>
+            <label for="setShippingPurpose">${uiLabelMap.EcommerceMyDefaultShippingAddress}</label>
+            <input type="checkbox" name="setShippingPurpose" id="setShippingPurpose" value="Y" <#if setShippingPurpose?exists>checked="checked"</#if> />
+          </div>
+          <div>
+            <a href="javascript:void(0);" id="submitPostalAddressForm" class="button" onclick="createPartyPostalAddress('submitPostalAddressForm')">${uiLabelMap.CommonSubmit}</a>
+            <a href="javascript:void(0);" class="popup_closebox button" >${uiLabelMap.CommonClose}</a>
+          </div>
+        </fieldset>
       </form>
     </div>
     <script type="text/javascript">
-      new Popup('displayCreateAddressForm','addAddress', {modal: true, position: 'center', trigger: 'click'})
+      //<![CDATA[
+        new Popup('displayCreateAddressForm','addAddress', {modal: true, position: 'center', trigger: 'click'})
+      //]]>
     </script>
   </div>
 
   <#-- Default Addresses -->
   <div class="left center">
-    <div class="screenlet-header"><div class="boxhead">&nbsp;${uiLabelMap.EcommerceDefaultAddresses}</div></div>
+    <h3>${uiLabelMap.EcommerceDefaultAddresses}</h3>
     <div class="screenlet-body">
       <#--===================================== Billing Address and Telecom number ===========================================-->
       <h3>${uiLabelMap.EcommercePrimaryBillingAddress}</h3>
+      <ul>
       <#if billToContactMechId?exists>
-        ${billToAddress1?if_exists}<br/>
-        <#if billToAddress2?has_content>${billToAddress2?if_exists}<br/></#if>
-        <#if billToStateProvinceGeoId?has_content && billToStateProvinceGeoId != "_NA_">
-          ${billToStateProvinceGeoId}
-        </#if>
+        <li>${billToAddress1?if_exists}</li>
+        <#if billToAddress2?has_content><li>${billToAddress2?if_exists}</li></#if>
+        <li>
+          <#if billToStateProvinceGeoId?has_content && billToStateProvinceGeoId != "_NA_">
+            ${billToStateProvinceGeoId}
+          </#if>
           ${billToCity?if_exists},
-          ${billToPostalCode?if_exists}<br/>
-          ${billToCountryGeoId?if_exists}<br/>
+          ${billToPostalCode?if_exists}
+        </li>
+        <li>${billToCountryGeoId?if_exists}</li>
         <#if billToTelecomNumber?has_content>
+        <li>
           ${billToTelecomNumber.countryCode?if_exists}-
           ${billToTelecomNumber.areaCode?if_exists}-
           ${billToTelecomNumber.contactNumber?if_exists}
-          <#if billToExtension?exists>-${billToExtension?if_exists}</#if><br/>
+          <#if billToExtension?exists>-${billToExtension?if_exists}</#if>
+        </li>
         </#if>
-        <a id="updateBillToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit}</a>&nbsp;
+        <li><a id="updateBillToPostalAddress" href="javascript:void(0)" class="button popup_link">${uiLabelMap.CommonEdit}</a></li>
       <#else>
-        ${uiLabelMap.PartyPostalInformationNotFound}
+        <li>${uiLabelMap.PartyPostalInformationNotFound}</li>
       </#if>
+      </ul>
       <div id="displayEditBillToPostalAddress" class="popup" style="display: none;">
         <#include "EditBillToAddress.ftl"/>
       </div>
-      <div class="form-row"><hr class="sepbar"/></div>
       <script type="text/javascript">
+        //<![CDATA[
         new Popup('displayEditBillToPostalAddress', 'updateBillToPostalAddress', {modal: true, position: 'center', trigger: 'click'})
+        //]]>
       </script>
 
     <#--===================================== Shipping Address and Telecom number ===========================================-->
       <h3>${uiLabelMap.EcommercePrimaryShippingAddress}</h3>
+      <ul>
       <#if shipToContactMechId?exists>
-        ${shipToAddress1?if_exists}<br/>
-        <#if shipToAddress2?has_content>${shipToAddress2?if_exists}<br/></#if>
+        <li>${shipToAddress1?if_exists}</li>
+        <#if shipToAddress2?has_content><li>${shipToAddress2?if_exists}</li></#if>
+        <li>
         <#if shipToStateProvinceGeoId?has_content && shipToStateProvinceGeoId != "_NA_">
           ${shipToStateProvinceGeoId}
         </#if>
           ${shipToCity?if_exists},
-          ${shipToPostalCode?if_exists}<br/>
-          ${shipToCountryGeoId?if_exists}<br/>
+          ${shipToPostalCode?if_exists}
+        </li>
+        <li>${shipToCountryGeoId?if_exists}</li>
         <#if shipToTelecomNumber?has_content>
+        <li>
           ${shipToTelecomNumber.countryCode?if_exists}-
           ${shipToTelecomNumber.areaCode?if_exists}-
           ${shipToTelecomNumber.contactNumber?if_exists}
-          <#if shipToExtension?exists>-${shipToExtension?if_exists}</#if><br/>
+          <#if shipToExtension?exists>-${shipToExtension?if_exists}</#if>
+        </li>
         </#if>
-        <a id="updateShipToPostalAddress" href="javascript:void(0)" class="buttontext popup_link">${uiLabelMap.CommonEdit}</a>&nbsp;
+        <li><a id="updateShipToPostalAddress" href="javascript:void(0)" class="button popup_link">${uiLabelMap.CommonEdit}</a></li>
       <#else>
-        ${uiLabelMap.PartyPostalInformationNotFound}
+        <li>${uiLabelMap.PartyPostalInformationNotFound}</li>
       </#if>
+      </ul>
       <div id="displayEditShipToPostalAddress" class="popup" style="display: none;">
         <#include "EditShipToAddress.ftl"/>
       </div>
-      <div class="form-row"><hr class="sepbar"/></div>
       <script type="text/javascript">
+         //<![CDATA[
           new Popup('displayEditShipToPostalAddress','updateShipToPostalAddress', {modal: true, position: 'center', trigger: 'click'})
+          //]]>
       </script>
     </div>
   </div>
 
   <#-- Additional Addresses -->
   <div class="center right">
-    <div class="screenlet-header">
-      <div class="boxhead">&nbsp;${uiLabelMap.EcommerceAdditionalAddresses}</div>
-    </div>
+    <h3>${uiLabelMap.EcommerceAdditionalAddresses}</h3>
 
     <div class="screenlet-body">
-      <#assign postalAddressFlag = "N">
+      <#assign postalAddressFlag = "N" />
       <#list partyContactMechValueMaps as partyContactMechValueMap>
-        <#assign contactMech = partyContactMechValueMap.contactMech?if_exists>
+        <#assign contactMech = partyContactMechValueMap.contactMech?if_exists />
         <#if contactMech.contactMechTypeId?if_exists = "POSTAL_ADDRESS">
-          <#assign partyContactMech = partyContactMechValueMap.partyContactMech?if_exists>
+          <#assign partyContactMech = partyContactMechValueMap.partyContactMech?if_exists />
           <#if !(partyContactMechValueMap.partyContactMechPurposes?has_content)>
-            <#assign postalAddressFlag = "Y">
-            <#assign postalAddress = partyContactMechValueMap.postalAddress?if_exists>
+            <#assign postalAddressFlag = "Y" />
+            <#assign postalAddress = partyContactMechValueMap.postalAddress?if_exists />
             <div id="displayEditAddressForm_${contactMech.contactMechId}" class="popup" style="display: none;">
               <#include "EditPostalAddress.ftl"/>
             </div>
             <#if postalAddress?exists>
-              <div class="form-row">
-                <div class="form-label"></div>
+              <div>
                 <div class="form-field">
                   <div>
-                    ${postalAddress.address1}<br/>
-                    <#if postalAddress.address2?has_content>${postalAddress.address2}<br/></#if>
-                    ${postalAddress.city}
-                    <#if postalAddress.stateProvinceGeoId?has_content && postalAddress.stateProvinceGeoId != "_NA_">
-                      ${postalAddress.stateProvinceGeoId}
-                    </#if>
-                    &nbsp;${postalAddress.postalCode?if_exists}
-                    <#if postalAddress.countryGeoId?has_content><br/>${postalAddress.countryGeoId}</#if>
+                    <ul>
+                      <li>${postalAddress.address1}</li>
+                      <#if postalAddress.address2?has_content><li>${postalAddress.address2}</li></#if>
+                      <li>${postalAddress.city}</li>
+                      <li>
+                      <#if postalAddress.stateProvinceGeoId?has_content && postalAddress.stateProvinceGeoId != "_NA_">
+                        ${postalAddress.stateProvinceGeoId}
+                      </#if>
+                        ${postalAddress.postalCode?if_exists}
+                      </li>
+                    <#if postalAddress.countryGeoId?has_content><li>${postalAddress.countryGeoId}</li></#if>
+                    </ul>
                     <#if (!postalAddress.countryGeoId?has_content || postalAddress.countryGeoId?if_exists = "USA")>
-                      <#assign addr1 = postalAddress.address1?if_exists>
-                      <#if (addr1.indexOf(" ") gt 0)>
-                        <#assign addressNum = addr1.substring(0, addr1.indexOf(" "))>
-                        <#assign addressOther = addr1.substring(addr1.indexOf(" ")+1)>
+                      <#assign addr1 = postalAddress.address1?if_exists />
+                      <#if (addr1.indexOf(" ") > 0)>
+                        <#assign addressNum = addr1.substring(0, addr1.indexOf(" ")) />
+                        <#assign addressOther = addr1.substring(addr1.indexOf(" ")+1) />
                         <a target="_blank" href="#" class="linktext">(${uiLabelMap.CommonLookupWhitepages})</a>
                       </#if>
                     </#if>
                   </div>
                 </div>
               </div>
-              <div class="form-row">
+              <div>
                 <span>
-                  <a id="update_${contactMech.contactMechId}" href="javascript:void(0)" class="buttontext popup_link" onclick="showState('${contactMech.contactMechId}')">${uiLabelMap.CommonEdit}</a>&nbsp;
-                  <form name= "deletePostalAddress_${contactMech.contactMechId}" method= "post" action= "<@o...@ofbizUrl>">
-                    <input type= "hidden" name= "contactMechId" value= "${contactMech.contactMechId}"/>
-                    <a href='javascript:document.deletePostalAddress_${contactMech.contactMechId}.submit()' class='buttontext'>&nbsp;${uiLabelMap.CommonDelete}&nbsp;</a>
+                  <a id="update_${contactMech.contactMechId}" href="javascript:void(0)" class="button popup_link" onclick="showState('${contactMech.contactMechId}')">${uiLabelMap.CommonEdit}</a></span>
+                  <form id="deletePostalAddress_${contactMech.contactMechId}" method= "post" action= "<@o...@ofbizUrl>">
+                    <fieldset>
+                      <input type= "hidden" name= "contactMechId" value= "${contactMech.contactMechId}" />
+                      <a href="javascript:$('deletePostalAddress_${contactMech.contactMechId}').submit()" class='button'>${uiLabelMap.CommonDelete}</a>
+                    </fieldset>
                   </form> 
-                </span>
               </div>
               <script type="text/javascript">
+                //<![CDATA[
                 new Popup('displayEditAddressForm_${contactMech.contactMechId}','update_${contactMech.contactMechId}', {modal: true, position: 'center', trigger: 'click'})
+                //]]>
               </script>
             <#else>
-              <div class="form-row">
-                <div class="form-label">
-                  <h5>${uiLabelMap.PartyPostalInformationNotFound}.</h5>
-                </div>
+              <div>
+                 <label>${uiLabelMap.PartyPostalInformationNotFound}.</label>
               </div>
             </#if>
-            <div class="form-row"><hr class="sepbar"/></div>
           </#if>
         </#if>
       </#list>
       <#if postalAddressFlag == "N">
-        <div class="form-row">
-          <div class="form-label">
-            <h5>${uiLabelMap.PartyPostalInformationNotFound}.</h5>
-          </div>
+        <div>
+            <label>${uiLabelMap.PartyPostalInformationNotFound}.</label>
         </div>
       </#if>
     </div>
   </div>
-  <div class="form-row"></div>
 </div>
\ No newline at end of file