svn commit: r811652 - in /ofbiz/trunk/specialpurpose/ebay: config/EbayUiLabels.xml servicedef/services.xml src/org/ofbiz/ebay/ProductsExportToEbay.java webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy webapp/ebay/find/productsExportToEbay.ftl

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

svn commit: r811652 - in /ofbiz/trunk/specialpurpose/ebay: config/EbayUiLabels.xml servicedef/services.xml src/org/ofbiz/ebay/ProductsExportToEbay.java webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy webapp/ebay/find/productsExportToEbay.ftl

ashish-18
Author: ashish
Date: Sat Sep  5 14:19:23 2009
New Revision: 811652

URL: http://svn.apache.org/viewvc?rev=811652&view=rev
Log:
Now added customXml on the User Interface so that user can change the values passed from there.

Modified:
    ofbiz/trunk/specialpurpose/ebay/config/EbayUiLabels.xml
    ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml
    ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
    ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl

Modified: ofbiz/trunk/specialpurpose/ebay/config/EbayUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/config/EbayUiLabels.xml?rev=811652&r1=811651&r2=811652&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/config/EbayUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/ebay/config/EbayUiLabels.xml Sat Sep  5 14:19:23 2009
@@ -97,6 +97,9 @@
         <value xml:lang="th">ส่งการชำระเงินโดยผู้ซื้อ</value>
         <value xml:lang="zh">买家发送的支付</value>
     </property>
+    <property key="FormFieldTitle_customXml">
+        <value xml:lang="en">Custom XML</value>
+    </property>
     <property key="FormFieldTitle_eBayPaymentStatus">
         <value xml:lang="en">eBay Payment Status</value>
         <value xml:lang="fr">Statut de paiement Ebay</value>

Modified: ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml?rev=811652&r1=811651&r2=811652&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/ebay/servicedef/services.xml Sat Sep  5 14:19:23 2009
@@ -50,6 +50,7 @@
         <attribute type="String" mode="IN" name="startPrice" optional="true"/>
         <attribute type="String" mode="IN" name="quantity" optional="true"/>
         <attribute type="String" mode="IN" name="productStoreId" optional="true"/>
+        <attribute type="String" mode="IN" name="customXml" optional="true" allow-html="any"/>
     </service>
     <service name="getEbayCategories" engine="java"
              location="org.ofbiz.ebay.ProductsExportToEbay" invoke="getEbayCategories" auth="true">

Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=811652&r1=811651&r2=811652&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Sat Sep  5 14:19:23 2009
@@ -424,15 +424,10 @@
     }
 
     private static void setMiscDetails(Document itemDocument, Element itemElem, Map context, GenericDelegator delegator) throws Exception {
-        String productStoreId = (String) context.get("productStoreId");
+        String customXmlFromUI = (String) context.get("customXml");
         String customXml = "";
-        if (UtilValidate.isNotEmpty(productStoreId)) {
-            GenericValue eBayConfig = delegator.findOne("EbayConfig", false, UtilMisc.toMap("productStoreId", productStoreId));
-            if (UtilValidate.isNotEmpty(eBayConfig.getString("customXml"))) {
-                customXml = eBayConfig.getString("customXml");
-            } else {
-                customXml = UtilProperties.getPropertyValue(configFileName, "eBayExport.customXml");
-            }
+        if (UtilValidate.isNotEmpty(customXmlFromUI)) {
+            customXml = customXmlFromUI;
         } else {
             customXml = UtilProperties.getPropertyValue(configFileName, "eBayExport.customXml");  
         }

Modified: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy?rev=811652&r1=811651&r2=811652&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy (original)
+++ ofbiz/trunk/specialpurpose/ebay/webapp/ebay/WEB-INF/actions/find/ProductsExportToEbay.groovy Sat Sep  5 14:19:23 2009
@@ -40,6 +40,9 @@
 
 webSite = WebSiteWorker.getWebSite(request);
 if (webSite) {
-    context.productStoreId = webSite.productStoreId;;
+    productStoreId = webSite.productStoreId;
+    context.productStoreId = productStoreId;
+    eBayConfig = delegator.findOne("EbayConfig", [productStoreId : productStoreId], false);
+    context.customXml = eBayConfig.customXml;
     context.webSiteUrl = webSite.getString("standardContentPrefix")?:"http://demo.ofbiz.org";
 }

Modified: ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl?rev=811652&r1=811651&r2=811652&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl (original)
+++ ofbiz/trunk/specialpurpose/ebay/webapp/ebay/find/productsExportToEbay.ftl Sat Sep  5 14:19:23 2009
@@ -154,6 +154,13 @@
                 </td>
             </tr>
             <tr>
+                <td align="right" class="label">${uiLabelMap.FormFieldTitle_customXml}</td>
+                <td>&nbsp;</td>
+                <td>
+                    <textarea cols="60" rows="6" wrap="hard" name="customXml">${customXml?if_exists}</textarea>
+                </td>
+            </tr>
+            <tr>
                 <td colspan=2>&nbsp;</td>
                 <td>
                     <input type="submit" value="${uiLabelMap.EbayExportToEbay}" name="submitButton" class="smallSubmit">