Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Sat Mar 15 22:22:39 2014 @@ -359,9 +359,9 @@ ${virtualJavaScript?if_exists} </#if> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span> <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> - <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> - <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> - <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons} ${uiLabelMap.ProductPersons}.</#if> + <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed/></span></#if> + <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.</#if> </#if> </b> </div> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/RequirementForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/RequirementForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/RequirementForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/widget/ordermgr/RequirementForms.xml Sat Mar 15 22:22:39 2014 @@ -64,8 +64,8 @@ under the License. </service> </actions> <row-actions> - <set field="lookupProductId" value="${bsh: (productId == null? "_NA_": productId);}" type="String"/> - <set field="lookupFacilityId" value="${bsh: (facilityIdId == null? "_NA_": facilityId);}" type="String"/> + <set field="lookupProductId" value="${groovy: productId == null? '_NA_' : productId}" type="String"/> + <set field="lookupFacilityId" value="${groovy: facilityId == null? '_NA_' : facilityId}" type="String"/> <service service-name="getInventoryAvailableByFacility" result-map="resultQoh"> <field-map field-name="productId" from-field="lookupProductId"/> <field-map field-name="facilityId" from-field="lookupFacilityId"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/LookupForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/LookupForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/party/widget/partymgr/LookupForms.xml Sat Mar 15 22:22:39 2014 @@ -430,7 +430,7 @@ under the License. <field name="roleTypeId"><hidden value="INTERNAL_ORGANIZATIO"/></field> <field name="partyId"><text-find/></field> <field name="groupName"><text-find/></field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit button-type="button"/></field> </form> </forms> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Sat Mar 15 22:22:39 2014 @@ -547,6 +547,7 @@ under the License. <!-- update the order item status --> <set field="orderItem.statusId" value="ITEM_APPROVED"/> <set-service-fields service-name="changeOrderItemStatus" map="orderItem" to-map="orderItemCtx"/> + <set field="orderItemCtx.fromStatusId" value="ITEM_COMPLETED"/> <call-service service-name="changeOrderItemStatus" in-map-name="orderItemCtx"/> <get-related-one value-field="orderItem" relation-name="OrderHeader" to-value-field="orderHeader"/> <!-- cancel the invoice --> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/servicedef/services_view.xml Sat Mar 15 22:22:39 2014 @@ -90,8 +90,8 @@ under the License. </service> <service name="getSuppliersForProduct" engine="java" location="org.ofbiz.product.supplier.SupplierProductServices" invoke="getSuppliersForProduct"> - <description>Finds a list of SupplierProduct entities based on either a product or, if not provided, at least a productId. - If partyId and currencyUomId are given, they are used to filter the list down. Note that productId is REQUIRED, even if you are passing in a product entity.</description> + <description>Finds a list of SupplierProduct entity values based on a productId. + If other parameters are given, they are used to filter the list down.</description> <attribute name="productId" type="String" mode="IN" optional="false"/> <attribute name="partyId" type="String" mode="IN" optional="true"/> <attribute name="currencyUomId" type="String" mode="IN" optional="true"/> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Sat Mar 15 22:22:39 2014 @@ -21,6 +21,7 @@ package org.ofbiz.product.inventory; import java.math.BigDecimal; import java.math.MathContext; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -446,7 +447,7 @@ public class InventoryServices { // get the incomming shipment information for the item List<GenericValue> shipmentAndItems = null; try { - List<EntityExpr> exprs = FastList.newInstance(); + List<EntityExpr> exprs = new ArrayList<EntityExpr>(); exprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, inventoryItem.get("productId"))); exprs.add(EntityCondition.makeCondition("destinationFacilityId", EntityOperator.EQUALS, inventoryItem.get("facilityId"))); exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_DELIVERED")); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/product/ProductPromoContentWrapper.java Sat Mar 15 22:22:39 2014 @@ -21,22 +21,22 @@ package org.ofbiz.product.product; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; +import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; -import javolution.util.FastList; import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; +import org.ofbiz.base.util.GeneralRuntimeException; import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.base.util.GeneralRuntimeException; import org.ofbiz.base.util.cache.UtilCache; import org.ofbiz.content.content.ContentWorker; import org.ofbiz.content.content.ContentWrapper; @@ -168,7 +168,7 @@ public class ProductPromoContentWrapper } } - List<EntityExpr> exprs = FastList.newInstance(); + List<EntityExpr> exprs = new ArrayList<EntityExpr>(); exprs.add(EntityCondition.makeCondition("productPromoId", EntityOperator.EQUALS, productPromoId)); exprs.add(EntityCondition.makeCondition("productPromoContentTypeId", EntityOperator.EQUALS, productPromoContentTypeId)); List<String> orderBy = UtilMisc.toList("-fromDate"); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Sat Mar 15 22:22:39 2014 @@ -82,6 +82,9 @@ public class SupplierProductServices { } } + // filter the list by date + supplierProducts = EntityUtil.filterByDate(supplierProducts, UtilDateTime.nowTimestamp(), "availableFromDate", "availableThruDate", true); + // filter the list down by the partyId if one is provided if (partyId != null) { supplierProducts = EntityUtil.filterByAnd(supplierProducts, UtilMisc.toMap("partyId", partyId)); @@ -103,9 +106,6 @@ public class SupplierProductServices { supplierProducts = EntityUtil.filterByAnd(supplierProducts, UtilMisc.toMap("canDropShip", canDropShip)); } - // filter the list down again by date before returning it - supplierProducts = EntityUtil.filterByDate(supplierProducts, UtilDateTime.nowTimestamp(), "availableFromDate", "availableThruDate", true); - //sort resulting list of SupplierProduct entities by price in ASCENDING order supplierProducts = EntityUtil.orderBy(supplierProducts, UtilMisc.toList("lastPrice ASC")); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/FieldLookupForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/FieldLookupForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/catalog/FieldLookupForms.xml Sat Mar 15 22:22:39 2014 @@ -40,7 +40,7 @@ under the License. </entity-options> </drop-down> </field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <!-- NOTE DEJ20070829 not sure why this is here, but it doesn't seem applicable for a general product lookup, also doesn't handle case where isVariant is null <field name="isVariant"><hidden value="N"/></field> --> <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/facility/ShipmentGatewayConfigForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/facility/ShipmentGatewayConfigForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/facility/ShipmentGatewayConfigForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/widget/facility/ShipmentGatewayConfigForms.xml Sat Mar 15 22:22:39 2014 @@ -31,7 +31,7 @@ under the License. </drop-down> </field> <field name="performSearch"><hidden value="Y"/></field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"> <submit button-type="button"/> </field> @@ -307,7 +307,7 @@ under the License. <field name="shipmentGatewayConfTypeId" title="${uiLabelMap.FacilityShipmentGatewayConfigTypeId}"><text-find ignore-case="true"/></field> <field name="description" title="${uiLabelMap.FacilityShipmentGatewayConfigDescription}"><text-find ignore-case="true"/></field> <field name="performSearch"><hidden value="Y"/></field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"> <submit button-type="button"/> </field> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/build.xml Sat Mar 15 22:22:39 2014 @@ -421,15 +421,17 @@ under the License. </java> </target> <target name="start-batch" - description="Start OFBiz as a separate process"> + description="Start OFBiz as a separate process. Use -Dportoffset=portNumber to shift all ports with the portNumber value."> <java jar="ofbiz.jar" fork="true" spawn="true"> <jvmarg value="${memory.initial.param}"/> <jvmarg value="${memory.max.param}"/> <jvmarg value="${memory.maxpermsize.param}"/> + <arg value="start-batch"/> + <arg value="-portoffset=${portoffset}"/> </java> </target> <target name="start-debug" - description="Start OFBiz in debugging mode. It uses the 8091 port by default"> + description="Start OFBiz in debugging mode. It uses the 8091 port by default. Use -Dportoffset=portNumber to shift all ports with the portNumber value."> <java jar="ofbiz.jar" fork="true"> <jvmarg value="${memory.initial.param}"/> <jvmarg value="${memory.max.param}"/> @@ -438,6 +440,8 @@ under the License. <jvmarg value="-Djava.compiler=NONE"/> <jvmarg value="-Xdebug"/> <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091"/> + <arg value="start-debug"/> + <arg value="-portoffset=${portoffset}"/> </java> </target> <target name="start-pos" @@ -447,7 +451,7 @@ under the License. <jvmarg value="${memory.max.param}"/> <jvmarg value="${memory.maxpermsize.param}"/> <arg value="pos"/> - <arg value="-portoffset=${portoffset}"/> + <arg value="-portoffset=${portoffset}"/><!-- Not sure this makes sense and is useful at all --> </java> </target> <target name="start-both" @@ -461,15 +465,17 @@ under the License. </java> </target> <target name="stop" - description="Stop OFBiz"> + description="Stop OFBiz. Use -Dportoffset=portNumber to shift all ports with the portNumber value."> <java jar="ofbiz.jar" fork="true"> <arg value="-shutdown"/> + <arg value="-portoffset=${portoffset}"/> </java> </target> <target name="status" - description="Display status of OFBiz"> + description="Display status of OFBiz. Use -Dportoffset=portNumber to shift all ports with the portNumber value."> <java jar="ofbiz.jar" fork="true"> <arg value="-status"/> + <arg value="-portoffset=${portoffset}"/> </java> </target> @@ -1243,6 +1249,7 @@ under the License. <mkdir dir="${basedir}/hot-deploy/${component-name}/lib"/> <mkdir dir="${basedir}/hot-deploy/${component-name}/patches"/> <mkdir dir="${basedir}/hot-deploy/${component-name}/patches/staging"/> + <mkdir dir="${basedir}/hot-deploy/${component-name}/patches/qa"/> <mkdir dir="${basedir}/hot-deploy/${component-name}/patches/production"/> <mkdir dir="${basedir}/hot-deploy/${component-name}/script"/> <mkdir dir="${basedir}/hot-deploy/${component-name}/servicedef"/> 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=1577942&r1=1577941&r2=1577942&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 Sat Mar 15 22:22:39 2014 @@ -301,7 +301,7 @@ public class GenericEntity implements Ma */ public void removedFromDatasource() { assertIsMutable(); - this.hasChanged(); + this.clearChanged(); this.setImmutable(); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java Sat Mar 15 22:22:39 2014 @@ -95,7 +95,9 @@ public class EntityTestSuite extends Ent */ public void testMakeValue() throws Exception { // This method call directly stores a new value into the entity engine - delegator.create("TestingType", "testingTypeId", "TEST-1", "description", "Testing Type #1"); + GenericValue createdValue = delegator.create("TestingType", "testingTypeId", "TEST-1", "description", "Testing Type #1"); + assertTrue("Created value is mutable", createdValue.isMutable()); + assertFalse("Observable has not changed", createdValue.hasChanged()); // This sequence creates the GenericValue entities first, puts them in a List, then calls the delegator to store them all List<GenericValue> newValues = new LinkedList<GenericValue>(); @@ -142,6 +144,7 @@ public class EntityTestSuite extends Ent GenericValue testValue = delegator.findOne("TestingType", false, "testingTypeId", "TEST-4"); assertEquals("Retrieved value has the correct description", "Testing Type #4", testValue.getString("description")); testValue.remove(); + assertFalse("Observable has not changed", testValue.hasChanged()); // Test immutable try { testValue.put("description", "New Testing Type #4"); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Sat Mar 15 22:22:39 2014 @@ -22,6 +22,7 @@ import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.text.NumberFormat; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; @@ -312,7 +313,7 @@ public class EntityDataLoadContainer imp List<String> loadComponents = FastList.newInstance(); if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId()) && "Y".equals(UtilProperties.getPropertyValue("general.properties", "multitenant"))) { try { - List<EntityExpr> exprs = FastList.newInstance(); + List<EntityExpr> exprs = new ArrayList<EntityExpr>(); exprs.add(EntityCondition.makeCondition("rootLocation", EntityOperator.NOT_LIKE, "%hot-deploy%")); EntityCondition cond = EntityCondition.makeCondition(exprs); List<GenericValue> components = delegator.findList("Component", cond , null, UtilMisc.toList("lastUpdatedStamp"), null, false); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.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/CompareCondition.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/conditional/CompareCondition.java Sat Mar 15 22:22:39 2014 @@ -20,6 +20,7 @@ package org.ofbiz.minilang.method.condit import java.util.Collections; import java.util.List; +import java.util.Locale; import org.ofbiz.base.util.ObjectType; import org.ofbiz.base.util.UtilValidate; @@ -113,7 +114,8 @@ public final class CompareCondition exte String value = valueFse.expandString(methodContext.getEnvMap()); String format = formatFse.expandString(methodContext.getEnvMap()); try { - return this.compare.doCompare(fieldVal, value, targetClass, methodContext.getLocale(), methodContext.getTimeZone(), format); + // We use en locale here so constant (literal) values are converted properly. + return this.compare.doCompare(fieldVal, value, targetClass, Locale.ENGLISH, methodContext.getTimeZone(), format); } catch (Exception e) { simpleMethod.addErrorMessage(methodContext, e.getMessage()); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java Sat Mar 15 22:22:39 2014 @@ -20,6 +20,7 @@ package org.ofbiz.minilang.method.envops import java.util.HashMap; import java.util.LinkedList; +import java.util.Locale; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.ObjectType; @@ -133,6 +134,7 @@ public final class SetOperation extends @Override public boolean exec(MethodContext methodContext) throws MiniLangException { + boolean isConstant = false; Object newValue = null; if (this.scriptlet != null) { try { @@ -146,10 +148,12 @@ public final class SetOperation extends Debug.logVerbose("In screen getting value for field from [" + this.fromFma.toString() + "]: " + newValue, module); } else if (!this.valueFse.isEmpty()) { newValue = this.valueFse.expand(methodContext.getEnvMap()); + isConstant = true; } // If newValue is still empty, use the default value if (ObjectType.isEmpty(newValue) && !this.defaultFse.isEmpty()) { newValue = this.defaultFse.expand(methodContext.getEnvMap()); + isConstant = true; } if (!setIfNull && newValue == null) { if (Debug.verboseOn()) @@ -176,7 +180,12 @@ public final class SetOperation extends if (targetClass == null) { targetClass = MiniLangUtil.getObjectClassForConversion(newValue); } - newValue = MiniLangUtil.convertType(newValue, targetClass, methodContext.getLocale(), methodContext.getTimeZone(), format); + if (isConstant) { + // We use en locale here so constant (literal) values are converted properly. + newValue = MiniLangUtil.convertType(newValue, targetClass, Locale.ENGLISH, methodContext.getTimeZone(), format); + } else { + newValue = MiniLangUtil.convertType(newValue, targetClass, methodContext.getLocale(), methodContext.getTimeZone(), format); + } } catch (Exception e) { String errMsg = "Could not convert field value for the field: [" + this.fieldFma.toString() + "] to the [" + this.type + "] type for the value [" + newValue + "]: " + e.getMessage(); Debug.logWarning(e, errMsg, module); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java Sat Mar 15 22:22:39 2014 @@ -40,21 +40,19 @@ public class Config { if (command == null || command.trim().length() == 0) { command = "start"; } - // strip off the leading dash - if (command.startsWith("-")) { - command = command.substring(1); - } - // shutdown & status hack - if (command.equalsIgnoreCase("shutdown")) { - command = "start"; - } else if (command.equalsIgnoreCase("status")) { - command = "start"; - } return "org/ofbiz/base/start/" + command + ".properties"; } public static Config getInstance(String[] args) throws IOException { String firstArg = args.length > 0 ? args[0] : ""; + // Needed when portoffset is used with these commands, start.properties fits for all of them + if ("start-batch".equalsIgnoreCase(firstArg) + || "start-debug".equalsIgnoreCase(firstArg) + || "stop".equalsIgnoreCase(firstArg) + || "-shutdown".equalsIgnoreCase(firstArg) // shutdown & status hack (was pre-existing to portoffset introduction, also useful with it) + || "-status".equalsIgnoreCase(firstArg)) { + firstArg = "start"; + } String configFileName = getConfigFileName(firstArg); Config result = new Config(); result.readConfig(configFileName, args); @@ -354,14 +352,15 @@ public class Config { adminPort = Integer.parseInt(adminPortStr); if (args.length > 0) { for (String arg : args) { - if (arg.toLowerCase().contains("portoffset=")) { + if (arg.toLowerCase().contains("portoffset=") && !arg.toLowerCase().contains("${portoffset}")) { adminPort = adminPort != 0 ? adminPort : 10523; // This is necessary because the ASF machines don't allow ports 1 to 3, see INFRA-6790 adminPort += Integer.parseInt(arg.split("=")[1]); } } } } catch (Exception e) { - adminPort = 0; + System.out.println("Error while parsing admin port number (so default to 10523) = " + e); + adminPort = 10523; } // set the Derby system home Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Start.java Sat Mar 15 22:22:39 2014 @@ -87,7 +87,9 @@ public final class Start { } else if (arg.equals("-shutdown")) { command = checkCommand(command, Command.SHUTDOWN); } else if (arg.startsWith("-")) { - command = checkCommand(command, Command.COMMAND); + if (!arg.contains("portoffset")) { + command = checkCommand(command, Command.COMMAND); + } loaderArgs.add(arg.substring(1)); } else { command = checkCommand(command, Command.COMMAND); @@ -189,6 +191,17 @@ public final class Start { // parse the startup arguments if (args.length > 1) { this.loaderArgs.addAll(Arrays.asList(args).subList(1, args.length)); + // Needed when portoffset is used with these commands + try { + if ("status".equals(args[0])) { + System.out.println("Current Status : " + instance.status()); + } else if ("stop".equals(args[0])) { + System.out.println("Shutting down server : " + instance.shutdown()); + } + } catch (Exception e) { + e.printStackTrace(); + System.exit(99); + } } if (!fullInit) { return; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-form.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-form.xsd?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-form.xsd Sat Mar 15 22:22:39 2014 @@ -1444,11 +1444,11 @@ under the License. </xs:restriction> </xs:simpleType> </xs:attribute> - <xs:attribute name="default-option"> + <xs:attribute name="default-option" default="contains"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="equals" /> - <xs:enumeration value="like" /> + <xs:enumeration value="like" /><!-- this is actually "begins with" --> <xs:enumeration value="contains" /> <xs:enumeration value="empty" /> <xs:enumeration value="notEqual" /> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-menu.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-menu.xsd?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-menu.xsd (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/dtd/widget-menu.xsd Sat Mar 15 22:22:39 2014 @@ -49,6 +49,7 @@ under the License. <xs:attribute type="xs:string" name="default-tooltip-style" /> <xs:attribute type="xs:string" name="default-selected-style" /> <xs:attribute type="xs:string" name="default-align-style" /> + <xs:attribute type="xs:string" name="extra-index" /> <xs:attribute name="orientation" default="horizontal"> <xs:simpleType> <xs:restriction base="xs:token"> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Sat Mar 15 22:22:39 2014 @@ -1062,6 +1062,9 @@ public class ModelForm extends ModelWidg } //Debug.logInfo("In single form evaluating use-when for field " + currentFormField.getName() + ": " + currentFormField.getUseWhen(), module); if (!currentFormField.shouldUse(context)) { + if (UtilValidate.isNotEmpty(lastFormField)) { + currentFormField = lastFormField; + } continue; } alreadyRendered.add(currentFormField.getName()); @@ -2685,6 +2688,7 @@ public class ModelForm extends ModelWidg String size = this.overrideListSize.expandString(context); if (UtilValidate.isNotEmpty(size)) { try { + size =size.replaceAll("[^0-9.]", ""); listSize = Integer.parseInt(size); } catch (NumberFormatException e) { Debug.logError(e, "Error getting override list size from value " + size, module); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Sat Mar 15 22:22:39 2014 @@ -3463,7 +3463,7 @@ public class ModelFormField { public static class TextFindField extends TextField { protected boolean ignoreCase = true; protected boolean hideIgnoreCase = false; - protected String defaultOption = "like"; + protected String defaultOption = "contains"; protected boolean hideOptions = false; public TextFindField(Element element, ModelFormField modelFormField) { @@ -3474,7 +3474,7 @@ public class ModelFormField { if(element.hasAttribute("default-option")) { this.defaultOption = element.getAttribute("default-option"); } else { - this.defaultOption = UtilProperties.getPropertyValue("widget", "widget.form.defaultTextFindOption", "like"); + this.defaultOption = UtilProperties.getPropertyValue("widget", "widget.form.defaultTextFindOption", "contains"); } this.hideOptions = "true".equals(element.getAttribute("hide-options")) || "options".equals(element.getAttribute("hide-options")) ? true : false; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Sat Mar 15 22:22:39 2014 @@ -19,7 +19,6 @@ package org.ofbiz.widget.html; import java.io.IOException; -import java.sql.Timestamp; import java.util.HashSet; import java.util.List; import java.util.Locale; @@ -34,12 +33,12 @@ import javolution.util.FastList; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; +import org.ofbiz.base.util.StringUtil.SimpleEncoder; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.base.util.StringUtil.SimpleEncoder; import org.ofbiz.base.util.string.FlexibleStringExpander; import org.ofbiz.base.util.template.FreeMarkerWorker; import org.ofbiz.entity.Delegator; @@ -48,6 +47,7 @@ import org.ofbiz.webapp.taglib.ContentUr import org.ofbiz.widget.ModelWidget; import org.ofbiz.widget.WidgetWorker; import org.ofbiz.widget.form.FormStringRenderer; +import org.ofbiz.widget.form.MacroFormRenderer; import org.ofbiz.widget.form.ModelForm; import org.ofbiz.widget.form.ModelFormField; import org.ofbiz.widget.form.ModelFormField.CheckField; @@ -73,7 +73,7 @@ import org.ofbiz.widget.form.ModelFormFi import org.ofbiz.widget.form.ModelFormField.TextareaField; import org.ofbiz.widget.form.UtilHelpText; -import com.ibm.icu.util.Calendar; +import freemarker.template.TemplateException; /** * Widget Library - HTML Form Renderer implementation @@ -525,206 +525,15 @@ public class HtmlFormRenderer extends Ht * @see org.ofbiz.widget.form.FormStringRenderer#renderDateTimeField(java.io.Writer, java.util.Map, org.ofbiz.widget.form.ModelFormField.DateTimeField) */ public void renderDateTimeField(Appendable writer, Map<String, Object> context, DateTimeField dateTimeField) throws IOException { - ModelFormField modelFormField = dateTimeField.getModelFormField(); - String paramName = modelFormField.getParameterName(context); - String defaultDateTimeString = dateTimeField.getDefaultDateTimeString(context); - - String event = modelFormField.getEvent(); - String action = modelFormField.getAction(context); - - Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); - if (uiLabelMap == null) { - Debug.logWarning("Could not find uiLabelMap in context", module); - } - String localizedInputTitle = "" , localizedIconTitle = ""; - - // whether the date field is short form, yyyy-mm-dd - boolean shortDateInput = ("date".equals(dateTimeField.getType()) || "time-dropdown".equals(dateTimeField.getInputMethod()) ? true : false); - - writer.append("<input type=\"text\""); - - appendClassNames(writer, context, modelFormField); - - writer.append(" name=\""); - if ("time-dropdown".equals(dateTimeField.getInputMethod())) { - writer.append(UtilHttp.makeCompositeParam(paramName, "date")); - } else { - writer.append(paramName); - } - writer.append('"'); - - // the default values for a timestamp - int size = 25; - int maxlength = 30; - - if (shortDateInput) { - size = maxlength = 10; - if ("time".equals(dateTimeField.getType())) { - // the style attribute is a little bit messy but when using display:none the timepicker is shown on a wrong place - writer.append(" style=\"height:1px;width:1px;border:none;background-color:transparent\""); - } - if (uiLabelMap != null) { - localizedInputTitle = uiLabelMap.get("CommonFormatDate"); - } - } else if ("time".equals(dateTimeField.getType())) { - size = maxlength = 8; - if (uiLabelMap != null) { - localizedInputTitle = uiLabelMap.get("CommonFormatTime"); - } - } else { - if (uiLabelMap != null) { - localizedInputTitle = uiLabelMap.get("CommonFormatDateTime"); - } - } - writer.append(" title=\""); - writer.append(localizedInputTitle); - writer.append('"'); - - String value = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context)); - if (UtilValidate.isNotEmpty(value)) { - if (value.length() > maxlength) { - value = value.substring(0, maxlength); - } - writer.append(" value=\""); - writer.append(value); - writer.append('"'); - } - - writer.append(" size=\""); - writer.append(Integer.toString(size)); - writer.append('"'); - - writer.append(" maxlength=\""); - writer.append(Integer.toString(maxlength)); - writer.append('"'); - - String idName = modelFormField.getCurrentContainerId(context); - if (UtilValidate.isNotEmpty(idName)) { - writer.append(" id=\""); - writer.append(idName); - writer.append('"'); - } - - if (UtilValidate.isNotEmpty(event) && UtilValidate.isNotEmpty(action)) { - writer.append(" "); - writer.append(event); - writer.append("=\""); - writer.append(action); - writer.append('"'); - } - - writer.append("/>"); - - // search for a localized label for the icon - if (uiLabelMap != null) { - localizedIconTitle = uiLabelMap.get("CommonViewCalendar"); - } - - // add calendar pop-up button and seed data IF this is not a "time" type date-time - if (!"time".equals(dateTimeField.getType())) { - if (shortDateInput) { - writer.append("<a href=\"javascript:call_cal_notime(document."); - } else { - writer.append("<a href=\"javascript:call_cal(document."); - } - writer.append(modelFormField.getModelForm().getCurrentFormName(context)); - writer.append('.'); - if ("time-dropdown".equals(dateTimeField.getInputMethod())) { - writer.append(UtilHttp.makeCompositeParam(paramName, "date")); - } else { - writer.append(paramName); - } - writer.append(",'"); - writer.append(UtilHttp.encodeBlanks(modelFormField.getEntry(context, defaultDateTimeString))); - writer.append("');\">"); - - writer.append("<img src=\""); - this.appendContentUrl(writer, "/images/cal.gif"); - writer.append("\" width=\"16\" height=\"16\" border=\"0\" alt=\""); - writer.append(localizedIconTitle); - writer.append("\" title=\""); - writer.append(localizedIconTitle); - writer.append("\"/></a>"); + String macroLibraryPath = UtilProperties.getPropertyValue("widget", "screen.formrenderer"); + try { + MacroFormRenderer macroFormRenderer = new MacroFormRenderer(macroLibraryPath, this.request, this.response); + macroFormRenderer.renderDateTimeField(writer, context, dateTimeField); + } catch (TemplateException e) { + Debug.logError(e, "Error rendering screen thru ftl macro: renderDateTimeField", module); + } catch (IOException e) { + Debug.logError(e, "Error rendering screen thru ftl, macro: renderDateTimeField", module); } - - // if we have an input method of time-dropdown, then render two dropdowns - if ("time-dropdown".equals(dateTimeField.getInputMethod())) { - String className = modelFormField.getWidgetStyle(); - String classString = (className != null ? " class=\"" + className + "\" " : ""); - boolean isTwelveHour = "12".equals(dateTimeField.getClock()); - - // set the Calendar to the default time of the form or now() - Calendar cal = null; - try { - Timestamp defaultTimestamp = Timestamp.valueOf(modelFormField.getEntry(context, defaultDateTimeString)); - cal = Calendar.getInstance(); - cal.setTime(defaultTimestamp); - } catch (IllegalArgumentException e) { - Debug.logWarning("Form widget field [" + paramName + "] with input-method=\"time-dropdown\" was not able to understand the default time [" - + defaultDateTimeString + "]. The parsing error was: " + e.getMessage(), module); - } - - // write the select for hours - writer.append(" <select name=\"").append(UtilHttp.makeCompositeParam(paramName, "hour")).append("\""); - writer.append(classString).append(">"); - - // keep the two cases separate because it's hard to understand a combined loop - if (isTwelveHour) { - for (int i = 1; i <= 12; i++) { - writer.append("<option value=\"").append(Integer.toString(i)).append("\""); - if (cal != null) { - int hour = cal.get(Calendar.HOUR_OF_DAY); - if (hour == 0) hour = 12; - if (hour > 12) hour -= 12; - if (i == hour) writer.append(" selected"); - } - writer.append(">").append(Integer.toString(i)).append("</option>"); - } - } else { - for (int i = 0; i < 24; i++) { - writer.append("<option value=\"").append(Integer.toString(i)).append("\""); - if (cal != null && i == cal.get(Calendar.HOUR_OF_DAY)) { - writer.append(" selected"); - } - writer.append(">").append(Integer.toString(i)).append("</option>"); - } - } - - // write the select for minutes - writer.append("</select>:<select name=\""); - writer.append(UtilHttp.makeCompositeParam(paramName, "minutes")).append("\""); - writer.append(classString).append(">"); - for (int i = 0; i < 60; i++) { - writer.append("<option value=\"").append(Integer.toString(i)).append("\""); - if (cal != null && i == cal.get(Calendar.MINUTE)) { - writer.append(" selected"); - } - writer.append(">").append(Integer.toString(i)).append("</option>"); - } - writer.append("</select>"); - - // if 12 hour clock, write the AM/PM selector - if (isTwelveHour) { - String amSelected = ((cal != null && cal.get(Calendar.AM_PM) == Calendar.AM) ? "selected" : ""); - String pmSelected = ((cal != null && cal.get(Calendar.AM_PM) == Calendar.PM) ? "selected" : ""); - writer.append("<select name=\"").append(UtilHttp.makeCompositeParam(paramName, "ampm")).append("\""); - writer.append(classString).append(">"); - writer.append("<option value=\"AM\" ").append(amSelected).append(">AM</option>"); - writer.append("<option value=\"PM\" ").append(pmSelected).append(">PM</option>"); - writer.append("</select>"); - } - - // create a hidden field for the composite type, which is a Timestamp - writer.append("<input type=\"hidden\" name=\""); - writer.append(UtilHttp.makeCompositeParam(paramName, "compositeType")); - writer.append("\" value=\"Timestamp\"/>"); - } - - this.addAsterisks(writer, context, modelFormField); - - this.appendTooltip(writer, context, modelFormField); - - //appendWhitespace(writer); } /* (non-Javadoc) Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/MacroMenuRenderer.java Sat Mar 15 22:22:39 2014 @@ -202,6 +202,9 @@ public class MacroMenuRenderer implement parameters.put("text", link.getText(context)); parameters.put("targetWindow", link.getTargetWindow(context)); String uniqueItemName = menuItem.getModelMenu().getName() + "_" + menuItem.getName() + "_LF_" + UtilMisc.<String> addToBigDecimalInMap(context, "menuUniqueItemIndex", BigDecimal.ONE); + if(menuItem.getModelMenu().getExtraIndex(context) != null){ + uniqueItemName += "_" + menuItem.getModelMenu().getExtraIndex(context); + } parameters.put("uniqueItemName", uniqueItemName); String linkType = ""; if (UtilValidate.isNotEmpty(target)) { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java Sat Mar 15 22:22:39 2014 @@ -73,6 +73,7 @@ public class ModelMenu extends ModelWidg protected String defaultAlign; protected String defaultAlignStyle; protected String fillStyle; + protected FlexibleStringExpander extraIndex; /** This List will contain one copy of each item for each item name in the order * they were encountered in the service, entity, or menu definition; item definitions @@ -158,6 +159,7 @@ public class ModelMenu extends ModelWidg this.defaultAlign = parent.defaultAlign; this.defaultAlignStyle = parent.defaultAlignStyle; this.fillStyle = parent.fillStyle; + this.extraIndex = parent.extraIndex; this.selectedMenuItemContextFieldName = parent.selectedMenuItemContextFieldName; this.menuContainerStyleExdr = parent.menuContainerStyleExdr; if (parent.actions != null) { @@ -225,6 +227,8 @@ public class ModelMenu extends ModelWidg this.defaultAlignStyle = menuElement.getAttribute("default-align-style"); if (this.fillStyle == null || menuElement.hasAttribute("fill-style")) this.fillStyle = menuElement.getAttribute("fill-style"); + if (this.extraIndex == null || menuElement.hasAttribute("extra-index")) + this.setExtraIndex(menuElement.getAttribute("extra-index")); // read all actions under the "actions" element Element actionsElement = UtilXml.firstChildElement(menuElement, "actions"); @@ -659,5 +663,15 @@ public class ModelMenu extends ModelWidg public List<ModelMenuItem> getMenuItemList() { return menuItemList; } + public String getExtraIndex(Map<String, Object> context) { + try { + return extraIndex.expandString(context); + } catch (Exception ex) { + return ""; + } + } + public void setExtraIndex(String extraIndex) { + this.extraIndex = FlexibleStringExpander.getInstance(extraIndex); + } } 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=1577942&r1=1577941&r2=1577942&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 Sat Mar 15 22:22:39 2014 @@ -619,7 +619,7 @@ Parameter: lastViewName, String, optiona <#if Static["org.ofbiz.widget.ModelWidget"].widgetBoundaryCommentsEnabled(context)> <!-- @renderLookupField --> </#if> - <#if (!ajaxUrl?has_content) && ajaxEnabled> + <#if (!ajaxUrl?has_content) && ajaxEnabled?has_content && ajaxEnabled> <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, fieldFormName)/> <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" /> </#if> 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=1577942&r1=1577941&r2=1577942&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 Sat Mar 15 22:22:39 2014 @@ -16,9 +16,9 @@ specialpurpose/cmssite/template/docbook/ specialpurpose/cmssite/template/docbook/extensions/xalan27.jar specialpurpose/cmssite/template/docbook/extensions/webhelpindexer.jar specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar -specialpurpose/lucene/lib/lucene-analyzers-common-4.6.0.jar -specialpurpose/lucene/lib/lucene-core-4.6.0.jar -specialpurpose/lucene/lib/lucene-queryparser-4.6.0.jar +specialpurpose/lucene/lib/lucene-analyzers-common-4.7.0.jar +specialpurpose/lucene/lib/lucene-core-4.7.0.jar +specialpurpose/lucene/lib/lucene-queryparser-4.7.0.jar ========================================================================= Apache License Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/widget/EbayForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/widget/EbayForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/widget/EbayForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ebay/widget/EbayForms.xml Sat Mar 15 22:22:39 2014 @@ -267,7 +267,7 @@ under the License. </entity-options> </drop-down> </field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> </forms> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl Sat Mar 15 22:22:39 2014 @@ -467,9 +467,9 @@ $(function(){ </#if> ${uiLabelMap.OrderYourPrice}: <#if "Y" = product.isVirtual?if_exists> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed /></span> <#if product.productTypeId?if_exists == "ASSET_USAGE" || product.productTypeId?if_exists == "ASSET_USAGE_OUT_IN"> - <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons?if_exists}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed /></span></#if> - <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons?if_exists}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed /></span></#if> - <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons?if_exists} ${uiLabelMap.ProductPersons}.</#if> + <#if product.reserv2ndPPPerc?exists && product.reserv2ndPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReserv2ndPPPerc}<#if !product.reservNthPPPerc?exists || product.reservNthPPPerc == 0>${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}</#if> <@ofbizCurrency amount=product.reserv2ndPPPerc*price.price/100 isoCode=price.currencyUsed /></span></#if> + <#if product.reservNthPPPerc?exists &&product.reservNthPPPerc != 0><br /><span class="${priceStyle}">${uiLabelMap.ProductReservNthPPPerc} <#if !product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0>${uiLabelMap.ProductReservSecond} <#else> ${uiLabelMap.ProductReservThird} </#if> ${uiLabelMap.CommonUntil} ${product.reservMaxPersons!1}, ${uiLabelMap.ProductEach}: <@ofbizCurrency amount=product.reservNthPPPerc*price.price/100 isoCode=price.currencyUsed /></span></#if> + <#if (!product.reserv2ndPPPerc?exists || product.reserv2ndPPPerc == 0) && (!product.reservNthPPPerc?exists || product.reservNthPPPerc == 0)><br />${uiLabelMap.ProductMaximum} ${product.reservMaxPersons!1} ${uiLabelMap.ProductPersons}.</#if> </#if> </strong> </div> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/webapp/content/WEB-INF/actions/SearchProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/webapp/content/WEB-INF/actions/SearchProducts.groovy?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/webapp/content/WEB-INF/actions/SearchProducts.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/lucene/webapp/content/WEB-INF/actions/SearchProducts.groovy Sat Mar 15 22:22:39 2014 @@ -60,13 +60,14 @@ if (parameters.luceneQuery) { TopScoreDocCollector collector = TopScoreDocCollector.create(100, false); // defaulting to 100 results searcher.search(combQuery, collector); ScoreDoc[] hits = collector.topDocs().scoreDocs; - productList = [] hits.each { hit -> Document doc = searcher.doc(hit.doc) productId = doc.productId product = delegator.findOne("Product", [productId : productId], true) - productList.add(product) + if (product) { + productList.add(product) + } } context.queryResults = productList; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sat Mar 15 22:22:39 2014 @@ -152,7 +152,7 @@ <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> </form> <form name="FindTask" type="single" target="FindTask"> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="workEffortTypeId"><hidden value="TASK"/></field> <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskId}"><text-find ignore-case="true"/></field> <field name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}"><text-find ignore-case="true"/></field> Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/widget/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/widget/TaskForms.xml?rev=1577942&r1=1577941&r2=1577942&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/widget/TaskForms.xml (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/scrum/widget/TaskForms.xml Sat Mar 15 22:22:39 2014 @@ -958,7 +958,7 @@ </field> <field name="fromDate"><display type="date"/></field> <field name="thruDate"><display type="date"/></field> - <field name="noConditionFind"><hidden value="Y"/></field> + <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonRemove}"><submit/></field> </form> <form name="taskMemberListInfo" type="list" extends="taskMemberList" separate-columns="true" |
Free forum by Nabble | Edit this page |