svn commit: r1551376 [3/4] - in /ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./ applications/accounting/config/ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/value...

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

svn commit: r1551376 [3/4] - in /ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./ applications/accounting/config/ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/value...

jleroux@apache.org
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Mon Dec 16 22:12:08 2013
@@ -982,31 +982,44 @@ under the License.
         <call-service service-name="getPartyAccountingPreferences" in-map-name="partyAccountingPreferencesMap">
              <result-to-field result-name="partyAccountingPreference" field="partyAcctgPreference"/>
         </call-service>
-        <if-compare-field to-field="partyAcctgPreference.baseCurrencyUomId" operator="equals" field="orderHeader.currencyUom">
-            <set field="parameters.currencyUomId" from-field="orderHeader.currencyUom"/>
-            <set field="parameters.amount" from-field="orderHeader.grandTotal"/>
-            <else>
-             <!-- get conversion rate from related invoice when exists -->
-             <entity-and list="invoices" entity-name="OrderItemBillingAndInvoiceAndItem">
-             <field-map field-name="orderId" from-field="orderId"/>
-             </entity-and>
-             <if-not-empty field="invoices">
-             <entity-one entity-name="Invoice" value-field="invoice">
-             <field-map field-name="invoiceId" from-field="invoices[0].invoiceId"/>
-             </entity-one>
-                 <set field="convertUomInMap.asOfDate" from-field="invoice.invoiceDate"/>
-             </if-not-empty>
-                <set field="convertUomInMap.originalValue" from-field="orderHeader.grandTotal"/>
-                <set field="convertUomInMap.uomId" from-field="orderHeader.currencyUom"/>
-                <set field="convertUomInMap.uomIdTo" from-field="partyAcctgPreference.baseCurrencyUomId"/>
+        <if>
+            <condition>
+                <and>
+                    <not>
+                        <if-empty field="partyAcctgPreference.baseCurrencyUomId" />
+                    </not>
+                    <if-compare-field to-field="partyAcctgPreference.baseCurrencyUomId" operator="equals" field="orderHeader.currencyUom" />
+                </and>
+            </condition>
+            <then>
+                <set field="parameters.currencyUomId" from-field="orderHeader.currencyUom" />
+                <set field="parameters.amount" from-field="orderHeader.grandTotal" />
+                <!-- get conversion rate from related invoice when exists -->
+                <entity-and list="invoices" entity-name="OrderItemBillingAndInvoiceAndItem">
+                    <field-map field-name="orderId" from-field="orderId" />
+                </entity-and>
+                <if-not-empty field="invoices">
+                    <entity-one entity-name="Invoice" value-field="invoice">
+                        <field-map field-name="invoiceId" from-field="invoices[0].invoiceId" />
+                    </entity-one>
+                    <set field="convertUomInMap.asOfDate" from-field="invoice.invoiceDate" />
+                </if-not-empty>
+                <set field="convertUomInMap.originalValue" from-field="orderHeader.grandTotal" />
+                <set field="convertUomInMap.uomId" from-field="orderHeader.currencyUom" />
+                <set field="convertUomInMap.uomIdTo" from-field="partyAcctgPreference.baseCurrencyUomId" />
+                <log message="convertUomInMap = ${convertUomInMap}" level="info" />
                 <call-service service-name="convertUom" in-map-name="convertUomInMap">
-                    <result-to-field result-name="convertedValue" field="parameters.amount"/>
+                    <result-to-field result-name="convertedValue" field="parameters.amount" />
                 </call-service>
-                <set field="parameters.actualCurrencyAmount" from-field="orderHeader.grandTotal"/>
-                <set field="parameters.actualCurrencyUomId" from-field="orderHeader.currencyUom"/>
-                <set field="parameters.currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
+                <set field="parameters.actualCurrencyAmount" from-field="orderHeader.grandTotal" />
+                <set field="parameters.actualCurrencyUomId" from-field="orderHeader.currencyUom" />
+                <set field="parameters.currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId" />
+            </then>
+            <else>
+                <set field="parameters.currencyUomId" from-field="orderHeader.currencyUom" />
+                <set field="parameters.amount" from-field="orderHeader.grandTotal" />
             </else>
-        </if-compare-field>
+        </if>
         
         <set field="parameters.partyIdFrom" from-field="orderRoleFrom.partyId"/>
         <set field="parameters.partyIdTo" from-field="orderRoleTo.partyId"/>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java Mon Dec 16 22:12:08 2013
@@ -114,26 +114,25 @@ public class ValueLinkApi {
      * @return ValueLinkApi reference
      */
     public static ValueLinkApi getInstance(Delegator delegator, Properties props, boolean reload) {
-        String merchantId = (String) props.get("payment.valuelink.merchantId");
         if (props == null) {
             throw new IllegalArgumentException("Properties cannot be null");
         }
+        String merchantId = (String) props.get("payment.valuelink.merchantId");
 
         ValueLinkApi api = (ValueLinkApi) objectCache.get(merchantId);
-        if (api == null || reload) {
+        if (api == null) {
+            throw new RuntimeException("Runtime problems with ValueLinkApi; unable to create instance");
+        }
+        if (reload) {
             synchronized(ValueLinkApi.class) {
                 api = (ValueLinkApi) objectCache.get(merchantId);
-                if (api == null || reload) {
+                if (api == null) {
                     api = new ValueLinkApi(delegator, props);
                     objectCache.put(merchantId, api);
                 }
             }
         }
 
-        if (api == null) {
-            throw new RuntimeException("Runtime problems with ValueLinkApi; unable to create instance");
-        }
-
         return api;
     }
 

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceForms.xml Mon Dec 16 22:12:08 2013
@@ -142,8 +142,8 @@ under the License.
 <form name="invoiceItems" list-name="invItemAndOrdItems" target="" title="" type="list" separate-columns="true" paginate-target="invoiceOverview"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <row-actions>
-            <set field="quantity" value="${groovy: quantity==null?1:quantity}"/>
-            <set field="total" value="${quantity * amount}"/>
+            <set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/>
+            <set field="total" value="${quantity * amount ?: 0}" type="BigDecimal"/>
         </row-actions>
         <auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
         <field name="invoiceId"><hidden/></field>
@@ -348,10 +348,7 @@ under the License.
    <form name="EditInvoiceItems" type="multi"  list-name="invoiceItems" default-entity-name="InvoiceItem" target="updateInvoiceItem?invoiceId=${invoiceId}&amp;viewSize=${viewSize}&amp;viewIndex=${viewIndex}" title="Edit Invoice Items" paginate-target="listInvoiceItems"
        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
        <row-actions>
-           <set field="total" value="${groovy:
-               import java.math.BigDecimal;
-               if(quantity == null) quantity = BigDecimal.ONE;
-               return(quantity.multiply(amount));}"/>
+           <set field="total" value="${groovy: (quantity ?: 1) * (amount ?: 0)}" type="BigDecimal"/>
        </row-actions>
        <field name="viewSize"><hidden value="${viewSize}"/></field>
        <field name="viewIndex"><hidden value="${viewIndex}"/></field>
@@ -364,7 +361,7 @@ under the License.
                 <parameter param-name="invoiceItemSeqId"/>
             </hyperlink>
         </field>
-       <field name="quantity"><text size="3"/></field>
+       <field name="quantity"><text size="10"/></field>
        <field name="invoiceItemTypeId">
            <drop-down allow-empty="false">
                <entity-options entity-name="InvoiceItemType" description="${description}" key-field-name="invoiceItemTypeId"/>
@@ -377,7 +374,7 @@ under the License.
                <list-options list-name="glAccountOrganizationAndClassList" key-name="glAccountId" description="${glAccountId} ${accountName}"/>
            </drop-down>
        </field>
-       <field name="amount" title="${uiLabelMap.AccountingUnitPrice}"><text size="7"/></field>
+       <field name="amount" title="${uiLabelMap.AccountingUnitPrice}"><text size="10"/></field>
        <field name="total" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>  <!-- this should not look like something you can modify, hence display -->
        <field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit button-type="text-link"/></field>
        <field name="removeButton" title=" " widget-style="buttontext">
@@ -395,7 +392,7 @@ under the License.
         <field name="invoiceId"><hidden/></field>
         <field position="1" name="invoiceItemTypeId">
             <drop-down allow-empty="false">
-                <list-options list-name="invoiceItemTypes" key-name="invoiceItemTypeId" description="${groovy:uiLabelMap.get('InvoiceItemType.description.'+invoiceItemTypeId)}"/>
+                <entity-options entity-name="InvoiceItemType" description="${description}" key-field-name="invoiceItemTypeId"/>
             </drop-down>
         </field>
         <field position="1" name="description"><text size="80"/></field>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceScreens.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/widget/InvoiceScreens.xml Mon Dec 16 22:12:08 2013
@@ -441,7 +441,8 @@ under the License.
                 <entity-condition entity-name="InvoiceItemType" list="PayrolGroup">
                     <condition-expr field-name="parentTypeId" value="PAYROL"/>
                 </entity-condition>
-                <entity-condition entity-name="InvoiceItemType" list="PayrolList"></entity-condition>
+                <entity-condition entity-name="InvoiceItemType" list="PayrolList"/>
+                <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/GetAccountOrganizationAndClass.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/src/org/ofbiz/content/content/ContentServices.java Mon Dec 16 22:12:08 2013
@@ -885,7 +885,7 @@ public class ContentServices {
             locale = (Locale) templateContext.get("locale");
         }
         GenericValue subContentDataResourceView = (GenericValue) context.get("subContentDataResourceView");
-        if (subContentDataResourceView != null && subContentDataResourceView == null) {
+        if (templateContext != null && subContentDataResourceView == null) {
             subContentDataResourceView = (GenericValue) templateContext.get("subContentDataResourceView");
         }
 

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/config/OrderUiLabels.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/config/OrderUiLabels.xml Mon Dec 16 22:12:08 2013
@@ -7322,7 +7322,7 @@
         <value xml:lang="fr">Échec de la création du paiement : aucune préférence de paiement trouvée sous la référence : ${orderPaymentPreferenceId}</value>
         <value xml:lang="it">Fallita creazione Pagamento: Non è possibile trovare OrderPaymentPreference con orderPaymentPreferenceId: ${orderPaymentPreferenceId}</value>
         <value xml:lang="ja">支払の作成に失敗しました。注文支払設定が見つかりません。注文支払設定ID: ${orderPaymentPreferenceId}</value>
-     <value xml:lang="vi">Tạo thanh toán không thành công: không tìm thấy thiết lập thanh toán với Id : ${orderPaymentPreferenceId}</value>
+        <value xml:lang="vi">Tạo thanh toán không thành công: không tìm thấy thiết lập thanh toán với Id : ${orderPaymentPreferenceId}</value>
         <value xml:lang="zh">创建支付(Payment)时失败:无法找到标识为${orderPaymentPreferenceId}的订单支付设置(OrderPaymentPreference)</value>
     </property>
     <property key="OrderOrderPaymentCannotBeCreatedPayToPartyIdNotSet">
@@ -13721,9 +13721,9 @@
     </property>
     <property key="OrderUpdateItems">
         <value xml:lang="de">Elemente aktualisieren</value>
-        <value xml:lang="en">Update Items</value>
+        <value xml:lang="en">Update selected items</value>
         <value xml:lang="es">Actualización de los ítems</value>
-        <value xml:lang="fr">Mise à jour des lignes</value>
+        <value xml:lang="fr">Mise à jour des lignes sélectionnées</value>
         <value xml:lang="it">Righe Aggiornate</value>
         <value xml:lang="ja">アイテムを更新</value>
         <value xml:lang="nl">Items actualiseren</value>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/script/org/ofbiz/order/order/OrderServices.xml Mon Dec 16 22:12:08 2013
@@ -682,7 +682,7 @@ under the License.
         <iterate list="adjustments" entry="adjustment">
             <if>
                 <condition>
-                    <not><if-empty field="orderAdjustment.productPromoId"/></not>
+                    <not><if-empty field="adjustment.productPromoId"/></not>
                 </condition>
                 <then>
                     <calculate field="newOrderAdjustmentTotal" decimal-scale="3">

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Dec 16 22:12:08 2013
@@ -2359,6 +2359,9 @@ public class OrderReturnServices {
         if ((returnAmountByOrder != null) && (returnAmountByOrder.keySet() != null)) {
             for (String orderId : returnAmountByOrder.keySet()) {
                 BigDecimal returnAmount = returnAmountByOrder.get(orderId);
+                if (returnAmount == null) {
+                    return ServiceUtil.returnError("No returnAmount found for order:" + orderId);
+                }
                 if (returnAmount.abs().compareTo(new BigDecimal("0.000001")) < 0) {
                     Debug.logError("Order [" + orderId + "] refund amount[ " + returnAmount + "] less than zero", module);
                     return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
@@ -2366,14 +2369,10 @@ public class OrderReturnServices {
                 }
                 OrderReadHelper helper = new OrderReadHelper(delegator, orderId);
                 BigDecimal grandTotal = helper.getOrderGrandTotal();
-                if (returnAmount == null) {
-                    Debug.logInfo("No returnAmount found for order:" + orderId, module);
-                } else {
-                    if (returnAmount.subtract(grandTotal).compareTo(new BigDecimal("0.01")) > 0) {
-                        Debug.logError("Order [" + orderId + "] refund amount[ " + returnAmount + "] exceeds order total [" + grandTotal + "]", module);
-                        return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
-                                "OrderRefundAmountExceedsOrderTotal", locale));
-                    }
+                if (returnAmount.subtract(grandTotal).compareTo(new BigDecimal("0.01")) > 0) {
+                    Debug.logError("Order [" + orderId + "] refund amount[ " + returnAmount + "] exceeds order total [" + grandTotal + "]", module);
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
+                            "OrderRefundAmountExceedsOrderTotal", locale));
                 }
             }
         }
@@ -2402,7 +2401,11 @@ public class OrderReturnServices {
         if (orderAdjustmentId != null) {
             try {
                 orderAdjustment = delegator.findOne("OrderAdjustment", UtilMisc.toMap("orderAdjustmentId", orderAdjustmentId), false);
-
+                if (orderAdjustment == null) {
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource,
+                            "OrderCreateReturnAdjustmentNotFoundOrderAdjustment",
+                            UtilMisc.toMap("orderAdjustmentId", orderAdjustmentId), locale));
+                }
                 // get returnHeaderTypeId from ReturnHeader and then use it to figure out return item type mapping
                 returnHeader = delegator.findOne("ReturnHeader", UtilMisc.toMap("returnId", returnId), false);
                 String returnHeaderTypeId = ((returnHeader != null) && (returnHeader.getString("returnHeaderTypeId") != null)) ? returnHeader.getString("returnHeaderTypeId") : "CUSTOMER_RETURN";
@@ -2449,12 +2452,6 @@ public class OrderReturnServices {
         if (returnItem != null) {  // returnAdjustment for returnItem
             if (needRecalculate(returnAdjustmentTypeId)) {
                 Debug.logInfo("returnPrice:" + returnItem.getBigDecimal("returnPrice") + ",returnQuantity:" + returnItem.getBigDecimal("returnQuantity") + ",sourcePercentage:" + orderAdjustment.getBigDecimal("sourcePercentage"), module);
-                if (orderAdjustment == null) {
-                    Debug.logError("orderAdjustment [" + orderAdjustmentId + "] not found", module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource,
-                            "OrderCreateReturnAdjustmentNotFoundOrderAdjustment",
-                            UtilMisc.toMap("orderAdjustmentId", orderAdjustmentId), locale));
-                }
                 BigDecimal returnTotal = returnItem.getBigDecimal("returnPrice").multiply(returnItem.getBigDecimal("returnQuantity"));
                 BigDecimal orderTotal = orderItem.getBigDecimal("quantity").multiply(orderItem.getBigDecimal("unitPrice"));
                 amount = getAdjustmentAmount("RET_SALES_TAX_ADJ".equals(returnAdjustmentTypeId), returnTotal, orderTotal, orderAdjustment.getBigDecimal("amount"));

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 16 22:12:08 2013
@@ -1118,7 +1118,9 @@ public class OrderServices {
                                 Map<String, Object> ripResult = dispatcher.runSync("receiveInventoryProduct", ripCtx);
                                 if (ServiceUtil.isError(ripResult)) {
                                     String errMsg = ServiceUtil.getErrorMessage(ripResult);
-                                    resErrorMessages.addAll((Collection<? extends String>) UtilMisc.<String, String>toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg));
+                                    @SuppressWarnings("unchecked")
+                                    Collection<? extends String> map = (Collection<? extends String>) UtilMisc.<String, String>toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg);
+                                    resErrorMessages.addAll(map);
                                 }
                             } catch (GenericServiceException e) {
                                 Debug.logWarning(e, "Error invoking receiveInventoryProduct service in createOrder", module);
@@ -5631,6 +5633,7 @@ public class OrderServices {
         List<String> orderIds;
         try {
             orderIds = TransactionUtil.doNewTransaction(new Callable<List<String>>() {
+                @Override
                 public List<String> call() throws Exception {
                     List<String> orderIds = new LinkedList<String>();
                     EntityListIterator eli = null;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/task/TaskWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/task/TaskWorker.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/task/TaskWorker.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/task/TaskWorker.java Mon Dec 16 22:12:08 2013
@@ -36,17 +36,14 @@ public class TaskWorker {
         String lastName = orderTaskList.getString("customerLastName");
         String firstName = orderTaskList.getString("customerFirstName");
         //String groupName = orderTaskList.getString("customerGroupName");
-        String groupName = null; // this is only until the entity gets fixed
-        if (groupName != null) {
-            return groupName;
-        } else if (lastName != null) {
-            String name = lastName;
-            if (firstName != null)
-                name = name + ", " + firstName;
-            return name;
-        } else {
-            return "";
-        }
+        if (lastName != null) {
+        String name = lastName;
+        if (firstName != null)
+            name = name + ", " + firstName;
+        return name;
+      } else {
+        return "";
+      }
     }
 
     static Map<String, String> statusMapping = UtilMisc.toMap("WF_NOT_STARTED", "Waiting", "WF_RUNNING", "Active", "WF_COMPLETE", "Complete", "WF_SUSPENDED", "Hold");

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/editorderitems.ftl Mon Dec 16 22:12:08 2013
@@ -242,20 +242,24 @@ under the License.
                       <#if orderItemShipGroupAssocs?has_content>
                           <tr><td colspan="8">&nbsp;</td></tr>
                           <#list orderItemShipGroupAssocs as shipGroupAssoc>
+                                <#assign shipGroupQty = shipGroupAssoc.quantity - shipGroupAssoc.cancelQuantity?default(0)>
                               <#assign shipGroup = shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)>
                               <#assign shipGroupAddress = shipGroup.getRelatedOne("PostalAddress", false)?if_exists>
+                              <#assign itemStatusOkay = (orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED" && (shipGroupAssoc.cancelQuantity?default(0) < shipGroupAssoc.quantity?default(0)) && ("Y" != orderItem.isPromo?if_exists))>
+                              <#assign itemSelectable = (security.hasEntityPermission("ORDERMGR", "_ADMIN", session) && itemStatusOkay) || (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && itemStatusOkay && orderHeader.statusId != "ORDER_SENT")>
                               <tr>
                                   <td class="align-text" colspan="2">
                                       <span class="label">${uiLabelMap.OrderShipGroup}</span>&nbsp;[${shipGroup.shipGroupSeqId}] ${shipGroupAddress.address1?default("${uiLabelMap.OrderNotShipped}")}
                                   </td>
                                   <td align="center">
-                                      <input type="text" name="iqm_${shipGroupAssoc.orderItemSeqId}:${shipGroupAssoc.shipGroupSeqId}" size="6" value="${shipGroupAssoc.quantity?string.number}"/>
+                                      <input type="text" name="iqm_${shipGroupAssoc.orderItemSeqId}:${shipGroupAssoc.shipGroupSeqId}" size="6" value="${shipGroupQty?string.number}"/>
+                                      <#if itemSelectable>
+                                          <input type="checkbox" name="selectedItem" value="${orderItem.orderItemSeqId}" />
+                                      </#if>
                                   </td>
                                   <td colspan="4">&nbsp;</td>
                                   <td>
-                                      <#assign itemStatusOkay = (orderItem.statusId != "ITEM_CANCELLED" && orderItem.statusId != "ITEM_COMPLETED" && (shipGroupAssoc.cancelQuantity?default(0) < shipGroupAssoc.quantity?default(0)) && ("Y" != orderItem.isPromo?if_exists))>
-                                      <#if (security.hasEntityPermission("ORDERMGR", "_ADMIN", session) && itemStatusOkay) || (security.hasEntityPermission("ORDERMGR", "_UPDATE", session) && itemStatusOkay && orderHeader.statusId != "ORDER_SENT")>
-                                          <input type="checkbox" name="selectedItem" value="${orderItem.orderItemSeqId}" />
+                                      <#if itemSelectable>
                                           <a href="javascript:document.updateItemInfo.action='<@ofbizUrl>cancelOrderItem</@ofbizUrl>';document.updateItemInfo.orderItemSeqId.value='${orderItem.orderItemSeqId}';document.updateItemInfo.shipGroupSeqId.value='${shipGroup.shipGroupSeqId}';document.updateItemInfo.submit()" class="buttontext">${uiLabelMap.CommonCancel}</a>
                                       <#else>
                                           &nbsp;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/order/orderitems.ftl Mon Dec 16 22:12:08 2013
@@ -413,7 +413,7 @@ under the License.
                                 <tr<#if itemClass == "1"> class="alternate-row"</#if>>
                                     <td align="right" colspan="2">
                                         <span class="label">${uiLabelMap.OrderAdjustment}</span>&nbsp;${adjustmentType.get("description",locale)}
-                                        ${orderItemAdjustment.get("description",locale)?if_exists}
+                                        ${StringUtil.wrapString(orderItemAdjustment.get("description",locale)?if_exists)}
                                         <#if orderItemAdjustment.comments?has_content>
                                             (${orderItemAdjustment.comments?default("")})
                                         </#if>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java Mon Dec 16 22:12:08 2013
@@ -503,7 +503,6 @@ public class CategoryServices {
         }
     }
 
-    @SuppressWarnings("unchecked")
     public static void toJsonObjectList(List attrList, HttpServletResponse response){
         StringBuilder jsonBuilder = new StringBuilder("[");
         for (Object attrMap : attrList) {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java Mon Dec 16 22:12:08 2013
@@ -84,7 +84,6 @@ public class CatalogUrlSeoTransform impl
         }
     }
     
-    @SuppressWarnings("unchecked")
     public String getStringArg(Map args, String key) {
         Object o = args.get(key);
         if (o instanceof SimpleScalar) {
@@ -96,7 +95,6 @@ public class CatalogUrlSeoTransform impl
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, final Map args)
             throws TemplateModelException, IOException {
         final StringBuilder buf = new StringBuilder();
@@ -669,4 +667,4 @@ public class CatalogUrlSeoTransform impl
         return false;
     }
 
-}
\ No newline at end of file
+}

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/facility/PicklistOptions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/facility/PicklistOptions.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/facility/PicklistOptions.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/webapp/facility/facility/PicklistOptions.ftl Mon Dec 16 22:12:08 2013
@@ -172,7 +172,7 @@ under the License.
             </td>
             <td>
               <#if orderReadyToPickInfoList?has_content>
-                <form method="post" action="<@ofbizUrl>printPickSheets</@ofbizUrl>">
+                <form method="post" action="<@ofbizUrl>printPickSheets</@ofbizUrl>" target="_blank">
                   <input type="hidden" name="printGroupName" value="${groupName?if_exists}"/>
                   <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/>
                   <input type="hidden" name="groupByShippingMethod" value="${requestParameters.groupByShippingMethod?if_exists}"/>
@@ -216,7 +216,7 @@ under the License.
             </td>
             <td>
               <#if (orderReadyToPickInfoListSizeTotal > 0)>
-                <form method="post" action="<@ofbizUrl>printPickSheets</@ofbizUrl>">
+                <form method="post" action="<@ofbizUrl>printPickSheets</@ofbizUrl>" target="_blank">
                   <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/>
                   <span class="label">${uiLabelMap.FormFieldTitle_printPickSheetFirst}</span>
                   <input type="text" size="4" name="maxNumberOfOrdersToPrint" value="20"/>
@@ -294,4 +294,4 @@ under the License.
       </table>
     </div>
   </div>
-</#if>
\ No newline at end of file
+</#if>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/CatalogMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/CatalogMenus.xml?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/CatalogMenus.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/CatalogMenus.xml Mon Dec 16 22:12:08 2013
@@ -550,7 +550,6 @@ under the License.
         <menu-item name="ExpandAll" title="${uiLabelMap.CommonExpandAll}" widget-style="buttontext expand-all">
             <condition>
                 <and>
-                    <not><if-empty field="product"/></not>
                     <if-compare operator="equals" value="EditProduct" field="tabButtonItem"/>
                 </and>
             </condition>
@@ -559,7 +558,6 @@ under the License.
         <menu-item name="CollapseAll" title="${uiLabelMap.CommonCollapseAll}" widget-style="buttontext collapse-all">
             <condition>
                 <and>
-                    <not><if-empty field="product"/></not>
                     <if-compare operator="equals" value="EditProduct" field="tabButtonItem"/>
                 </and>
             </condition>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java Mon Dec 16 22:12:08 2013
@@ -68,7 +68,7 @@ public class ClassLoaderContainer implem
                         try {
                             ClassLoaderContainer.portOffset = Integer.valueOf(argumentVal);
                         } catch (NumberFormatException e) {
-                            e.printStackTrace();
+                            Debug.logError(e, module);
                         }
                     }
                 }
@@ -82,6 +82,7 @@ public class ClassLoaderContainer implem
     /**
      * @see org.ofbiz.base.container.Container#start()
      */
+    @Override
     public boolean start() throws ContainerException {
         return true;
     }
@@ -89,9 +90,11 @@ public class ClassLoaderContainer implem
     /**
      * @see org.ofbiz.base.container.Container#stop()
      */
+    @Override
     public void stop() throws ContainerException {
     }
 
+    @Override
     public String getName() {
         return name;
     }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Mon Dec 16 22:12:08 2013
@@ -27,9 +27,8 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
 import org.apache.log4j.Appender;
-
+import org.apache.log4j.Logger;
 import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.start.Config;
 import org.ofbiz.base.start.StartupException;
@@ -58,6 +57,7 @@ public class ContainerLoader implements
     /**
      * @see org.ofbiz.base.start.StartupLoader#load(Config, String[])
      */
+    @Override
     public synchronized void load(Config config, String args[]) throws StartupException {
         if (this.loaded || this.unloading) {
             return;
@@ -223,6 +223,7 @@ public class ContainerLoader implements
     /**
      * @see org.ofbiz.base.start.StartupLoader#start()
      */
+    @Override
     public synchronized void start() throws StartupException {
         if (!this.loaded || this.unloading) {
             throw new IllegalStateException("start() called on unloaded containers");
@@ -248,6 +249,7 @@ public class ContainerLoader implements
     /**
      * @see org.ofbiz.base.start.StartupLoader#unload()
      */
+    @Override
     public void unload() throws StartupException {
         if (!this.unloading) {
             this.unloading = true;
@@ -268,6 +270,7 @@ public class ContainerLoader implements
                     Debug.logInfo("Stopped container " + container.getName(), module);
                 }
             }
+            @SuppressWarnings("unchecked")
             Enumeration<Appender> en = Logger.getRootLogger().getAllAppenders();
             while (en.hasMoreElements()) {
                 Appender appender = en.nextElement();

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/test/AssertTests.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/test/AssertTests.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/test/AssertTests.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/test/AssertTests.java Mon Dec 16 22:12:08 2013
@@ -35,7 +35,6 @@ public class AssertTests extends TestCas
         super(name);
     }
 
-    @SuppressWarnings("unchecked")
     public void testAssert(){
         Object testObject = new Object();
 

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonEvents.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonEvents.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonEvents.java Mon Dec 16 22:12:08 2013
@@ -465,9 +465,9 @@ public class CommonEvents {
             response.setContentType("image/jpeg");
             ImageIO.write(bufferedImage, "jpg", response.getOutputStream());
             HttpSession session = request.getSession();
-            Map captchaCodeMap = (Map)session.getAttribute("_CAPTCHA_CODE_");
+            Map<String, String> captchaCodeMap = UtilGenerics.checkMap(session.getAttribute("_CAPTCHA_CODE_"));
             if (captchaCodeMap == null) {
-                captchaCodeMap = new HashMap();
+                captchaCodeMap = new HashMap<String, String>();
                 session.setAttribute("_CAPTCHA_CODE_", captchaCodeMap);
             }
             captchaCodeMap.put(captchaCodeId, captchaCode);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/login/LoginServices.java Mon Dec 16 22:12:08 2013
@@ -729,7 +729,7 @@ public class LoginServices {
             //    Debug.logWarning(e, "", module);
             //}
 
-            if (loggedInUserLogin != null) {
+            if (!loggedInUserLogin.isEmpty()) {
                 // security check: userLogin partyId must equal partyId, or must have PARTYMGR_CREATE permission
                 if (!partyId.equals(loggedInUserLogin.getString("partyId"))) {
                     errMsg = UtilProperties.getMessage(resource,"loginservices.party_with_party_id_exists_not_permission_create_user_login", locale);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java Mon Dec 16 22:12:08 2013
@@ -241,18 +241,12 @@ public final class ModelDataFileReader {
             Element fieldElement = (Element) fList.item(i);
             ModelField modelField = createModelField(fieldElement);
 
-            // if the position is not specified, assume the start position based on last
-            // entry
+            // if the position is not specified, assume the start position based on last entry
             if ((i > 0) && (modelField.position == -1)) {
                 modelField.position = priorEnd;
             }
             priorEnd = modelField.position + modelField.length;
-
-            if (modelField != null) {
-                record.fields.add(modelField);
-            } else {
-                Debug.logWarning("[ModelDataFileReader.createModelRecord] Weird, modelField was null", module);
-            }
+            record.fields.add(modelField);
         }
 
         return record;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericEntity.java Mon Dec 16 22:12:08 2013
@@ -154,8 +154,10 @@ public class GenericEntity implements Ma
 
     protected void assertIsMutable() {
         if (!this.mutable) {
-            Debug.logError(new IllegalStateException("This object has been flagged as immutable (unchangeable), probably because it came from an Entity Engine cache. Cannot modify an immutable entity object."), module);
-            throw new IllegalStateException("This object has been flagged as immutable (unchangeable), probably because it came from an Entity Engine cache. Cannot modify an immutable entity object.");
+            String msg = "This object has been flagged as immutable (unchangeable), probably because it came from an Entity Engine cache. Cannot modify an immutable entity object. Use the clone method to create a mutable copy of this object.";
+            IllegalStateException toBeThrown = new IllegalStateException(msg);
+            Debug.logError(toBeThrown, module);
+            throw toBeThrown;
         }
     }
 

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java Mon Dec 16 22:12:08 2013
@@ -102,7 +102,6 @@ public abstract class Compare {
 
     private static final class CompareContains extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             // The type parameter is ignored when using the contains operator, so no conversions will be performed.

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Mon Dec 16 22:12:08 2013
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpSession;
 
 import javolution.util.FastMap;
 
+import org.ofbiz.base.container.ClassLoaderContainer;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.SSLUtil;
 import org.ofbiz.base.util.StringUtil;
@@ -1028,6 +1029,15 @@ public class RequestHandler {
         String httpServer = UtilProperties.getPropertyValue("url.properties", "force.http.host");
         boolean useHttps = UtilProperties.propertyValueEqualsIgnoreCase("url.properties", "port.https.enabled", "Y");
 
+        if (ClassLoaderContainer.portOffset != 0) {
+            Integer httpPortValue = Integer.valueOf(httpPort);
+            httpPortValue += ClassLoaderContainer.portOffset;
+            httpPort = httpPortValue.toString();
+            Integer httpsPortValue = Integer.valueOf(httpsPort);
+            httpsPortValue += ClassLoaderContainer.portOffset;
+            httpsPort = httpsPortValue.toString();
+        }
+        
         StringBuilder newURL = new StringBuilder();
 
         if (secure && useHttps) {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java Mon Dec 16 22:12:08 2013
@@ -20,6 +20,7 @@ package org.ofbiz.webapp.website;
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.ofbiz.base.container.ClassLoaderContainer;
 import org.ofbiz.base.lang.ThreadSafe;
 import org.ofbiz.base.util.Assert;
 import org.ofbiz.base.util.UtilMisc;
@@ -98,6 +99,16 @@ public final class WebSiteProperties {
             if (httpsHost.isEmpty()) {
                 httpsHost = request.getServerName();
             }
+            
+            if (ClassLoaderContainer.portOffset != 0) {
+                Integer httpPortValue = Integer.valueOf(httpPort);
+                httpPortValue += ClassLoaderContainer.portOffset;
+                httpPort = httpPortValue.toString();
+                Integer httpsPortValue = Integer.valueOf(httpsPort);
+                httpsPortValue += ClassLoaderContainer.portOffset;
+                httpsPort = httpsPortValue.toString();
+            }                
+            
             webSiteProps = new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps);
             request.setAttribute("_WEBSITE_PROPS_", webSiteProps);
         }
@@ -121,6 +132,16 @@ public final class WebSiteProperties {
         String httpsPort = (webSiteValue.get("httpsPort") != null) ? webSiteValue.getString("httpsPort") : defaults.getHttpsPort();
         String httpsHost = (webSiteValue.get("httpsHost") != null) ? webSiteValue.getString("httpsHost") : defaults.getHttpsHost();
         boolean enableHttps = (webSiteValue.get("enableHttps") != null) ? webSiteValue.getBoolean("enableHttps") : defaults.getEnableHttps();
+
+        if (ClassLoaderContainer.portOffset != 0) {
+            Integer httpPortValue = Integer.valueOf(httpPort);
+            httpPortValue += ClassLoaderContainer.portOffset;
+            httpPort = httpPortValue.toString();
+            Integer httpsPortValue = Integer.valueOf(httpsPort);
+            httpsPortValue += ClassLoaderContainer.portOffset;
+            httpsPort = httpsPortValue.toString();
+        }                
+        
         return new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps);
     }
 

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Mon Dec 16 22:12:08 2013
@@ -43,8 +43,8 @@ import org.ofbiz.base.util.GeneralExcept
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.cache.UtilCache;
 import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.config.model.DelegatorElement;
 import org.ofbiz.entity.config.EntityConfigUtil;
+import org.ofbiz.entity.config.model.DelegatorElement;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelReader;
 import org.ofbiz.service.DispatchContext;
@@ -144,7 +144,7 @@ public class ArtifactInfoFactory {
 
     public void prepareAll() throws GeneralException {
         Debug.logInfo("Loading artifact info objects...", module);
-        List<Future<Void>> futures = new ArrayList();
+        List<Future<Void>> futures = new ArrayList<Future<Void>>();
         Set<String> entityNames = this.getEntityModelReader().getEntityNames();
         for (String entityName: entityNames) {
             this.getEntityArtifactInfo(entityName);
@@ -158,7 +158,7 @@ public class ArtifactInfoFactory {
 
         Collection<ComponentConfig> componentConfigs = ComponentConfig.getAllComponents();
         ExecutionPool.getAllFutures(futures);
-        futures = new ArrayList();
+        futures = new ArrayList<Future<Void>>();
         for (ComponentConfig componentConfig: componentConfigs) {
             futures.add(ExecutionPool.GLOBAL_EXECUTOR.submit(prepareTaskForComponentAnalysis(componentConfig)));
         }
@@ -382,8 +382,10 @@ public class ArtifactInfoFactory {
     }
 
     // private methods
+    @SuppressWarnings("unchecked")
     private Callable<Void> prepareTaskForServiceAnalysis(final String serviceName) {
         return new Callable() {
+            @Override
             public Callable<Void> call() throws Exception {
                 try {
                     getServiceArtifactInfo(serviceName);
@@ -395,8 +397,10 @@ public class ArtifactInfoFactory {
         };
     }
 
+    @SuppressWarnings("unchecked")
     private Callable<Void> prepareTaskForComponentAnalysis(final ComponentConfig componentConfig) {
         return new Callable() {
+            @Override
             public Callable<Void> call() throws Exception {
                 String componentName = componentConfig.getGlobalName();
                 String rootComponentPath = componentConfig.getRootLocation();

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Dec 16 22:12:08 2013
@@ -427,6 +427,7 @@ public class WidgetWorker {
             }
         }
 
+        @SuppressWarnings("unchecked")
         public Map<String, String> getParametersMap(Map<String, Object> context, String defaultServiceName) {
             Map<String, String> autServiceParams = FastMap.newInstance();
             LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher");
@@ -492,6 +493,7 @@ public class WidgetWorker {
             }
         }
 
+        @SuppressWarnings("unchecked")
         public Map<String, String> getParametersMap(Map<String, Object> context, String defaultEntityName) {
             Map<String, String> autEntityParams = FastMap.newInstance();
             Delegator delegator = (Delegator) context.get("delegator");

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java Mon Dec 16 22:12:08 2013
@@ -132,7 +132,7 @@ public class ScreenFactory {
             }
         }
 
-        if (modelScreenMap == null) {
+        if (modelScreenMap.isEmpty()) {
             throw new IllegalArgumentException("Could not find screen file with name [" + resourceName + "]");
         }
         return modelScreenMap;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Dec 16 22:12:08 2013
@@ -743,8 +743,7 @@ Parameter: lastViewName, String, optiona
         <li class="${paginateFirstStyle}<#if viewIndex gt 0>"><a href="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxFirstUrl}')<#else>${firstUrl}</#if>">${paginateFirstLabel}</a><#else>-disabled"><span>${paginateFirstLabel}</span></#if></li>
         <li class="${paginatePreviousStyle}<#if viewIndex gt 0>"><a href="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxPreviousUrl}')<#else>${previousUrl}</#if>">${paginatePreviousLabel}</a><#else>-disabled"><span>${paginatePreviousLabel}</span></#if></li>
         <#if listSize gt 0 && javaScriptEnabled><li class="nav-page-select">${pageLabel} <select name="page" size="1" onchange="<#if ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxSelectUrl}')<#else>location.href='${selectUrl}'+this.value;</#if>"><#rt/>
-          <#assign x=listSize/viewSize?floor>
-          <#if listSize gt (viewIndex*viewSize)><#assign x=x+1></#if>
+          <#assign x=(listSize/viewSize)?ceiling>
             <#list 1..x as i>
               <#if i == (viewIndex+1)><option selected="selected" value="<#else><option value="</#if>${i-1}">${i}</option>
             </#list>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/LICENSE?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/LICENSE (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/LICENSE Mon Dec 16 22:12:08 2013
@@ -592,7 +592,7 @@ specialpurpose/pos/lib/XuiOptional-v3.2r
      "MPL", "NPL" or any confusingly similar phrase do not appear in your
      license (except to note that your license differs from this License)
      and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from thella Public License and
+     contains terms which differ from the Mozilla Public License and
      Netscape Public License. (Filling in the name of the Initial
      Developer, Original Code or Contributor in the notice described in
      Exhibit A shall not of themselves be deemed to be modifications of

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java Mon Dec 16 22:12:08 2013
@@ -1311,9 +1311,6 @@ public class EbayStore {
                 storeType.setCustomHeader((String)context.get("storeCustomHeader"));
                 storeType.setCustomHeaderLayout(StoreCustomHeaderLayoutCodeType.valueOf((String)context.get("storeCustomHeaderLayout")));
 
-                if ( storeType == null )
-                      throw new SdkException("StoreType property is not set.");
-
                 req.setStore(storeType);
                 resp = (SetStoreResponseType) call.execute(req);
 
@@ -1885,8 +1882,11 @@ public class EbayStore {
             final ItemType[] activeItems = tempActiveItems;
             // Display active items in table.
             AbstractTableModel dataModel = new AbstractTableModel() {
+                @Override
                 public int getColumnCount() { return 0; }
+                @Override
                 public int getRowCount() { return activeItems == null ? 0 : activeItems.length;}
+                @Override
                 public Map<String, Object> getValueAt(int row, int col) {
                     ItemType item = activeItems[row];
                     return itemToColumns(item);
@@ -1900,8 +1900,11 @@ public class EbayStore {
             final ItemType[] scheItems = tempItems;
             // Display Scheduled items in table.
             dataModel = new AbstractTableModel() {
+                @Override
                 public int getColumnCount() { return 0; }
+                @Override
                 public int getRowCount() { return scheItems == null ? 0 : scheItems.length;}
+                @Override
                 public Map<String, Object> getValueAt(int row, int col) {
                     ItemType item = scheItems[row];
                     return schItemToColumns(item);
@@ -1923,8 +1926,11 @@ public class EbayStore {
             final ItemType[] unSoldItems = tempUnSoldItems;
             // Display unsold items in table.
             dataModel = new AbstractTableModel() {
+                @Override
                 public int getColumnCount() { return 0; }
+                @Override
                 public int getRowCount() { return unSoldItems == null ? 0 : unSoldItems.length;}
+                @Override
                 public Map<String, Object> getValueAt(int row, int col) {
                     ItemType item = unSoldItems[row];
                     return unsoldItemToColumns(item);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java Mon Dec 16 22:12:08 2013
@@ -226,7 +226,7 @@ public class ScrumServices {
 
                             List<GenericValue> workEffortList = delegator.findList("WorkEffort", EntityCondition.makeCondition(exprsAnd, EntityOperator.AND), null, null, null, false);
                             if (UtilValidate.isEmpty(workeffContentList) && UtilValidate.isNotEmpty(workEffortList)) {
-                                Map inputMap = FastMap.newInstance();
+                                Map<String, Object> inputMap = FastMap.newInstance();
                                 inputMap.put("taskId", taskId);
                                 inputMap.put("user", user);
                                 inputMap.put("revisionNumber", Integer.toString(i));

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/appbar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/appbar.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/appbar.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/appbar.ftl Mon Dec 16 22:12:08 2013
@@ -20,7 +20,7 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
 
 <#if userLogin?has_content>
         <div id="main-nav">
@@ -30,29 +30,19 @@ under the License.
                 <li><h4>${uiLabelMap.CommonPrimaryApps}</h4></li>
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session)>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                  <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                    <!-- do not display this component-->
-                  <#else>
-                    <li><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                  </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
                 </ul>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/secondary-appbar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/secondary-appbar.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/secondary-appbar.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bizznesstime/includes/secondary-appbar.ftl Mon Dec 16 22:12:08 2013
@@ -22,33 +22,23 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#if userLogin?has_content>
   <ul>
     <li><h4>${uiLabelMap.CommonSecondaryApps}</h4></li>
     <#list displayApps as display>
       <#assign thisApp = display.getContextRoot()>
-      <#assign permission = true>
       <#assign selected = false>
-      <#assign permissions = display.getBasePermission()>
-      <#list permissions as perm>
-        <#if perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session)>
-          <#-- User must have ALL permissions in the base-permission list -->
-          <#assign permission = false>
-        </#if>
-      </#list>
-      <#if permission == true>
-        <#if thisApp == contextPath || contextPath + "/" == thisApp>
-          <#assign selected = true>
-        </#if>
-        <#assign thisApp = StringUtil.wrapString(thisApp)>
-        <#assign thisURL = thisApp>
-        <#if thisApp != "/">
-          <#assign thisURL = thisURL + "/control/main">
-        </#if>
-        <li><a<#if selected> class="current-section"</#if> href="${thisURL}${externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}"> ${display.title}</#if></a></li>
+      <#if thisApp == contextPath || contextPath + "/" == thisApp>
+        <#assign selected = true>
       </#if>
+      <#assign thisApp = StringUtil.wrapString(thisApp)>
+      <#assign thisURL = thisApp>
+      <#if thisApp != "/">
+        <#assign thisURL = thisURL + "/control/main">
+      </#if>
+      <li><a<#if selected> class="current-section"</#if> href="${thisURL}${externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}"> ${display.title}</#if></a></li>
     </#list>
   </ul>
 </#if>
\ No newline at end of file

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/appbarOpen.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/appbarOpen.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/bluelight/includes/appbarOpen.ftl Mon Dec 16 22:12:08 2013
@@ -20,8 +20,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
-<#assign displaySecondaryApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -41,29 +41,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -71,29 +61,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/appbarOpen.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/appbarOpen.ftl?rev=1551376&r1=1551375&r2=1551376&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/appbarOpen.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/themes/droppingcrumbs/includes/appbarOpen.ftl Mon Dec 16 22:12:08 2013
@@ -21,8 +21,8 @@ under the License.
 <#if (externalLoginKey)?exists><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey?if_exists></#if>
 <#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")>
 <#assign contextPath = request.getContextPath()>
-<#assign displayApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "main")>
-<#assign displaySecondaryApps = Static["org.ofbiz.base.component.ComponentConfig"].getAppBarWebInfos(ofbizServerName, "secondary")>
+<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")>
+<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")>
 
 <#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>
 <#if appModelMenu.getModelMenuItemByName(headerItem)?exists>
@@ -41,29 +41,19 @@ under the License.
             <#-- Primary Applications -->
             <#list displayApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                    <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
            </ul></li>
@@ -71,29 +61,19 @@ under the License.
             <#-- Secondary Applications -->
             <#list displaySecondaryApps as display>
               <#assign thisApp = display.getContextRoot()>
-              <#assign permission = true>
               <#assign selected = false>
-              <#assign permissions = display.getBasePermission()>
-              <#list permissions as perm>
-                <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))>
-                  <#-- User must have ALL permissions in the base-permission list -->
-                  <#assign permission = false>
-                </#if>
-              </#list>
-              <#if permission == true>
-                <#if thisApp == contextPath || contextPath + "/" == thisApp>
-                  <#assign selected = true>
-                </#if>
-                <#assign thisApp = StringUtil.wrapString(thisApp)>
-                <#assign thisURL = thisApp>
-                <#if thisApp != "/">
-                  <#assign thisURL = thisURL + "/control/main">
-                </#if>
-                <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
-                  <!-- do not display this component-->
-                <#else>
-                  <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
-                </#if>
+              <#if thisApp == contextPath || contextPath + "/" == thisApp>
+                <#assign selected = true>
+              </#if>
+              <#assign thisApp = StringUtil.wrapString(thisApp)>
+              <#assign thisURL = thisApp>
+              <#if thisApp != "/">
+                <#assign thisURL = thisURL + "/control/main">
+              </#if>
+              <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab>
+                <!-- do not display this component-->
+              <#else>
+                <li <#if selected>class="selected"</#if>><a href="${thisURL + externalKeyParam}" <#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li>
               </#if>
             </#list>
             </ul>