You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/10/09 00:41:30 UTC

svn commit: r1006056 [2/4] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/webapp/accounting/WEB-INF/actions/reports/ applications/accounting/webapp/accounting/i...

Modified: ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl (original)
+++ ofbiz/branches/jquery/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl Fri Oct  8 22:41:27 2010
@@ -377,28 +377,43 @@ function doPublish() {
             <input type="hidden" name="fromDate" value="${nowTimestampString}"/>
             <input type="hidden" name="productId" value="${product.productId?if_exists}"/>
             <table cellspacing="0" class="basic-table">
-            <tr>
-            <td>
-                <table cellspacing="0" class="basic-table">
-                    <tr>
-                        <td>
-                            <select multiple="multiple" name="categoryId">
-                                <#list allCategories as category>
-                                    <option value="${category.productCategoryId?if_exists}">${category.description?if_exists} ${category.productCategoryId}</option>
-                                </#list>
-                            </select>&nbsp;
-                        </td>
-                    </tr>
-                </table>
-            </td>
+              <tr>
+              <td>
+                  <table cellspacing="0" class="basic-table">
+                      <tr>
+                          <td>
+                              <select multiple="multiple" name="categoryId">
+                                  <#list allCategories as category>
+                                      <option value="${category.productCategoryId?if_exists}">${category.description?if_exists} ${category.productCategoryId}</option>
+                                  </#list>
+                              </select>&nbsp;
+                          </td>
+                      </tr>
+                  </table>
+              </td>
+              </tr>
+              <tr>
+                  <td colspan="2"><input type="submit" value="${uiLabelMap.ProductUpdateCategories}"/></td>
+              </tr>
+            </table>
+        </form>
+        <table>
+          <tr>
             <td valign="top">
                 <table cellspacing="0" class="basic-table">
                     <#assign rowClass = "2">
                     <#list productCategoryMembers as prodCatMemb>
                         <#assign prodCat = prodCatMemb.getRelatedOne("ProductCategory")/>
                         <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
-                            <td colspan="2"><a href='<@o...@ofbizUrl>' class="buttontext">x</a>
-                            ${prodCat.description?if_exists} ${prodCat.productCategoryId}</td>
+                            <td colspan="2">
+                              <form name="quickAdminRemoveProductFromCategory_${prodCatMemb_index}" action="<@o...@ofbizUrl>" method="post">
+                                <input type="hidden" name="productId" value="${prodCatMemb.productId?if_exists}" />
+                                <input type="hidden" name="productCategoryId" value="${prodCatMemb.productCategoryId}" />
+                                <input type="hidden" name="fromDate" value="${prodCatMemb.getString("fromDate")}" />
+                                <a href="javascript:document.quickAdminRemoveProductFromCategory_${prodCatMemb_index}.submit();" class="buttontext">x</a>
+                                ${prodCat.description?if_exists} ${prodCat.productCategoryId}
+                              </form>
+                            </td>
                         </tr>
                         <#-- toggle the row color -->
                         <#if rowClass == "2">
@@ -409,12 +424,8 @@ function doPublish() {
                     </#list>
                 </table>
             </td>
-            </tr>
-            <tr>
-                <td colspan="2" align="right"><input type="submit" value="${uiLabelMap.ProductUpdateCategories}"/></td>
-            </tr>
-            </table>
-        </form>
+          </tr>
+        </table>
         <!--  **************************************************** end - Categories section -->
     </div>
 </div>

Modified: ofbiz/branches/jquery/applications/product/widget/catalog/CatalogMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/widget/catalog/CatalogMenus.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/widget/catalog/CatalogMenus.xml (original)
+++ ofbiz/branches/jquery/applications/product/widget/catalog/CatalogMenus.xml Fri Oct  8 22:41:27 2010
@@ -225,6 +225,12 @@ under the License.
         </menu-item>
     </menu>
 
+    <menu name="PriceRulesTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="FindRules" title="${uiLabelMap.CommonAdd}/${uiLabelMap.ProductFindRule}">
+            <link target="FindProductPriceRules"/>
+        </menu-item>
+    </menu>
+    
     <menu name="PromoTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
         <menu-item name="EditProductPromo" title="${uiLabelMap.ProductPromotion}">
             <link target="EditProductPromo">
@@ -465,5 +471,5 @@ under the License.
         <menu-item name="FindWebAnalyticsTypes" title="${uiLabelMap.CommonFind}"><link target="FindWebAnalyticsTypes"/></menu-item>
         <menu-item name="EditWebAnalyticsType" title="${uiLabelMap.CommonNew}"><link target="EditWebAnalyticsType"/></menu-item>
     </menu>
-    
+
 </menus>

Modified: ofbiz/branches/jquery/applications/product/widget/catalog/PriceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/widget/catalog/PriceForms.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/widget/catalog/PriceForms.xml (original)
+++ ofbiz/branches/jquery/applications/product/widget/catalog/PriceForms.xml Fri Oct  8 22:41:27 2010
@@ -51,4 +51,107 @@
         <field name="ruleName" title="${uiLabelMap.ProductName}"><text size="30"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>
+    
+    <!-- Below, I tried also single forms but lists are better as long as we have not introduced a better way to handle positions -->   
+    <form name="EditProductPriceRule" type="list" target="updateProductPriceRule" title="" list-name="productPriceRules" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
+        <field name="productPriceRuleId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="ruleName" title="${uiLabelMap.CommonName}"><text size="25"/></field>
+        <field name="description" title="${uiLabelMap.CommonDescription}"><text size="60"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time type="timestamp"/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time type="timestamp"/></field>        
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>        
+        <field use-when="org.ofbiz.base.util.UtilValidate.isEmpty(productPriceConds) &amp;&amp; org.ofbiz.base.util.UtilValidate.isEmpty(productPriceActions)"
+            name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="deleteProductPriceRule" description="${uiLabelMap.CommonRemove}">
+                <parameter param-name="productPriceRuleId"/>
+            </hyperlink>
+        </field>        
+    </form>            
+    <form name="EditProductPriceRulesCond" type="list" target="updateProductPriceCond" title="" list-name="productPriceConds" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
+        <field name="productPriceRuleId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="productPriceCondSeqId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="inputParamEnumId" title="${uiLabelMap.ProductInput}">
+            <drop-down allow-empty="false" current="selected">
+                <list-options list-name="inputParamEnums" key-name="enumId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field name="operatorEnumId" title="${uiLabelMap.ProductOperator}">
+            <drop-down allow-empty="false" current="selected">
+                <list-options list-name="condOperEnums" key-name="enumId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field use-when="&quot;PRIP_QUANTITY&quot;.equals(inputParamEnumId) || &quot;PRIP_LIST_PRICE&quot;.equals(inputParamEnumId)" 
+            name="condValueInput" title="${uiLabelMap.ProductValue}">
+            <text size="10" default-value="${condValue}"/>
+        </field>                
+        <field 
+            use-when="!&quot;PRIP_QUANTITY&quot;.equals(inputParamEnumId) &amp;&amp; !&quot;PRIP_LIST_PRICE&quot;.equals(inputParamEnumId)" 
+            name="condValue" title="${uiLabelMap.CommonEmptyHeader}">
+            <drop-down allow-empty="false" current="selected">
+                <list-options list-name="productPriceRulesCondValues" key-name="condValue"/>
+            </drop-down>
+        </field>                
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>        
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" widget-area-style="align-text">
+            <hyperlink target="deleteProductPriceCond" description="${uiLabelMap.CommonRemove}">
+                <parameter param-name="productPriceRuleId" from-field="productPriceCond.productPriceRuleId"/>
+                <parameter param-name="productPriceCondSeqId" from-field="productPriceCond.productPriceCondSeqId"/>
+            </hyperlink>
+        </field>        
+    </form>
+    <form name="AddProductPriceRulesCond" type="list" target="createProductPriceCond" title="" list-name="productPriceCondAdd" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
+        <field name="productPriceRuleId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="new"><display default-value="${uiLabelMap.ProductPriceRulesNewCond}"/></field>
+        <field name="inputParamEnumId" title="${uiLabelMap.ProductInput}">
+            <drop-down allow-empty="false">
+                <list-options list-name="inputParamEnums" key-name="enumId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field name="operatorEnumId" title="${uiLabelMap.ProductOperator}">
+            <drop-down allow-empty="false">
+                <list-options list-name="condOperEnums" key-name="enumId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field name="condValueInput" title="${uiLabelMap.ProductValue}"><text size="10"/></field>
+        <field name="condValue" title="${uiLabelMap.CommonEmptyHeader}">
+            <drop-down allow-empty="false">
+                <list-options list-name="productPriceRulesCondValues" key-name="condValue"/>                
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit/></field>        
+    </form>
+    <form name="EditProductPriceRulesAction" type="list" target="updateProductPriceAction" title="" list-name="productPriceActions" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
+        <field name="productPriceRuleId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="productPriceActionSeqId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="productPriceActionTypeId" title="${uiLabelMap.ProductActionType}">
+            <drop-down allow-empty="false" current="selected">
+                <list-options list-name="productPriceActionTypes" key-name="productPriceActionTypeId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field name="amount" title="${uiLabelMap.ProductValue}"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field>        
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" widget-area-style="align-text">
+            <hyperlink target="deleteProductPriceAction" description="${uiLabelMap.CommonRemove}">
+                <parameter param-name="productPriceRuleId" from-field="productPriceAction.productPriceRuleId"/>
+                <parameter param-name="productPriceActionSeqId" from-field="productPriceAction.productPriceActionSeqId"/>
+            </hyperlink>
+        </field>        
+    </form>        
+    <form name="AddProductPriceRulesAction" type="list" target="createProductPriceAction" title="" list-name="productPriceActionAdd" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">            
+        <field name="productPriceRuleId"><hidden/></field><!-- Users don't need this information there, the screen is already sufficiently complex! -->
+        <field name="new"><display default-value="${uiLabelMap.ProductPriceRulesNewAction}"/></field>
+        <field name="productPriceActionTypeId" title="${uiLabelMap.ProductActionType}">
+            <drop-down allow-empty="false">
+                <list-options list-name="productPriceActionTypes" key-name="productPriceActionTypeId" description="${description}"/>                
+            </drop-down>
+        </field>        
+        <field name="amount" title="${uiLabelMap.ProductValue}"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit/></field>
+    </form>        
+    
 </forms>

Modified: ofbiz/branches/jquery/applications/product/widget/catalog/PriceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/widget/catalog/PriceScreens.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/widget/catalog/PriceScreens.xml (original)
+++ ofbiz/branches/jquery/applications/product/widget/catalog/PriceScreens.xml Fri Oct  8 22:41:27 2010
@@ -67,13 +67,14 @@ under the License.
             </widgets>
         </section>
     </screen>
-    <screen name="EditProductPriceRules">
+    <!-- Old screen kept for now, in case some would prefer the old way. Another option is to use an input field with Id instead of a drop-down in the new screen below (see also setPriceRulesCondEventJs.ftl and top of getAssociatedPriceRulesConds service) -->
+    <!--screen name="EditProductPriceRules">
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleEditProductPriceRules"/>
                 <set field="headerItem" value="pricerules"/>
 
-                <script location="component://product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy"/>
+                <script location="component://product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules_old.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPriceDecorator">
@@ -85,5 +86,41 @@ under the License.
                 </decorator-screen>
             </widgets>
         </section>
+    </screen-->
+    <screen name="EditProductPriceRules">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditProductPriceRules"/>
+                <set field="headerItem" value="pricerules"/>
+
+                <script location="component://product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonPriceDecorator">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://common/webcommon/includes/setPriceRulesCondEventJs.ftl"/></html></platform-specific>
+                        <include-menu name="PriceRulesTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
+                        <screenlet title="${uiLabelMap.ProductPriceRuleId} [${parameters.productPriceRuleId}]">
+                            <label style="h6" text="${uiLabelMap.ProductConditionsActionsRemoveBefore}"/>
+                            <horizontal-separator/>
+                            <include-form name="EditProductPriceRule" location="component://product/widget/catalog/PriceForms.xml"/>
+                            <horizontal-separator/>
+                            <label style="h6" text="${uiLabelMap.ProductConditionsThenActions}"/>
+                            <horizontal-separator/>
+                            <screenlet title="${uiLabelMap.ProductConditions}">
+                                <include-form name="EditProductPriceRulesCond" location="component://product/widget/catalog/PriceForms.xml"/>
+                                <horizontal-separator/>
+                                <include-form name="AddProductPriceRulesCond" location="component://product/widget/catalog/PriceForms.xml"/>
+                            </screenlet>
+                            <screenlet title="${uiLabelMap.ProductActions}">
+                                <include-form name="EditProductPriceRulesAction" location="component://product/widget/catalog/PriceForms.xml"/>
+                                <horizontal-separator/>
+                                <include-form name="AddProductPriceRulesAction" location="component://product/widget/catalog/PriceForms.xml"/>
+                            </screenlet>
+                        </screenlet>
+                    </decorator-section>                    
+                </decorator-screen>
+            </widgets>
+        </section>
     </screen>
 </screens>

Modified: ofbiz/branches/jquery/applications/product/widget/catalog/ProductStoreForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/widget/catalog/ProductStoreForms.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/product/widget/catalog/ProductStoreForms.xml (original)
+++ ofbiz/branches/jquery/applications/product/widget/catalog/ProductStoreForms.xml Fri Oct  8 22:41:27 2010
@@ -659,20 +659,10 @@
             <drop-down allow-empty="false" no-current-selected-key="Y"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
         </field>
         <field name="includeGeoId" title="${uiLabelMap.ProductIncludeGeo}" tooltip="${uiLabelMap.ProductIncludeGeoMessage}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
-                    <entity-order-by field-name="geoTypeId"/>
-                    <entity-order-by field-name="geoName"/>
-                </entity-options>
-            </drop-down>
+            <lookup target-form-name="LookupGeo"/>
         </field>
         <field name="excludeGeoId" title="${uiLabelMap.ProductExcludeGeo}" tooltip="${uiLabelMap.ProductExcludeGeoMessage}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
-                    <entity-order-by field-name="geoTypeId"/>
-                    <entity-order-by field-name="geoName"/>
-                </entity-options>
-            </drop-down>
+            <lookup target-form-name="LookupGeo"/>
         </field>
         <field name="includeFeatureGroup" title="${uiLabelMap.ProductIncludeFeature}" tooltip="${uiLabelMap.ProductIncludeFeatureMessage}"><text/></field>
         <field name="excludeFeatureGroup" title="${uiLabelMap.ProductExcludeFeature}" tooltip="${uiLabelMap.ProductExcludeFeatureMessage}"><text/></field>
@@ -756,20 +746,10 @@
             </drop-down>
         </field>
         <field name="fromGeo" title="${uiLabelMap.ProductFromGeo}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
-                    <entity-order-by field-name="geoTypeId"/>
-                    <entity-order-by field-name="geoName"/>
-                </entity-options>
-            </drop-down>
+            <lookup target-form-name="LookupGeo"/>
         </field>
         <field name="toGeo" title="${uiLabelMap.ProductToGeo}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
-                    <entity-order-by field-name="geoTypeId"/>
-                    <entity-order-by field-name="geoName"/>
-                </entity-options>
-            </drop-down>
+            <lookup target-form-name="LookupGeo"/>
         </field>
         <field name="partyId"><text/></field>
         <field name="roleTypeId"><text/></field>

Modified: ofbiz/branches/jquery/applications/workeffort/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/workeffort/entitydef/entitymodel_view.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/workeffort/entitydef/entitymodel_view.xml (original)
+++ ofbiz/branches/jquery/applications/workeffort/entitydef/entitymodel_view.xml Fri Oct  8 22:41:27 2010
@@ -941,5 +941,19 @@ under the License.
           <key-map field-name="contactMechId"/>
       </view-link>
     </view-entity>
+    
+    <view-entity entity-name="WorkEffortAndTimeEntry" package-name="org.ofbiz.workeffort.workeffort"
+        title="WorkEffort and TimeEntry View Entity">
+        <member-entity entity-alias="WE" entity-name="WorkEffort"/>
+        <member-entity entity-alias="TE" entity-name="TimeEntry"/>
+        <alias-all entity-alias="WE"/>
+        <alias-all entity-alias="TE"/>
+        <view-link entity-alias="WE" rel-entity-alias="TE">
+            <key-map field-name="workEffortId"/>
+        </view-link>
+        <relation type="many" rel-entity-name="WorkEffortSkillStandard">
+            <key-map field-name="workEffortId"/>
+        </relation>
+    </view-entity>
 
 </entitymodel>

Modified: ofbiz/branches/jquery/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original)
+++ ofbiz/branches/jquery/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Fri Oct  8 22:41:27 2010
@@ -220,7 +220,8 @@ under the License.
                                             <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
                                             <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
                                             <if-not-empty field="custRequest">
-                                                <set field="invoiceItemMap.description" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}]"/>
+                                                <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
+                                                <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
                                             </if-not-empty>
                                         </if-not-empty>
                                         <set field="invoiceItemMap.quantity" from-field="timeEntry.hours" default-value="0.0" type="BigDecimal"/>

Modified: ofbiz/branches/jquery/applications/workeffort/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/workeffort/servicedef/services.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/workeffort/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/applications/workeffort/servicedef/services.xml Fri Oct  8 22:41:27 2010
@@ -49,6 +49,8 @@ under the License.
         <override name="workEffortTypeId" optional="false"/>
         <override name="workEffortName" optional="false"/>
         <override name="currentStatusId" optional="false"/>
+        <override name="workEffortName" allow-html="safe" />
+        <override name="description" allow-html="safe" />
     </service>
     <service name="createWorkEffortAndPartyAssign" default-entity-name="WorkEffort" engine="simple"
         location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortAndPartyAssign">

Modified: ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml (original)
+++ ofbiz/branches/jquery/applications/workeffort/widget/CalendarScreens.xml Fri Oct  8 22:41:27 2010
@@ -24,7 +24,7 @@ under the License.
     <screen name="Calendar">
         <section>
             <actions>
-                <property-map resource="WorkeffortUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
                 <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
                 <set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
                 <script location="component://workeffort/webapp/workeffort/WEB-INF/actions/calendar/CreateUrlParam.groovy"/>

Modified: ofbiz/branches/jquery/debian/changelog
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/debian/changelog?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/debian/changelog (original)
+++ ofbiz/branches/jquery/debian/changelog Fri Oct  8 22:41:27 2010
@@ -7,14 +7,30 @@ ofbiz (UNRELEASED) unstable; urgency=low
   * Don't have per-package var folders.
   * Fix bashism in /etc/init.d/ofbiz.
   * Create runtime/uploads correctly.
-  * Bump Standards-Version to 3.8.3.
+  * Fix init script stop, to wait for jsvc to actually finish running.  This
+    fixes a race condition that can occur under load, where ofbiz is not
+    listening on the status port, but jsvc is actually still running.  This
+    would cause the pid file to exist, but then get removed by jsvc before the
+    init script could remove it itself.
   * Remove use of openjdk, it has issues compiling some things(generics
     markup), and doesn't handle all https urls.
   * Don't install build/lib/*-test.jar into the packages.
   * Set the source format to 3.0 (quilt), to make it easier to have local
     changes that might have binary files.
+  * Set the umask correctly(defaults to 002, can be overridden in defaults).
+  * Fix description of ofbiz package, so that it says 'meta-package', instead
+    of 'pseudo-package'.  The former is used by lintian to skip the no-files
+    warning.
+  * Skip rc.ofbiz.for.debian file and .pc dirs, so they don't get installed
+    anymore.
+  * Protect sourcing of /etc/default/rcS, it is a conffile that might be
+    removed.
+  * Remove Apache-2.0 license text from copyright, instead referring to the
+    shared one in /usr/share/common-licenses.
+  * Skip framework/appserver/templates as well during install.
+  * Bump Standards-Version to 3.9.1
 
- -- Adam Heath <do...@brainfood.com>  Fri, 04 Sep 2009 16:41:32 -0500
+ -- Adam Heath <do...@brainfood.com>  UNRELEASED
 
 ofbiz (684378) unstable; urgency=low
 

Modified: ofbiz/branches/jquery/debian/control
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/debian/control?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/debian/control (original)
+++ ofbiz/branches/jquery/debian/control Fri Oct  8 22:41:27 2010
@@ -20,7 +20,7 @@ Priority: extra
 Maintainer: Adam Heath <do...@brainfood.com>
 Origin: brainfood
 Bugs: mozilla://bugs.brainfood.com
-Standards-Version: 3.8.3
+Standards-Version: 3.9.1
 Build-Depends: sun-java6-jdk, debhelper (>= 5), po-debconf
 
 Package: ofbiz-framework
@@ -52,7 +52,7 @@ Description: An Open Source E-Commerce S
  automation software providing: ERP, CRM, E-Business / E-Commerce,
  SCM, MRP, CMMS/EAM, and more.
  .
- This is a pseudo-package, used to install all of the standard Apache
+ This is a meta-package, used to install all of the standard Apache
  OFBiz components.
 
 Package: ofbiz-specialpurpose

Modified: ofbiz/branches/jquery/debian/move-files.pl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/debian/move-files.pl?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/debian/move-files.pl (original)
+++ ofbiz/branches/jquery/debian/move-files.pl Fri Oct  8 22:41:27 2010
@@ -56,6 +56,7 @@ ij.ofbiz
 KEYS
 APACHE2_HEADER
 rc.ofbiz
+rc.ofbiz.for.debian
 );
 #startofbiz.sh
 
@@ -103,7 +104,8 @@ while (<FIND>) {
 	next if (m,^$appDirsRe/[^/]+/(build/classes|src|testdef)/.*,);
 	next if (m,^$appDirsRe/[^/]+/build/lib/[^/]+-test\.jar$,);
 	next if (m,^runtime/(catalina/work|data/derby|logs)/.*,);
-	next if (m,^\.hg(|/.*),);
+	next if (m,^framework/appserver/templates(|/.*)$,);
+	next if (m,^\.(hg|pc)(|/.*),);
 	#print("2\n");
 	my $type = undef;
 	if ($_ eq 'framework/entity/config/entityengine.xml') {

Modified: ofbiz/branches/jquery/debian/ofbiz-framework.ofbiz.init
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/debian/ofbiz-framework.ofbiz.init?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/debian/ofbiz-framework.ofbiz.init (original)
+++ ofbiz/branches/jquery/debian/ofbiz-framework.ofbiz.init Fri Oct  8 22:41:27 2010
@@ -42,7 +42,9 @@ MEMIF=""
 UMASK=002
 
 . /lib/lsb/init-functions
-. /etc/default/rcS
+if [ -e /etc/default/rcS ]; then
+	. /etc/default/rcS
+fi
 
 if [ -e /etc/default/locale ]; then
 	. /etc/default/locale

Modified: ofbiz/branches/jquery/debian/rules
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/debian/rules?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/debian/rules (original)
+++ ofbiz/branches/jquery/debian/rules Fri Oct  8 22:41:27 2010
@@ -91,7 +91,8 @@ debian/EncryptPassword.class: debian/sta
 	$(JAVAC) -classpath framework/base/build/lib/ofbiz-base.jar:framework/common/build/lib/ofbiz-common.jar -d $(@D) $*.java
 
 debian/copyright: debian/copyright.in LICENSE
-	cat $^ > $@.new
+	cat debian/copyright.in > $@.new
+	sh debian/strip-common-licenses.sh >> $@.new
 	mv $@.new $@
 
 binary-indep: DH_OPTIONS=-i

Modified: ofbiz/branches/jquery/framework/base/config/ofbiz-containers.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/base/config/ofbiz-containers.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/base/config/ofbiz-containers.xml (original)
+++ ofbiz/branches/jquery/framework/base/config/ofbiz-containers.xml Fri Oct  8 22:41:27 2010
@@ -58,9 +58,7 @@ under the License.
 
     <!-- JavaMail Listener Container - Triggers MCA Rules -->
     <!-- if delete-mail is set to true, will delete messages after fetching them. otherwise, will try to mark them as seen
-        mail.store.protocol supports both imap and pop3, but pop3 will not be able to mark messages as seen, so you would need to delete them
-        Sounds like mail.store.protocol value should be "imaps" for GMail inbound emails to work.
-        Not tested found here https://sourceforge.net/forum/message.php?msg_id=5879468 -->
+        mail.store.protocol supports both imap and pop3, but pop3 will not be able to mark messages as seen, so you would need to delete them-->
     <!-- To use the mail listerner just uncomment and go...
     <container name="javamail-container" class="org.ofbiz.service.mail.JavaMailContainer">
         <property name="delegator-name" value="default"/>

Modified: ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/UtilNumber.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/UtilNumber.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/UtilNumber.java (original)
+++ ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/UtilNumber.java Fri Oct  8 22:41:27 2010
@@ -152,11 +152,51 @@ public class UtilNumber {
         + "%%hundredths:\n"
         + "    100: <00<;\n";
 
+    // ICU4J rule sets for the th_TH locale. To add more rules, expand this string.
+    // For reference, see the RbnfSampleRuleSets.java file distributed with ICU4J
+    public static final String ruleSet_th_TH =
+        /*
+         * These rules format a number in one of the two styles often used
+         * on checks.  %bahts-and-hundredths formats stangs as hundredths of
+         * a baht (23.40 comes out as "twenty-three and 40/100 bahts").
+         * %bahts-and-stangs formats in bahts and stangs (23.40 comes out as
+         * "twenty-three bahts and forty stangs")
+         */
+        "%bahts-and-stangs:\n"
+        + "    x.0: << [and >%%stangs>];\n"
+        + "    0.x: >%%stangs>;\n"
+        + "    0: zero bahts; one baht; =%%main= bahts;\n"
+        + "%%main:\n"
+        + "    zero; one; two; three; four; five; six; seven; eight; nine;\n"
+        + "    ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen;\n"
+        + "        seventeen; eighteen; nineteen;\n"
+        + "    20: twenty[->>];\n"
+        + "    30: thirty[->>];\n"
+        + "    40: forty[->>];\n"
+        + "    50: fifty[->>];\n"
+        + "    60: sixty[->>];\n"
+        + "    70: seventy[->>];\n"
+        + "    80: eighty[->>];\n"
+        + "    90: ninety[->>];\n"
+        + "    100: << hundred[ >>];\n"
+        + "    1000: << thousand[ >>];\n"
+        + "    1,000,000: << million[ >>];\n"
+        + "    1,000,000,000: << billion[ >>];\n"
+        + "    1,000,000,000,000: << trillion[ >>];\n"
+        + "    1,000,000,000,000,000: =#,##0=;\n"
+        + "%%stangs:\n"
+        + "    100: <%%main< stang[s];\n"
+        + "%bahts-and-hundredths:\n"
+        + "    x.0: <%%main< and >%%hundredths>/100;\n" // this used to end in 'bahts' but that should be added later
+        + "%%hundredths:\n"
+        + "    100: <00<;\n";
+
     // hash map to store ICU4J rule sets keyed to Locale
     public static HashMap<Locale, String> rbnfRuleSets;
     static {
         rbnfRuleSets = new HashMap<Locale, String>();
         rbnfRuleSets.put(Locale.US, ruleSet_en_US);
+        rbnfRuleSets.put(new Locale("th"), ruleSet_th_TH);
     }
 
     /**

Modified: ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/branches/jquery/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Fri Oct  8 22:41:27 2010
@@ -155,10 +155,23 @@ public class FreeMarkerWorker {
      * @param outWriter The Writer to render to
      */
     public static void renderTemplate(String templateLocation, String templateString, Map<String, Object> context, Appendable outWriter) throws TemplateException, IOException {
+        renderTemplate(templateLocation, templateString, context, outWriter, true);
+    }
+    
+    
+    /**
+     * Renders a template contained in a String.
+     * @param templateLocation A unique ID for this template - used for caching
+     * @param templateString The String containing the template
+     * @param context The context Map
+     * @param outWriter The Writer to render to
+     * @param useCache try to get template from cache
+     */
+    public static void renderTemplate(String templateLocation, String templateString, Map<String, Object> context, Appendable outWriter, boolean useCache) throws TemplateException, IOException {
         if (UtilValidate.isEmpty(templateString)) {
             renderTemplate(templateLocation, context, outWriter);
         } else {
-            renderTemplateFromString(templateString, templateLocation, context, outWriter);
+            renderTemplateFromString(templateString, templateLocation, context, outWriter, useCache);
         }
     }
 
@@ -167,18 +180,17 @@ public class FreeMarkerWorker {
      * @param templateLocation A unique ID for this template - used for caching
      * @param context The context Map
      * @param outWriter The Writer to render to
+     * @param useCache try to get template from cache
      */
     public static void renderTemplate(String templateLocation, Map<String, Object> context, Appendable outWriter) throws TemplateException, IOException {
         Template template = getTemplate(templateLocation);
         renderTemplate(template, context, outWriter);
     }
 
-    public static void clearTemplateFromCache(String templateLocation) {
-        synchronized (cachedTemplates) {
-            cachedTemplates.remove(templateLocation);
-        }
-    }
-
+    /**
+     * @deprecated, replaced by {@link #renderTemplateFromString(String templateString, String templateLocation, Map<String, Object> context, Appendable outWriter, boolean useCache)}
+     */    
+    @Deprecated
     public static Environment renderTemplateFromString(String templateString, String templateLocation, Map<String, Object> context, Appendable outWriter) throws TemplateException, IOException {
         Template template = cachedTemplates.get(templateLocation);
         if (template == null) {
@@ -195,6 +207,38 @@ public class FreeMarkerWorker {
         return renderTemplate(template, context, outWriter);
     }
 
+    public static Environment renderTemplateFromString(String templateString, String templateLocation, Map<String, Object> context, Appendable outWriter, boolean useCache) throws TemplateException, IOException {
+        Template template = null;
+        if (useCache){
+            template = cachedTemplates.get(templateLocation);
+        }
+        if (template == null) {
+            if (useCache){
+                synchronized (cachedTemplates) {
+                    template = cachedTemplates.get(templateLocation);
+                    if (template == null) {
+                        Reader templateReader = new StringReader(templateString);
+                        template = new Template(templateLocation, templateReader, defaultOfbizConfig);
+                        templateReader.close();
+                        cachedTemplates.put(templateLocation, template);
+                    }
+                }
+            } else {
+                Reader templateReader = new StringReader(templateString);
+                template = new Template(templateLocation, templateReader, defaultOfbizConfig);
+                templateReader.close();
+            }
+        }
+
+        return renderTemplate(template, context, outWriter);
+    }
+
+    public static void clearTemplateFromCache(String templateLocation) {
+        synchronized (cachedTemplates) {
+            cachedTemplates.remove(templateLocation);
+        }
+    }
+
     /**
      * Renders a Template instance.
      * @param template A Template instance
@@ -645,8 +689,6 @@ public class FreeMarkerWorker {
      *
      */
     static class OFBizTemplateExceptionHandler implements TemplateExceptionHandler {
-
-        @Override
         public void handleTemplateException(TemplateException te, Environment env, Writer out) throws TemplateException {
             StringWriter tempWriter = new StringWriter();
             PrintWriter pw = new PrintWriter(tempWriter, true);

Modified: ofbiz/branches/jquery/framework/common/data/GeoData_FR.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/data/GeoData_FR.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/data/GeoData_FR.xml (original)
+++ ofbiz/branches/jquery/framework/common/data/GeoData_FR.xml Fri Oct  8 22:41:27 2010
@@ -116,8 +116,16 @@ under the License.
     <Geo abbreviation="SSD" geoCode="93" geoId="FR-93" geoName="Seine-Saint-Denis" geoTypeId="COUNTY"/>
     <Geo abbreviation="VDM" geoCode="94" geoId="FR-94" geoName="Val-de-Marne" geoTypeId="COUNTY"/>
     <Geo abbreviation="VDO" geoCode="95" geoId="FR-95" geoName="Val-d'Oise" geoTypeId="COUNTY"/>
-    <Geo abbreviation="REU" geoCode="97" geoId="FR-97" geoName="Réunion" geoTypeId="COUNTY"/>
     <Geo abbreviation="MON" geoCode="98" geoId="FR-98" geoName="Monaco" geoTypeId="COUNTY"/>
+    <Geo abbreviation="GUA" geoCode="971" geoId="FR-971" geoName="Guadeloupe" geoTypeId="COUNTY"/>
+    <Geo abbreviation="GUY" geoCode="972" geoId="FR-972" geoName="Guyane" geoTypeId="COUNTY"/>
+    <Geo abbreviation="MAR" geoCode="973" geoId="FR-973" geoName="Martinique" geoTypeId="COUNTY"/>
+    <Geo abbreviation="REU" geoCode="974" geoId="FR-974" geoName="La Réunion" geoTypeId="COUNTY"/>
+    <Geo abbreviation="SPM" geoCode="975" geoId="FR-975" geoName="St Pierre et Miquelon" geoTypeId="COUNTY"/>
+    <Geo abbreviation="MAY" geoCode="976" geoId="FR-976" geoName="Mayotte" geoTypeId="COUNTY"/>
+    <Geo abbreviation="WeF" geoCode="986" geoId="FR-986" geoName="Wallis et Futuna" geoTypeId="COUNTY"/>
+    <Geo abbreviation="POF" geoCode="987" geoId="FR-987" geoName="Polynésie Française" geoTypeId="COUNTY"/>
+    <Geo abbreviation="NOC" geoCode="988" geoId="FR-988" geoName="Nouvelle Calédonie" geoTypeId="COUNTY"/>
 
     <Geo abbreviation="BEB" geoCode="BEB" geoId="FR-BEB01" geoName="Bourg-en-Bresse" geoTypeId="COUNTY_CITY"/>
     <Geo abbreviation="LAO" geoCode="LAO" geoId="FR-LAO02" geoName="Laon" geoTypeId="COUNTY_CITY"/>
@@ -238,6 +246,8 @@ under the License.
     <Geo abbreviation="ALS" geoCode="ALS" geoId="FR-ALS" geoName="Alsace" geoTypeId="REGION"/>
     <Geo abbreviation="NPC" geoCode="NPC" geoId="FR-NPC" geoName="Nord-Pas-de-Calais" geoTypeId="REGION"/>
     <Geo abbreviation="IDF" geoCode="IDF" geoId="FR-IDF" geoName="Ile-de-France" geoTypeId="REGION"/>
+    <Geo abbreviation="DOM" geoCode="DOM" geoId="FR-DOM" geoName="Departement d'outre Mer" geoTypeId="REGION"/>
+    <Geo abbreviation="TOM" geoCode="TOM" geoId="FR-TOM" geoName="Territoire d'outre Mer" geoTypeId="REGION"/>
 
     <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-01" geoId="FR-RAL"/>
     <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-02" geoId="FR-PIC"/>
@@ -335,6 +345,15 @@ under the License.
     <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-93" geoId="FR-IDF"/>
     <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-94" geoId="FR-IDF"/>
     <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-95" geoId="FR-IDF"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-971" geoId="FR-DOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-972" geoId="FR-DOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-973" geoId="FR-DOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-974" geoId="FR-DOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-988" geoId="FR-TOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-987" geoId="FR-TOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-986" geoId="FR-TOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-976" geoId="FR-TOM"/>
+    <GeoAssoc geoAssocTypeId="REGIONS" geoIdTo="FR-975" geoId="FR-TOM"/>
 
     <GeoAssoc geoAssocTypeId="COUNTY_SEAT" geoId="FR-BEB01" geoIdTo="FR-01"/>
     <GeoAssoc geoAssocTypeId="COUNTY_SEAT" geoId="FR-LAO02" geoIdTo="FR-02"/>

Modified: ofbiz/branches/jquery/framework/common/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/ofbiz-component.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/ofbiz-component.xml (original)
+++ ofbiz/branches/jquery/framework/common/ofbiz-component.xml Fri Oct  8 22:41:27 2010
@@ -47,6 +47,7 @@ under the License.
     <entity-resource type="data" reader-name="seed" loader="main" location="data/GeoData_NL.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/GeoData_UK.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/GeoData_US.xml"/>
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/GeoData_MX.xml"/>
 
     <entity-resource type="data" reader-name="seed" loader="main" location="data/LanguageData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/UnitData.xml"/>

Modified: ofbiz/branches/jquery/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/servicedef/services.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/framework/common/servicedef/services.xml Fri Oct  8 22:41:27 2010
@@ -61,6 +61,7 @@ under the License.
         <description>Update a note record</description>
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <override name="noteInfo" allow-html="safe"/>
     </service>
     
     <service name="adjustDebugLevels" engine="java"

Modified: ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy Fri Oct  8 22:41:27 2010
@@ -106,6 +106,8 @@ if (parameters.userLogin) {
 
     context.portalPages = portalPages;
     context.userLoginSecurityGroupId = userLoginSecurityGroupId;
-    parameters.portalPagesSize = portalPages.get(portalPages.size()-1).sequenceNum;
+    if (portalPages) {
+        parameters.portalPagesSize = portalPages.get(portalPages.size()-1).sequenceNum;
+    }
 }
 

Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/setCountryStatesEventJs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/setCountryStatesEventJs.ftl?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/includes/setCountryStatesEventJs.ftl (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/includes/setCountryStatesEventJs.ftl Fri Oct  8 22:41:27 2010
@@ -20,9 +20,9 @@ under the License.
 jQuery(document).load ( function() {
     if (jQuery('#${dependentForm}').length) {
         jQuery('#${dependentForm}_countryGeoId').change( function() {
-            getDependentDropdownValues('getAssociatedStateList', 'countryGeoId', '${dependentForm}_countryGeoId', '${dependentForm}_stateProvinceGeoId', 'stateList', 'geoId', 'geoName', '', '');
+            getDependentDropdownValues('getAssociatedStateList', 'countryGeoId', '${dependentForm}_countryGeoId', '${dependentForm}_stateProvinceGeoId', 'stateList', 'geoId', 'geoName', '', '', 'true', 'true');
         });
-        getDependentDropdownValues('getAssociatedStateList', 'countryGeoId', '${dependentForm}_countryGeoId', '${dependentForm}_stateProvinceGeoId', 'stateList', 'geoId', 'geoName', '${selectedStateProvinceGeoId}', '');
+        getDependentDropdownValues('getAssociatedStateList', 'countryGeoId', '${dependentForm}_countryGeoId', '${dependentForm}_stateProvinceGeoId', 'stateList', 'geoId', 'geoName', '${selectedStateProvinceGeoId}', '', 'true', 'true');
     }
 });
 </script>

Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl Fri Oct  8 22:41:27 2010
@@ -20,9 +20,9 @@ under the License.
 jQuery(document).ready(function() {
     if (jQuery('#${dependentForm}').length) {
       jQuery("#${dependentForm}_${mainId}").change(function(e, data) {
-          getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentId}', '${descName}', '', '');
+          getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentId}', '${descName}');
       });
-      getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentId}', '${descName}', '${selectedDependentOption}', '');
+      getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentId}', '${descName}', '${selectedDependentOption}');
     }
 })
 </script>
\ No newline at end of file

Propchange: ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct  8 22:41:27 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/applications/commonext/widget/HelpScreens.xml:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264
-/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1002466
+/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-1006054

Modified: ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Fri Oct  8 22:41:27 2010
@@ -311,29 +311,27 @@ public class GenericDAO {
             throw new org.ofbiz.entity.GenericNotImplementedException("Operation updateByCondition not supported yet for view entities");
         }
 
-        String sql = "UPDATE " + modelEntity.getTableName(datasourceInfo);
-        sql += " SET ";
+        StringBuilder sql = new StringBuilder("UPDATE ").append(modelEntity.getTableName(datasourceInfo));
+        sql.append(" SET ");
         List<ModelField> fieldList = new LinkedList<ModelField>();
-        boolean firstField = true;
-        for (String name: fieldsToSet.keySet()) {
+        List<EntityConditionParam> params = new LinkedList<EntityConditionParam>();
+        for (Map.Entry<String, ? extends Object> entry: fieldsToSet.entrySet()) {
+            String name = entry.getKey();
             ModelField field = modelEntity.getField(name);
             if (field != null) {
-                if (!firstField) {
-                    sql += ", ";
-                } else {
-                    firstField = false;
+                if (!params.isEmpty()) {
+                    sql.append(", ");
                 }
-                sql += field.getColName() + " = ?";
-                fieldList.add(field);
+                sql.append(field.getColName()).append(" = ?");
+                params.add(new EntityConditionParam(field, entry.getValue()));
             }
         }
-        sql += " WHERE " + condition.makeWhereString(modelEntity, null, this.datasourceInfo);
+        sql.append(" WHERE ").append(condition.makeWhereString(modelEntity, params, this.datasourceInfo));
 
         try {
-            sqlP.prepareStatement(sql);
-            for (ModelField field: fieldList) {
-                Object value = fieldsToSet.get(field.getName());
-                SqlJdbcUtil.setValue(sqlP, field, modelEntity.getEntityName(), value, modelFieldTypeReader);
+            sqlP.prepareStatement(sql.toString());
+            for (EntityConditionParam param: params) {
+                SqlJdbcUtil.setValue(sqlP, param.getModelField(), modelEntity.getEntityName(), param.getFieldValue(), modelFieldTypeReader);
             }
 
             return sqlP.executeUpdate();
@@ -1147,15 +1145,15 @@ public class GenericDAO {
             throw new org.ofbiz.entity.GenericNotImplementedException("Operation deleteByCondition not supported yet for view entities");
         }
 
-        String sql = "DELETE FROM " + modelEntity.getTableName(this.datasourceInfo);
+        StringBuilder sql = new StringBuilder("DELETE FROM ").append(modelEntity.getTableName(this.datasourceInfo));
 
         String whereCondition = condition.makeWhereString(modelEntity, null, this.datasourceInfo);
         if (UtilValidate.isNotEmpty(whereCondition)) {
-            sql += " WHERE " + whereCondition;
+            sql.append(" WHERE ").append(whereCondition);
         }
 
         try {
-            sqlP.prepareStatement(sql);
+            sqlP.prepareStatement(sql.toString());
 
             return sqlP.executeUpdate();
         } finally {

Modified: ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Fri Oct  8 22:41:27 2010
@@ -187,6 +187,16 @@ public class DatabaseUtil {
         int curEnt = 0;
         int totalEnt = modelEntityList.size();
         List<ModelEntity> entitiesAdded = FastList.newInstance();
+        String schemaName;
+        try {
+            DatabaseMetaData dbData = this.getDatabaseMetaData(null, messages);
+            schemaName = getSchemaName(dbData);
+        } catch (SQLException e) {
+            String message = "Could not get schema name the database, aborting.";
+            if (messages != null) messages.add(message);
+            Debug.logError(message, module);
+            return;
+        }
         for (ModelEntity entity: modelEntityList) {
             curEnt++;
 
@@ -198,15 +208,22 @@ public class DatabaseUtil {
                 continue;
             }
 
+            String plainTableName = entity.getPlainTableName();
+            String tableName;
+            if (UtilValidate.isNotEmpty(schemaName)) {
+                tableName = schemaName + "." + plainTableName;
+            } else {
+                tableName = plainTableName;
+            }
             String entMessage = "(" + timer.timeSinceLast() + "ms) Checking #" + curEnt + "/" + totalEnt +
-                " Entity " + entity.getEntityName() + " with table " + entity.getTableName(datasourceInfo);
+                " Entity " + entity.getEntityName() + " with table " + tableName;
 
             Debug.logVerbose(entMessage, module);
             if (messages != null) messages.add(entMessage);
 
             // -make sure all entities have a corresponding table
-            if (tableNames.contains(entity.getTableName(datasourceInfo))) {
-                tableNames.remove(entity.getTableName(datasourceInfo));
+            if (tableNames.contains(tableName)) {
+                tableNames.remove(tableName);
 
                 if (colInfo != null) {
                     Map<String, ModelField> fieldColNames = FastMap.newInstance();
@@ -216,7 +233,7 @@ public class DatabaseUtil {
                         fieldColNames.put(field.getColName(), field);
                     }
 
-                    Map<String, ColumnCheckInfo> colMap = colInfo.get(entity.getTableName(datasourceInfo));
+                    Map<String, ColumnCheckInfo> colMap = colInfo.get(tableName);
                     if (colMap != null) {
                         for (ColumnCheckInfo ccInfo: colMap.values()) {
                             // -list all columns that do not have a corresponding field
@@ -272,14 +289,14 @@ public class DatabaseUtil {
 
                                     // NOTE: this may need a toUpperCase in some cases, keep an eye on it, okay just compare with ignore case
                                     if (!ccInfo.typeName.equalsIgnoreCase(typeName)) {
-                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" +
+                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" +
                                             entity.getEntityName() + "] is of type [" + ccInfo.typeName + "] in the database, but is defined as type [" +
                                             typeName + "] in the entity definition.";
                                         Debug.logError(message, module);
                                         if (messages != null) messages.add(message);
                                     }
                                     if (columnSize != -1 && ccInfo.columnSize != -1 && columnSize != ccInfo.columnSize && (columnSize * 3) != ccInfo.columnSize) {
-                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" +
+                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" +
                                             entity.getEntityName() + "] has a column size of [" + ccInfo.columnSize +
                                             "] in the database, but is defined to have a column size of [" + columnSize + "] in the entity definition.";
                                         Debug.logWarning(message, module);
@@ -290,7 +307,7 @@ public class DatabaseUtil {
                                         }
                                     }
                                     if (decimalDigits != -1 && decimalDigits != ccInfo.decimalDigits) {
-                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" +
+                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" +
                                             entity.getEntityName() + "] has a decimalDigits of [" + ccInfo.decimalDigits +
                                             "] in the database, but is defined to have a decimalDigits of [" + decimalDigits + "] in the entity definition.";
                                         Debug.logWarning(message, module);
@@ -299,25 +316,25 @@ public class DatabaseUtil {
 
                                     // do primary key matching check
                                     if (checkPks && ccInfo.isPk && !field.getIsPk()) {
-                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" +
+                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" +
                                             entity.getEntityName() + "] IS a primary key in the database, but IS NOT a primary key in the entity definition. The primary key for this table needs to be re-created or modified so that this column is NOT part of the primary key.";
                                         Debug.logError(message, module);
                                         if (messages != null) messages.add(message);
                                     }
                                     if (checkPks && !ccInfo.isPk && field.getIsPk()) {
-                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" +
+                                        String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" +
                                             entity.getEntityName() + "] IS NOT a primary key in the database, but IS a primary key in the entity definition. The primary key for this table needs to be re-created or modified to add this column to the primary key. Note that data may need to be added first as a primary key column cannot have an null values.";
                                         Debug.logError(message, module);
                                         if (messages != null) messages.add(message);
                                     }
                                 } else {
-                                    String message = "Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" + entity.getEntityName() +
+                                    String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() +
                                         "] has a field type name of [" + field.getType() + "] which is not found in the field type definitions";
                                     Debug.logError(message, module);
                                     if (messages != null) messages.add(message);
                                 }
                             } else {
-                                String message = "Column [" + ccInfo.columnName + "] of table [" + entity.getTableName(datasourceInfo) + "] of entity [" + entity.getEntityName() + "] exists in the database but has no corresponding field" + ((checkPks && ccInfo.isPk) ? " (and it is a PRIMARY KEY COLUMN)" : "");
+                                String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] exists in the database but has no corresponding field" + ((checkPks && ccInfo.isPk) ? " (and it is a PRIMARY KEY COLUMN)" : "");
                                 Debug.logWarning(message, module);
                                 if (messages != null) messages.add(message);
                             }
@@ -325,7 +342,7 @@ public class DatabaseUtil {
 
                         // -display message if number of table columns does not match number of entity fields
                         if (colMap.size() != entity.getFieldsSize()) {
-                            String message = "Entity [" + entity.getEntityName() + "] has " + entity.getFieldsSize() + " fields but table [" + entity.getTableName(datasourceInfo) + "] has " + colMap.size() + " columns.";
+                            String message = "Entity [" + entity.getEntityName() + "] has " + entity.getFieldsSize() + " fields but table [" + tableName + "] has " + colMap.size() + " columns.";
                             Debug.logWarning(message, module);
                             if (messages != null) messages.add(message);
                         }
@@ -344,11 +361,11 @@ public class DatabaseUtil {
                             String errMsg = addColumn(entity, field);
 
                             if (UtilValidate.isNotEmpty(errMsg)) {
-                                message = "Could not add column [" + field.getColName() + "] to table [" + entity.getTableName(datasourceInfo) + "]: " + errMsg;
+                                message = "Could not add column [" + field.getColName() + "] to table [" + tableName + "]: " + errMsg;
                                 Debug.logError(message, module);
                                 if (messages != null) messages.add(message);
                             } else {
-                                message = "Added column [" + field.getColName() + "] to table [" + entity.getTableName(datasourceInfo) + "]" + (field.getIsPk() ? " (NOTE: this is a PRIMARY KEY FIELD, but the primary key was not updated automatically (not considered a safe operation), be sure to fill in any needed data and re-create the primary key)" : "");
+                                message = "Added column [" + field.getColName() + "] to table [" + tableName + "]" + (field.getIsPk() ? " (NOTE: this is a PRIMARY KEY FIELD, but the primary key was not updated automatically (not considered a safe operation), be sure to fill in any needed data and re-create the primary key)" : "");
                                 Debug.logImportant(message, module);
                                 if (messages != null) messages.add(message);
                             }
@@ -364,12 +381,12 @@ public class DatabaseUtil {
                     // create the table
                     String errMsg = createTable(entity, modelEntities, false);
                     if (UtilValidate.isNotEmpty(errMsg)) {
-                        message = "Could not create table [" + entity.getTableName(datasourceInfo) + "]: " + errMsg;
+                        message = "Could not create table [" + tableName + "]: " + errMsg;
                         Debug.logError(message, module);
                         if (messages != null) messages.add(message);
                     } else {
                         entitiesAdded.add(entity);
-                        message = "Created table [" + entity.getTableName(datasourceInfo) + "]";
+                        message = "Created table [" + tableName + "]";
                         Debug.logImportant(message, module);
                         if (messages != null) messages.add(message);
                     }
@@ -1164,16 +1181,8 @@ public class DatabaseUtil {
             if (Debug.infoOn()) Debug.logInfo("Getting Column Info From Database", module);
 
             Map<String, Map<String, ColumnCheckInfo>> colInfo = FastMap.newInstance();
-            String lookupSchemaName = null;
             try {
-                if (dbData.supportsSchemasInTableDefinitions()) {
-                    if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
-                        lookupSchemaName = this.datasourceInfo.schemaName;
-                    } else {
-                        lookupSchemaName = dbData.getUserName();
-                    }
-                }
-
+                String lookupSchemaName = getSchemaName(dbData);
                 boolean needsUpperCase = false;
                 try {
                     needsUpperCase = dbData.storesLowerCaseIdentifiers() || dbData.storesMixedCaseIdentifiers();
@@ -1391,15 +1400,7 @@ public class DatabaseUtil {
 
         try {
             // ResultSet rsCols = dbData.getCrossReference(null, null, null, null, null, null);
-            String lookupSchemaName = null;
-            if (dbData.supportsSchemasInTableDefinitions()) {
-                if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
-                    lookupSchemaName = this.datasourceInfo.schemaName;
-                } else {
-                    lookupSchemaName = dbData.getUserName();
-                }
-            }
-
+            String lookupSchemaName = getSchemaName(dbData);
             boolean needsUpperCase = false;
             try {
                 needsUpperCase = dbData.storesLowerCaseIdentifiers() || dbData.storesMixedCaseIdentifiers();
@@ -1532,14 +1533,7 @@ public class DatabaseUtil {
         Map<String, Set<String>> indexInfo = FastMap.newInstance();
         try {
             int totalIndices = 0;
-            String lookupSchemaName = null;
-            if (dbData.supportsSchemasInTableDefinitions()) {
-                if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
-                    lookupSchemaName = this.datasourceInfo.schemaName;
-                } else {
-                    lookupSchemaName = dbData.getUserName();
-                }
-            }
+            String lookupSchemaName = getSchemaName(dbData);
             for (String curTableName: tableNames) {
                 if (lookupSchemaName != null) {
                     curTableName = curTableName.substring(lookupSchemaName.length() + 1);
@@ -3056,7 +3050,13 @@ public class DatabaseUtil {
     public String getSchemaName(DatabaseMetaData dbData) throws SQLException {
         if (!isLegacy && this.datasourceInfo.useSchemas && dbData.supportsSchemasInTableDefinitions()) {
             if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
-                return this.datasourceInfo.schemaName;
+                if (dbData.storesLowerCaseIdentifiers()) {
+                    return this.datasourceInfo.schemaName.toLowerCase();
+                } else if (dbData.storesUpperCaseIdentifiers()) {
+                    return this.datasourceInfo.schemaName.toUpperCase();
+                } else {
+                    return this.datasourceInfo.schemaName;
+                }
             } else {
                 return dbData.getUserName();
             }

Modified: ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js Fri Oct  8 22:41:27 2010
@@ -17,72 +17,94 @@
  * under the License.
  */
 
-// *** getDependentDropdownValues allows to dynamically populate a dependent dropdown on change on its parent dropdown, doesn't require any fixed naming convention 
+// *** getDependentDropdownValues allows to dynamically populate a dependent drop-down on change on its parent drop-down, doesn't require any fixed naming convention 
 // request      = request calling the service which retrieve the info from the DB, ex: getAssociatedStateList
 // paramKey     = parameter value used in the called service 
-// paramField   = parent dropdown field Id (mainId)
-// targetField  = dependend dropdown field Id (dependentId)
+// paramField   = parent drop-down field Id (mainId)
+// targetField  = dependent drop-down field Id (dependentId)
 // responseName = result returned by the service (using a standard json response, ie chaining json request)
-// keyName      = keyName of the dependent dropdown  
-// descName     = name of the dependent dropdown description
+// keyName      = keyName of the dependent drop-down  
+// descName     = name of the dependent drop-down description
 // selected     = optional name of a selected option
 // callback     = optional javascript function called at end
-// inputField   = optional name of an input field to use instead of a dropdown (this will be extended later to use an of autocompleted dropdown, instead of dropdown or a lookup, when there are too much values to populate)   
-// hide         = optional argument, if true the dependend dropdown field (targetField) will be hidden when no options are available else only disabled. False by default.
-function getDependentDropdownValues(request, paramKey, paramField, targetField, responseName, keyName, descName, selected, callback, hide) {
-	data = [ { name: paramKey, value: jQuery('#' + paramField).val()} ];  // get requested value from parent dropdown field 
-	// Call jQuery.post with a json formatted result (see end of code)
-    jQuery.post(request, data, function(result) { 
-        target = '#' + targetField;
-        optionList = '';
-        list = result[responseName];
-        // this is to handle a specific case where an input field is needed, uses inputField for the field name
-        if (!list) {
-			jQuery(target).hide();
-			jQuery(target).after("<input type='text' name=arguments[9] id=targetField + '_input' size=3>"); 
-        	return;
-        } else { 
-        	if (jQuery(target + '_input')) { 
-        		jQuery(target + '_input').remove();            		
-				jQuery(target).show();
-        	}
-        }
-        // Create and show dependent select options
-        jQuery.each(list, function (key, value) {
-            if (typeof value == 'string') {
-                values = value.split(': ');
-                if (values[1].indexOf(selected) >=0) {
-                    optionList += "<option selected='selected' value = " + values[1] + " >" + values[0] + "</option>";
-                } else {
-                    optionList +=  "<option value = " + values[1] + " >" + values[0] + "</option>";
-                }
+// hide         = optional boolean argument, if true the dependent drop-down field (targetField) will be hidden when no options are available else only disabled. False by default.
+// hideTitle    = optional boolean argument (hide must be set to true), if true the title of the dependent drop-down field (targetField) will be hidden when no options are available else only disabled. False by default.
+// inputField   = optional name of an input field    
+// 				  this is to handle a specific case where an input field is needed instead of a drop-down when no values are returned by the request
+// 				  this will be maybe extended later to use an auto-completed drop-down or a lookup, instead of straight drop-down currently, when there are too much values to populate
+// 				  this is e.g. currently used in the Product Price Rules screen
+function getDependentDropdownValues(request, paramKey, paramField, targetField, responseName, keyName, descName, selected, callback, hide, hideTitle, inputField) {
+	target = '#' + targetField;
+	input = '#' + inputField;
+    targetTitle = target + '_title'
+    optionList = '';
+    jQuery.ajax({
+        url: request,
+        data: [ { name: paramKey, value: jQuery('#' + paramField).val()} ],  // get requested value from parent drop-down field
+        dataType : 'json',
+        async: false,
+        type: 'POST',
+        success: function(result){
+	        list = result[responseName];
+	        // Create and show dependent select options
+	        // Create and show dependent select options
+	        if (list) {
+		        jQuery.each(list, function (key, value) {
+		            if (typeof value == 'string') {
+		                values = value.split(': ');
+		                if (values[1].indexOf(selected) >=0) {
+		                    optionList += "<option selected='selected' value = " + values[1] + " >" + values[0] + "</option>";
+		                } else {
+		                    optionList +=  "<option value = " + values[1] + " >" + values[0] + "</option>";
+		                }
+		            } else {
+		                if (value[keyName] == selected) {
+		                    optionList += "<option selected='selected' value = " + value[keyName] + " >" + value[descName] + "</option>";
+		                } else {
+		                    optionList += "<option value = " + value[keyName] + " >" + value[descName] + "</option>";
+		                }
+		            }
+		        })
+	        };
+            // Hide/show the dependent drop-down if hide=true else simply disable/enable
+            if ((!list) || (list.size() < 1) || ((list.size() == 1) && list[0].indexOf("_NA_") >=0)) {
+            	jQuery(target).attr('disabled', 'disabled');
+            	if (hide) {
+	                if (jQuery(target).is(':visible')) {
+	                	jQuery(target).fadeOut(2500);
+	                	if (hideTitle) jQuery(targetTitle).fadeOut(2500);
+					} else {
+						jQuery(target).fadeIn();
+						if (hideTitle) jQuery(targetTitle).fadeIn();	                    
+	                	jQuery(target).fadeOut(2500);
+	                	if (hideTitle) jQuery(targetTitle).fadeOut(2500);
+    	            }
+            	}
             } else {
-                if (value[keyName] == selected) {
-                    optionList += "<option selected='selected' value = " + value[keyName] + " >" + value[descName] + "</option>";
-                } else {
-                    optionList += "<option value = " + value[keyName] + " >" + value[descName] + "</option>";
+            	jQuery(target).removeAttr('disabled');
+            	if (hide) {
+            		if (!jQuery(target).is(':visible')) {
+            			jQuery(target).fadeIn();
+            			if (hideTitle) jQuery(targetTitle).fadeIn();
+            		}
                 }
             }
-        });
-        jQuery(target).html(optionList).click().change(); // .change() needed when using also asmselect on same field, .click() specifically for IE8
-        // Hide/show the dependent dropdown if hide=true else simply disable/enable
-        if ((list.size() < 1) || ((list.size() == 1) && list[0].indexOf("_NA_") >=0)) {
-        	jQuery(target).attr('disabled', 'disabled');
-        	if (hide) {
-	            if (jQuery(target).is(':visible')) {
-	                jQuery(target).fadeOut();
-	            }
-        	}
-        } else {
-        	jQuery(target).removeAttr('disabled');
-        	if (hide) {
-        		if (!jQuery(target).is(':visible')) {
-        			jQuery(target).fadeIn();
-        		}
+    	},
+	    complete: function() {
+            // this is to handle a specific case where an input field is needed instead of a drop-down when no values are returned by the request (else if allow-empty="true" is used autoComplete handle the case)
+            // this could be extended later to use an auto-completed drop-down or a lookup, instead of drop-down currently, when there are too much values to populate
+            // Another option is to use an input field with Id instead of a drop-down, see setPriceRulesCondEventJs.ftl and top of getAssociatedPriceRulesConds service
+            if (!list && inputField) {
+                jQuery(target).hide();
+                jQuery(input).show();
+            } else if (inputField) { 
+                jQuery(input).hide();
+                jQuery(target).show();
             }
-        }
-        if (callback != null) eval(callback);
-    }, 'json');
+            jQuery(target).html(optionList).click().change(); // .change() needed when using also asmselect on same field, .click() specifically for IE8
+            if (callback != null) eval(callback);
+		}
+    });
 }
   
 //*** calls any service already mounted as an event

Modified: ofbiz/branches/jquery/framework/service/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/service/entitydef/entitymodel.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/service/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jquery/framework/service/entitydef/entitymodel.xml Fri Oct  8 22:41:27 2010
@@ -40,7 +40,7 @@ under the License.
   <!-- ========================================================= -->
 
     <entity entity-name="JobSandbox" package-name="org.ofbiz.service.schedule" title="Job Scheduler Sandbox Entity"
-            sequence-bank-size="100">
+            sequence-bank-size="100" never-cache="true">
         <field name="jobId" type="id-ne"></field>
         <field name="jobName" type="name"></field>
         <field name="runTime" type="date-time"></field>

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Fri Oct  8 22:41:27 2010
@@ -1735,6 +1735,9 @@ public class ModelFormField {
                 List<EntityCondition> expandedConditionList = new LinkedList<EntityCondition>();
                 for (EntityFinderUtil.Condition condition: constraintList) {
                     ModelEntity modelEntity = delegator.getModelEntity(this.entityName);
+                    if (modelEntity == null) {
+                        throw new IllegalArgumentException("Error in entity-options: could not find entity [" + this.entityName + "]");
+                    }
                     expandedConditionList.add(condition.createCondition(context, modelEntity, delegator.getModelFieldTypeReader(modelEntity)));
                 }
                 findCondition = EntityCondition.makeCondition(expandedConditionList);

Modified: ofbiz/branches/jquery/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/csvFormMacroLibrary.ftl?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/csvFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jquery/framework/widget/templates/csvFormMacroLibrary.ftl Fri Oct  8 22:41:27 2010
@@ -19,7 +19,7 @@ under the License.
 
 <#macro renderField text><#if text?exists>"${text?replace("\"", "\"\"")}"</#if></#macro>
 
-<#macro renderDisplayField type imageLocation idName description class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
+<#macro renderDisplayField type imageLocation idName description title class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
 <@renderField description />,<#rt/>
 </#macro>
 <#macro renderHyperlinkField></#macro>

Modified: ofbiz/branches/jquery/specialpurpose/assetmaint/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/assetmaint/entitydef/entitymodel.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/assetmaint/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/assetmaint/entitydef/entitymodel.xml Fri Oct  8 22:41:27 2010
@@ -55,19 +55,6 @@
             <key-map field-name="scheduleWorkEffortId" rel-field-name="workEffortId"/>
         </view-link>
     </view-entity>
-    <view-entity entity-name="WorkEffortAndTimeEntry" package-name="org.ofbiz.specialpurpose.assetmaint"
-        title="WorkEffort and TimeEntry View Entity">
-        <member-entity entity-alias="WE" entity-name="WorkEffort"/>
-        <member-entity entity-alias="TE" entity-name="TimeEntry"/>
-        <alias-all entity-alias="WE"/>
-        <alias-all entity-alias="TE"/>
-        <view-link entity-alias="WE" rel-entity-alias="TE">
-            <key-map field-name="workEffortId"/>
-        </view-link>
-        <relation type="many" rel-entity-name="WorkEffortSkillStandard">
-            <key-map field-name="workEffortId"/>
-        </relation>
-    </view-entity>
     <view-entity entity-name="FixedAssetMaintWorkEffortAndPartyAssignment"
         package-name="org.ofbiz.specialpurpose.assetmaint"
         title="View of FixedAssetMaint and WorkEffort and WorkEffortPartyAssignment">

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml?rev=1006056&r1=1006055&r2=1006056&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml Fri Oct  8 22:41:27 2010
@@ -103,6 +103,12 @@
         <value xml:lang="en">Secondary color</value>
         <value xml:lang="th">สีรอง</value>
     </property>
+    <property key="EbayStoreStoreSelectTransaction">
+        <value xml:lang="en">Import with single transaction</value>
+    </property>
+    <property key="EbayStoreStoreSelectOrder">
+        <value xml:lang="en">Import with order</value>
+    </property>
     <property key="EbayStoreStoreAccentColor">
         <value xml:lang="en">Accent color</value>
         <value xml:lang="th">Accent color</value>

Propchange: ofbiz/branches/jquery/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct  8 22:41:27 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt/specialpurpose/ebay/lib:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1002466
+/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-1006054