Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryContentServices.xml Wed Aug 3 16:12:58 2011 @@ -183,4 +183,43 @@ under the License. <set field="updateContent.localeString" from-field="parameters.localeString"/> <call-service service-name="updateContent" in-map-name="updateContent"/> </simple-method> + + <simple-method method-name="createDownloadContentForCategory" short-description="Create Download Content For Category"> + <set-service-fields service-name="createCategoryContent" map="parameters" to-map="createCategoryContent"/> + <!-- Create Data Resource --> + <set field="data.dataResourceTypeId" from-field="parameters.dataResourceTypeId"/> + <set field="data.dataResourceName" from-field="parameters._imageData_fileName"/> + <set field="data.mimeTypeId" from-field="parameters._imageData_contentType"/> + <set field="data.uploadedFile" from-field="parameters.imageData"/> + <call-service service-name="createDataResource" in-map-name="data"> + <result-to-field result-name="dataResourceId" field="parameters.dataResourceId"/> + </call-service> + <!-- Create attach upload to data resource --> + <set-service-fields service-name="attachUploadToDataResource" map="parameters" to-map="attachMap"/> + <set field="attachMap.uploadedFile" from-field="parameters.imageData"/> + <set field="attachMap._uploadedFile_fileName" from-field="parameters._imageData_fileName"/> + <set field="attachMap._uploadedFile_contentType" from-field="parameters._imageData_contentType"/> + <call-service service-name="attachUploadToDataResource" in-map-name="attachMap"/> + <!-- Create content from dataResource --> + <set-service-fields service-name="createContentFromDataResource" map="parameters" to-map="contentMap"/> + <set field="contentMap.contentTypeId" value="DOCUMENT"/> + <call-service service-name="createContentFromDataResource" in-map-name="contentMap"> + <result-to-field result-name="contentId" field="createCategoryContent.contentId"/> + </call-service> + + <set field="createCategoryContent.contentId" from-field="parameters.contentId"/> + <call-service service-name="createCategoryContent" in-map-name="createCategoryContent"/> + </simple-method> + + <simple-method method-name="updateDownloadContentForCategory" short-description="Update Download Content For Category"> + <set field="attachMap.uploadedFile" from-field="parameters.imageData"/> + <set field="attachMap._uploadedFile_fileName" from-field="parameters._imageData_fileName"/> + <set field="attachMap._uploadedFile_contentType" from-field="parameters._imageData_contentType"/> + <set field="attachMap.mimeTypeId" from-field="parameters._imageData_contentType"/> + <set field="attachMap.dataResourceId" from-field="parameters.fileDataResourceId"/> + <call-service service-name="attachUploadToDataResource" in-map-name="attachMap"/> + + <set-service-fields service-name="updateCategoryContent" map="parameters" to-map="updateCategoryContent"/> + <call-service service-name="updateCategoryContent" in-map-name="updateCategoryContent"/> + </simple-method> </simple-methods> Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Wed Aug 3 16:12:58 2011 @@ -333,6 +333,7 @@ under the License. <find-by-primary-key entity-name="ProductCategoryRollup" map="lookupPKMap" value-field="lookedUpValue"/> <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> <store-value value-field="lookedUpValue"/> + <field-to-result field="parameters.productCategoryId" result-name="productCategoryId"/> </simple-method> <simple-method method-name="removeProductCategoryFromCategory" short-description="Remove ProductCategory From Category"> <set value="removeProductCategoryFromCategory" field="callingMethodName"/> Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/cost/CostServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/cost/CostServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/cost/CostServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/cost/CostServices.xml Wed Aug 3 16:12:58 2011 @@ -572,7 +572,7 @@ under the License. <result-to-field result-name="quantityOnHandTotal"/> </call-service> - <set field="oldProductQuantity" value="${quantityOnHandTotal - parameters.quantityAccepted}"/> + <set field="oldProductQuantity" value="${quantityOnHandTotal - parameters.quantityAccepted}" type="BigDecimal"/> <set field="productAverageCostMap.averageCost" value="${((productAverageCost.averageCost * oldProductQuantity) + (inventoryItem.unitCost * parameters.quantityAccepted))/(quantityOnHandTotal)}" type="BigDecimal"/> <property-to-field resource="arithmetic" property="finaccount.decimals" field="roundingDecimals" default="2"/> <property-to-field resource="arithmetic" property="finaccount.roundingSimpleMethod" field="roundingMode" default="HalfUp"/> Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Wed Aug 3 16:12:58 2011 @@ -239,6 +239,7 @@ under the License. </if-empty> <field-to-result field="lookedUpValue.ownerPartyId" result-name="oldOwnerPartyId"/> <field-to-result field="lookedUpValue.statusId" result-name="oldStatusId"/> + <field-to-result field="lookedUpValue.productId" result-name="oldProductId"/> <!-- special handling for the unitCost --> <if-not-empty field="parameters.unitCost"> <if-compare field="parameters.unitCost" operator="less" value="0.0" type="BigDecimal"> Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml Wed Aug 3 16:12:58 2011 @@ -33,7 +33,7 @@ under the License. <set-service-fields service-name="createContactMech" map="parameters" to-map="createContactMechMap"/> <set field="createContactMechMap.contactMechTypeId" from-field="parameters.contactMechTypeId"/> <call-service service-name="createContactMech" in-map-name="createContactMechMap"> - <default-message>Contact Mechanism successfully created.</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyCreated"/> <result-to-field result-name="contactMechId" field="newValue.contactMechId"/> </call-service> <log level="info" message="ContactMech created"/> @@ -89,7 +89,7 @@ under the License. <set-service-fields service-name="updateContactMech" map="parameters" to-map="updateContactMechMap"/> <set field="updateContactMechMap.contactMechTypeId" from-field="parameters.contactMechTypeId"/> <call-service service-name="updateContactMech" in-map-name="updateContactMechMap"> - <default-message property="PartyContactMechanismSuccessfullyUpdated" resource="PartyUiLabels"/> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/> <result-to-field result-name="contactMechId" field="newFacilityContactMech.contactMechId"/> </call-service> <else> @@ -164,8 +164,7 @@ under the License. <set-service-fields service-name="createPostalAddress" map="parameters" to-map="createPostalAddressMap"/> <call-service in-map-name="createPostalAddressMap" service-name="createPostalAddress"> - <default-message>Postal Address successfully created</default-message> - + <default-message resource="PartyUiLabels" property="PartyPostalAddressSuccessfullyCreated"/> <result-to-field result-name="contactMechId" field="newFacilityContactMech.contactMechId"/> </call-service> @@ -175,8 +174,7 @@ under the License. <set-service-fields service-name="createFacilityContactMech" map="parameters" to-map="createFacilityContactMechMap"/> <call-service service-name="createFacilityContactMech" in-map-name="createFacilityContactMechMap" break-on-error="true"> - <default-message>Facility Contact Mechanism successfully created</default-message> - + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyCreated"/> </call-service> <field-to-request field="newFacilityContactMech.contactMechId" request-name="contactMechId"/> <field-to-result field="newFacilityContactMech.contactMechId" result-name="contactMechId"/> @@ -191,7 +189,7 @@ under the License. <set-service-fields service-name="updatePostalAddress" map="parameters" to-map="updatePostalAddressMap"/> <call-service in-map-name="updatePostalAddressMap" service-name="updatePostalAddress"> - <default-message>Postal Address successfully updated</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/> <result-to-field result-name="contactMechId" field="newFacilityContactMech.contactMechId"/> </call-service> @@ -201,7 +199,7 @@ under the License. <set field="updateFacilityContactMechMap.contactMechTypeId" value="POSTAL_ADDRESS"/> <log level="info" message="Copied id to updateFacilityContactMechMap: ${updateFacilityContactMechMap.newContactMechId}"/> <call-service service-name="updateFacilityContactMech" in-map-name="updateFacilityContactMechMap"> - <default-message>Facility Contact Mechanism successfully updated</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/> </call-service> <field-to-request field="newFacilityContactMech.contactMechId" request-name="contactMechId"/> <field-to-result field="newFacilityContactMech.contactMechId" result-name="contactMechId"/> @@ -216,8 +214,7 @@ under the License. <log level="info" message="Creating telecom number"/> <set-service-fields service-name="createTelecomNumber" map="parameters" to-map="createTelecomNumberMap"/> <call-service in-map-name="createTelecomNumberMap" service-name="createTelecomNumber"> - <default-message>Telecom number successfully created</default-message> - + <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyCreated"/> <result-to-field result-name="contactMechId" field="newFacilityContactMech.contactMechId"/> </call-service> @@ -226,8 +223,7 @@ under the License. <log level="info" message="Copied id to createFacilityContactMechMap: ${createFacilityContactMechMap.contactMechId}"/> <call-service service-name="createFacilityContactMech" in-map-name="createFacilityContactMechMap" break-on-error="true"> - <default-message>Facility Contact Mechanism successfully created</default-message> - + <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyCreated"/> </call-service> <field-to-request field="newFacilityContactMech.contactMechId" request-name="contactMechId"/> <field-to-result field="newFacilityContactMech.contactMechId" result-name="contactMechId"/> @@ -242,7 +238,7 @@ under the License. <set-service-fields service-name="updateTelecomNumber" map="parameters" to-map="updateTelecomNumberMap"/> <call-service service-name="updateTelecomNumber" in-map-name="updateTelecomNumberMap"> - <default-message>Telecom Number successfully updated</default-message> + <default-message resource="PartyUiLabels" property="PartyTelecomNumberSuccessfullyUpdated"/> <result-to-field result-name="contactMechId" field="newFacilityContactMech.contactMechId"/> </call-service> @@ -253,7 +249,7 @@ under the License. <log level="info" message="Copied id to updateFacilityContactMechMap: ${updateFacilityContactMechMap.newContactMechId}"/> <call-service in-map-name="updateFacilityContactMechMap" service-name="updateFacilityContactMech"> - <default-message>Facility Contact Mechanism successfully updated</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/> </call-service> <log level="info" message="Setting result id: ${newFacilityContactMech.contactMechId}"/> <field-to-request field="newFacilityContactMech.contactMechId" request-name="contactMechId"/> @@ -280,8 +276,7 @@ under the License. <set field="createFacilityContactMechMap.infoString" from-field="parameters.emailAddress"/> <set field="createFacilityContactMechMap.contactMechTypeId" value="EMAIL_ADDRESS"/> <call-service service-name="createFacilityContactMech" in-map-name="createFacilityContactMechMap"> - - <default-message>Facility Contact Mechanism successfully created.</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyCreated"/> <result-to-result result-name="contactMechId"/> <result-to-request result-name="contactMechId"/> </call-service> @@ -306,8 +301,7 @@ under the License. <set field="updateFacilityContactMechMap.infoString" from-field="parameters.emailAddress"/> <set field="updateFacilityContactMechMap.contactMechTypeId" value="EMAIL_ADDRESS"/> <call-service service-name="updateFacilityContactMech" in-map-name="updateFacilityContactMechMap"> - - <default-message>Facility Contact Mechanism successfully updated.</default-message> + <default-message resource="PartyUiLabels" property="PartyContactMechanismSuccessfullyUpdated"/> <result-to-result result-name="contactMechId"/> <result-to-request result-name="contactMechId"/> </call-service> Propchange: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/test/InventoryTests.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Aug 3 16:12:58 2011 @@ -2,4 +2,4 @@ /ofbiz/branches/dojo1.4/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-952957 /ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:952958-1044489 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264 -/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:962442-1128853 +/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:962442-1153542 Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Wed Aug 3 16:12:58 2011 @@ -1550,9 +1550,11 @@ under the License. <set value="SHIPMENT_PACKED" field="packedContext.statusId"/> <call-service service-name="updateShipment" in-map-name="packedContext"/> <!-- update the shipment status to shipped --> - <set from-field="shipment.shipmentId" field="packedContext.shipmentId"/> - <set value="SHIPMENT_SHIPPED" field="packedContext.statusId"/> - <call-service service-name="updateShipment" in-map-name="packedContext"/> + <if-not-empty field="setPackedOnly"> + <set from-field="shipment.shipmentId" field="packedContext.shipmentId"/> + <set value="SHIPMENT_SHIPPED" field="packedContext.statusId"/> + <call-service service-name="updateShipment" in-map-name="packedContext"/> + </if-not-empty> </then> <else> <!-- PURCHASE_ORDER --> <!-- update the shipment status to shipped --> Modified: ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml Wed Aug 3 16:12:58 2011 @@ -858,7 +858,7 @@ under the License. <service name="updateProductCategoryToCategory" engine="simple" location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="updateProductCategoryToCategory" auth="true"> <description>Update ProductCategory To Category</description> - <attribute name="productCategoryId" type="String" mode="IN" optional="false"/> + <attribute name="productCategoryId" type="String" mode="INOUT" optional="false"/> <attribute name="parentProductCategoryId" type="String" mode="IN" optional="false"/> <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/> <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/> @@ -1004,6 +1004,28 @@ under the License. <attribute name="localeString" type="String" mode="IN" optional="true"/> </service> + <service name="createDownloadContentForCategory" default-entity-name="ProductCategoryContent" engine="simple" + location="component://product/script/org/ofbiz/product/category/CategoryContentServices.xml" invoke="createDownloadContentForCategory" auth="true"> + <auto-attributes include="pk" mode="IN" optional="true"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <auto-attributes include="nonpk" mode="IN" entity-name="Content" optional="true"/> + <attribute mode="IN" name="imageData" optional="true" type="java.nio.ByteBuffer"/> + <attribute mode="IN" name="_imageData_contentType" optional="true" type="String"/> + <attribute mode="IN" name="_imageData_fileName" optional="true" type="String"/> + <attribute name="dataResourceTypeId" type="String" mode="IN" optional="true"/> + <override name="prodCatContentTypeId" optional="false"/> + </service> + <service name="updateDownloadContentForCategory" default-entity-name="ProductCategoryContent" engine="simple" + location="component://product/script/org/ofbiz/product/category/CategoryContentServices.xml" invoke="updateDownloadContentForCategory" auth="true"> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <auto-attributes mode="IN" entity-name="Content" optional="true"/> + <attribute mode="IN" name="imageData" optional="true" type="java.nio.ByteBuffer"/> + <attribute mode="IN" name="_imageData_contentType" optional="true" type="String"/> + <attribute mode="IN" name="_imageData_fileName" optional="true" type="String"/> + <attribute name="fileDataResourceId" type="String" mode="IN" optional="true"/> + </service> + <!-- ProductFeatureDataResource services --> <service name="createProductFeatureDataResource" default-entity-name="ProductFeatureDataResource" engine="simple" location="component://product/script/org/ofbiz/product/product/ProductContentServices.xml" invoke="createProductFeatureDataResource" auth="true"> @@ -1612,5 +1634,11 @@ under the License. location="component://product/script/org/ofbiz/product/catalog/CatalogServices.xml" invoke="createMissingCategoryAndProductAltUrls" auth="true" use-transaction="false"> <description>Create missing Category and Product Alternative URLs</description> <attribute name="prodCatalogId" mode="INOUT" type="String" optional="false"/> + <attribute name="category" mode="IN" type="String" optional="true"/> + <attribute name="product" mode="IN" type="String" optional="true"/> + <attribute name="categoriesNotUpdated" mode="OUT" type="Integer" optional="true"/> + <attribute name="categoriesUpdated" mode="OUT" type="Integer" optional="true"/> + <attribute name="productsNotUpdated" mode="OUT" type="Integer" optional="true"/> + <attribute name="productsUpdated" mode="OUT" type="Integer" optional="true"/> </service> </services> Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java Wed Aug 3 16:12:58 2011 @@ -24,6 +24,7 @@ import java.util.List; import javax.servlet.FilterChain; import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -34,19 +35,17 @@ import javolution.util.FastList; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.StringUtil; -import org.ofbiz.base.util.StringUtil.StringWrapper; import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.base.util.StringUtil.StringWrapper; +import org.ofbiz.common.UrlServletHelper; import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.DelegatorFactory; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.util.EntityUtil; import org.ofbiz.product.product.ProductContentWrapper; import org.ofbiz.webapp.control.ContextFilter; -import org.ofbiz.webapp.website.WebSiteWorker; public class CatalogUrlFilter extends ContextFilter { @@ -64,42 +63,12 @@ public class CatalogUrlFilter extends Co HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletResponse httpResponse = (HttpServletResponse) response; Delegator delegator = (Delegator) httpRequest.getSession().getServletContext().getAttribute("delegator"); - - // check if multi tenant is enabled - String useMultitenant = UtilProperties.getPropertyValue("general.properties", "multitenant"); - if ("Y".equals(useMultitenant)) { - // get tenant delegator by domain name - String serverName = request.getServerName(); - try { - // if tenant was specified, replace delegator with the new per-tenant delegator and set tenantId to session attribute - delegator = getDelegator(config.getServletContext()); - List<GenericValue> tenants = delegator.findList("Tenant", EntityCondition.makeCondition("domainName", serverName), null, UtilMisc.toList("-createdStamp"), null, false); - if (UtilValidate.isNotEmpty(tenants)) { - GenericValue tenant = EntityUtil.getFirst(tenants); - String tenantId = tenant.getString("tenantId"); - - // make that tenant active, setup a new delegator and a new dispatcher - String tenantDelegatorName = delegator.getDelegatorBaseName() + "#" + tenantId; - httpRequest.getSession().setAttribute("delegatorName", tenantDelegatorName); - - // after this line the delegator is replaced with the new per-tenant delegator - delegator = DelegatorFactory.getDelegator(tenantDelegatorName); - config.getServletContext().setAttribute("delegator", delegator); - } - - } catch (GenericEntityException e) { - Debug.logWarning(e, "Unable to get Tenant", module); - } - } - - // set the web context in the request for future use - request.setAttribute("servletContext", httpRequest.getSession().getServletContext()); - request.setAttribute("delegator", delegator); - - // set the webSiteId in the session - if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))){ - httpRequest.getSession().setAttribute("webSiteId", httpRequest.getSession().getServletContext().getAttribute("webSiteId")); - } + + //Get ServletContext + ServletContext servletContext = config.getServletContext(); + + //Set request attribute and session + UrlServletHelper.setRequestAttributes(request, delegator, servletContext); // set initial parameters String initDefaultLocalesString = config.getInitParameter("defaultLocaleString"); @@ -111,67 +80,10 @@ public class CatalogUrlFilter extends Co if (UtilValidate.isNotEmpty(pathInfo)) { List<String> pathElements = StringUtil.split(pathInfo, "/"); String alternativeUrl = pathElements.get(0); - - // get web site and default locale string - String localeString = null; - String webSiteId = WebSiteWorker.getWebSiteId(request); - GenericValue webSite; - try { - webSite = delegator.findOne("WebSite", UtilMisc.toMap("webSiteId", webSiteId), true); - if (UtilValidate.isNotEmpty(webSite)) { - GenericValue productStore = webSite.getRelatedOne("ProductStore"); - if (UtilValidate.isNotEmpty(productStore)) { - localeString = productStore.getString("defaultLocaleString"); - } - } else { - localeString = defaultLocaleString; - } - } catch (GenericEntityException ex) { - Debug.logWarning(ex, module); - } - - // get view index, view size and view sort from path info - String viewIndex = null; - String viewSize = null; - String viewSort = null; - String searchString = null; - int queryStringIndex = pathInfo.indexOf("?"); - if (queryStringIndex >= 0) { - List<String> queryStringTokens = StringUtil.split(pathInfo.substring(queryStringIndex + 1), "&"); - for (String queryStringToken : queryStringTokens) { - int equalIndex = queryStringToken.indexOf("="); - String name = queryStringToken.substring(0, equalIndex - 1); - String value = queryStringToken.substring(equalIndex + 1, queryStringToken.length() - 1); - - if ("viewIndex".equals(name)) { - viewIndex = value; - } else if ("viewSize".equals(name)) { - viewSize = value; - } else if ("viewSort".equals(name)) { - viewSort = value; - } else if ("searchString".equals(name)) { - searchString = value; - } - } - } - - if (UtilValidate.isNotEmpty(httpRequest.getParameter("viewIndex"))) { - viewIndex = httpRequest.getParameter("viewIndex"); - } - if (UtilValidate.isNotEmpty(httpRequest.getParameter("viewSize"))) { - viewSize = httpRequest.getParameter("viewSize"); - } - if (UtilValidate.isNotEmpty(httpRequest.getParameter("viewSort"))) { - viewSort = httpRequest.getParameter("viewSort"); - } - if (UtilValidate.isNotEmpty(httpRequest.getParameter("searchString"))) { - searchString = httpRequest.getParameter("searchString"); - } - String productId = null; String productCategoryId = null; - + String urlContentId = null; try { // look for productId if (alternativeUrl.endsWith("-p")) { @@ -182,13 +94,13 @@ public class CatalogUrlFilter extends Co if (UtilValidate.isNotEmpty(productContentInfos)) { for(GenericValue productContentInfo : productContentInfos){ String contentId = (String) productContentInfo.get("contentId"); - List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAndCache("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "drLocaleString", localeString, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT")); + List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAndCache("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT")); if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){ for (GenericValue ContentAssocDataResourceViewTo : ContentAssocDataResourceViewTos) { GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOneCache("ElectronicText"); if (UtilValidate.isNotEmpty(ElectronicText)) { String textData = (String) ElectronicText.get("textData"); - textData = invalidCharacter(textData); + textData = UrlServletHelper.invalidCharacter(textData); if (alternativeUrl.matches(textData + ".+$")) { String productIdStr = null; productIdStr = alternativeUrl.replace(textData + "-", ""); @@ -201,14 +113,15 @@ public class CatalogUrlFilter extends Co } } } - } else { - List<GenericValue> contentDataResourceViews = delegator.findByAndCache("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "statusId", "CTNT_IN_PROGRESS", "drDataResourceTypeId", "ELECTRONIC_TEXT")); + } + if (UtilValidate.isEmpty(productId)) { + List<GenericValue> contentDataResourceViews = delegator.findByAndCache("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "drDataResourceTypeId", "ELECTRONIC_TEXT")); for (GenericValue contentDataResourceView : contentDataResourceViews) { GenericValue ElectronicText = contentDataResourceView.getRelatedOneCache("ElectronicText"); if (UtilValidate.isNotEmpty(ElectronicText)) { String textData = (String) ElectronicText.get("textData"); if (UtilValidate.isNotEmpty(textData)) { - textData = invalidCharacter(textData); + textData = UrlServletHelper.invalidCharacter(textData); if (alternativeUrl.matches(textData + ".+$")) { String productIdStr = null; productIdStr = alternativeUrl.replace(textData + "-", ""); @@ -236,14 +149,14 @@ public class CatalogUrlFilter extends Co if (UtilValidate.isNotEmpty(productCategoryContentInfos)) { for(GenericValue productCategoryContentInfo : productCategoryContentInfos){ String contentId = (String) productCategoryContentInfo.get("contentId"); - List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAndCache("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "drLocaleString", localeString, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT")); + List<GenericValue> ContentAssocDataResourceViewTos = delegator.findByAndCache("ContentAssocDataResourceViewTo", UtilMisc.toMap("contentIdStart", contentId, "caContentAssocTypeId", "ALTERNATE_LOCALE", "drDataResourceTypeId", "ELECTRONIC_TEXT")); if (UtilValidate.isNotEmpty(ContentAssocDataResourceViewTos)){ for (GenericValue ContentAssocDataResourceViewTo : ContentAssocDataResourceViewTos) { GenericValue ElectronicText = ContentAssocDataResourceViewTo.getRelatedOneCache("ElectronicText"); if (UtilValidate.isNotEmpty(ElectronicText)){ String textData = (String) ElectronicText.get("textData"); if (UtilValidate.isNotEmpty(textData)) { - textData = invalidCharacter(textData); + textData = UrlServletHelper.invalidCharacter(textData); if (alternativeUrl.matches(textData + ".+$")) { String productCategoryStr = null; productCategoryStr = alternativeUrl.replace(textData + "-", ""); @@ -257,14 +170,15 @@ public class CatalogUrlFilter extends Co } } } - } else { - List<GenericValue> contentDataResourceViews = delegator.findByAndCache("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "statusId", "CTNT_IN_PROGRESS", "drDataResourceTypeId", "ELECTRONIC_TEXT")); + } + if (UtilValidate.isEmpty(productCategoryId)) { + List<GenericValue> contentDataResourceViews = delegator.findByAndCache("ContentDataResourceView", UtilMisc.toMap("contentId", contentId, "drDataResourceTypeId", "ELECTRONIC_TEXT")); for (GenericValue contentDataResourceView : contentDataResourceViews) { GenericValue ElectronicText = contentDataResourceView.getRelatedOneCache("ElectronicText"); if (UtilValidate.isNotEmpty(ElectronicText)) { String textData = (String) ElectronicText.get("textData"); if (UtilValidate.isNotEmpty(textData)) { - textData = invalidCharacter(textData); + textData = UrlServletHelper.invalidCharacter(textData); if (alternativeUrl.matches(textData + ".+$")) { String productCategoryStr = null; productCategoryStr = alternativeUrl.replace(textData + "-", ""); @@ -282,6 +196,7 @@ public class CatalogUrlFilter extends Co } } } + } catch (GenericEntityException e) { Debug.logWarning("Cannot look for product and product category", module); } @@ -396,23 +311,6 @@ public class CatalogUrlFilter extends Co CategoryWorker.setTrail(request, trail); } - if(UtilValidate.isNotEmpty(viewIndex)){ - urlBuilder.append("/~VIEW_INDEX=" + viewIndex); - request.setAttribute("VIEW_INDEX", viewIndex); - } - if(UtilValidate.isNotEmpty(viewSize)){ - urlBuilder.append("/~VIEW_SIZE=" + viewSize); - request.setAttribute("VIEW_SIZE", viewSize); - } - if(UtilValidate.isNotEmpty(viewSort)){ - urlBuilder.append("/~VIEW_SORT=" + viewSort); - request.setAttribute("VIEW_SORT", viewSort); - } - if(UtilValidate.isNotEmpty(searchString)){ - urlBuilder.append("/~SEARCH_STRING=" + searchString); - request.setAttribute("SEARCH_STRING", searchString); - } - request.setAttribute("productCategoryId", productCategoryId); if (productId != null) { @@ -421,50 +319,17 @@ public class CatalogUrlFilter extends Co } } - if (UtilValidate.isNotEmpty(productId) || UtilValidate.isNotEmpty(productCategoryId)) { + //Set view query parameters + UrlServletHelper.setViewQueryParameters(request, urlBuilder); + if (UtilValidate.isNotEmpty(productId) || UtilValidate.isNotEmpty(productCategoryId) || UtilValidate.isNotEmpty(urlContentId)) { Debug.logInfo("[Filtered request]: " + pathInfo + " (" + urlBuilder + ")", module); RequestDispatcher dispatch = request.getRequestDispatcher(urlBuilder.toString()); dispatch.forward(request, response); return; } - - // check path alias - GenericValue pathAlias = null; - try { - pathAlias = delegator.findByPrimaryKeyCache("WebSitePathAlias", UtilMisc.toMap("webSiteId", webSiteId, "pathAlias", pathInfo)); - } catch (GenericEntityException e) { - Debug.logError(e, module); - } - if (pathAlias != null) { - String alias = pathAlias.getString("aliasTo"); - String contentId = pathAlias.getString("contentId"); - if (contentId == null && UtilValidate.isNotEmpty(alias)) { - if (!alias.startsWith("/")) { - alias = "/" + alias; - } - - RequestDispatcher rd = request.getRequestDispatcher(alias); - try { - rd.forward(request, response); - return; - } catch (ServletException e) { - Debug.logWarning(e, module); - } catch (IOException e) { - Debug.logWarning(e, module); - } - } - } else { - // send 404 error if a URI is alias TO - try { - List<GenericValue> aliasTos = delegator.findByAndCache("WebSitePathAlias", UtilMisc.toMap("webSiteId", webSiteId, "aliasTo", httpRequest.getRequestURI())); - if (UtilValidate.isNotEmpty(aliasTos)) { - httpResponse.sendError(HttpServletResponse.SC_NOT_FOUND, "Not Found"); - return; - } - } catch (GenericEntityException e) { - Debug.logError(e, module); - } - } + + //Check path alias + UrlServletHelper.checkPathAlias(request, httpResponse, delegator, pathInfo); } // we're done checking; continue on @@ -486,7 +351,7 @@ public class CatalogUrlFilter extends Co urlBuilder.append("/"); } // append alternative URL - url = invalidCharacter(alternativeUrl.toString()); + url = UrlServletHelper.invalidCharacter(alternativeUrl.toString()); urlBuilder.append(url); if (UtilValidate.isNotEmpty(productCategoryId)) { urlBuilder.append("-"); @@ -549,7 +414,7 @@ public class CatalogUrlFilter extends Co urlBuilder.append("/"); } // append alternative URL - url = invalidCharacter(alternativeUrl.toString()); + url = UrlServletHelper.invalidCharacter(alternativeUrl.toString()); urlBuilder.append(url); if (UtilValidate.isNotEmpty(productId)) { urlBuilder.append("-"); @@ -566,81 +431,4 @@ public class CatalogUrlFilter extends Co } } - public static String invalidCharacter(String str) { - str = str.replace("&", "-"); - str = str.replace("\"", "-"); - str = str.replace("Ã", "-"); - str = str.replace("÷", "-"); - str = str.replace(" ", "-"); - str = str.replace("!", "-"); - str = str.replace("#", "-"); - str = str.replace("$", "-"); - str = str.replace("%", "-"); - str = str.replace("'", "-"); - str = str.replace("(", "-"); - str = str.replace(")", "-"); - str = str.replace("*", "-"); - str = str.replace("+", "-"); - str = str.replace(",", "-"); - str = str.replace(".", "-"); - str = str.replace("/", "-"); - str = str.replace(":", "-"); - str = str.replace(";", "-"); - str = str.replace("<", "-"); - str = str.replace("=", "-"); - str = str.replace(">", "-"); - str = str.replace("?", "-"); - str = str.replace("@", "-"); - str = str.replace("[", "-"); - str = str.replace("\\", "-"); - str = str.replace("]", "-"); - str = str.replace("^", "-"); - str = str.replace("_", "-"); - str = str.replace("`", "-"); - str = str.replace("{", "-"); - str = str.replace("|", "-"); - str = str.replace("}", "-"); - str = str.replace("~", "-"); - str = str.replace("ï¿ ", "-"); - str = str.replace("ï¿¡", "-"); - str = str.replace("¤", "-"); - str = str.replace("§", "-"); - str = str.replace("¨", "-"); - str = str.replace("¬", "-"); - str = str.replace("Ë", "-"); - str = str.replace("°", "-"); - str = str.replace("±", "-"); - str = str.replace("μ", "-"); - str = str.replace("â¢", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("ï¿¥", "-"); - str = str.replace("â¦â¦", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("ââ", "-"); - str = str.replace("ã", "-"); - str = str.replace("ã", "-"); - str = str.replace("ï½", "-"); - str = str.replace("ï½", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("â", "-"); - str = str.replace("ã", "-"); - str = str.replace("ã", "-"); - str = str.replace("ã", "-"); - str = str.replace("ï¼", "-"); - str = str.replace("ã", "-"); - str = str.replace("â", "-"); - str = str.replace("ï¼", "-"); - while(str.startsWith("-")){ - str = str.substring(1); - } - while(str.endsWith("-")){ - str = str.substring(0,str.length() - 1); - } - while(str.indexOf("--") != -1){ - str = str.replace("--","-"); - } - return str; - } } Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java Wed Aug 3 16:12:58 2011 @@ -407,6 +407,10 @@ public class CategoryServices { String productCategoryId = request.getParameter("productCategoryId"); String isCatalog = request.getParameter("isCatalog"); String isCategoryType = request.getParameter("isCategoryType"); + String onclickFunction = request.getParameter("onclickFunction"); + String additionParam = request.getParameter("additionParam"); + String hrefString = request.getParameter("hrefString"); + String hrefString2 = request.getParameter("hrefString2"); String entityName = null; String primaryKeyName = null; @@ -471,7 +475,13 @@ public class CategoryServices { title = catId.toString(); dataMap.put("title", catId); } - dataAttrMap.put("onClick","window.location.href='EditCategory?productCategoryId="+catId+"'; return false;"); + dataAttrMap.put("onClick", onclickFunction + "('" + catId + additionParam + "')"); + + String hrefStr = hrefString + catId; + if (UtilValidate.isNotEmpty(hrefString2)) { + hrefStr = hrefStr + hrefString2; + } + dataAttrMap.put("href", hrefStr); dataMap.put("attr", dataAttrMap); josonMap.put("data", dataMap); Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigItemContentWrapper.java Wed Aug 3 16:12:58 2011 @@ -36,10 +36,12 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.content.content.ContentWorker; import org.ofbiz.entity.Delegator; +import org.ofbiz.entity.DelegatorFactory; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelUtil; import org.ofbiz.entity.util.EntityUtil; +import org.ofbiz.service.GenericDispatcher; import org.ofbiz.service.LocalDispatcher; /** @@ -50,17 +52,24 @@ public class ProductConfigItemContentWra public static final String module = ProductConfigItemContentWrapper.class.getName(); - protected LocalDispatcher dispatcher; + protected transient LocalDispatcher dispatcher; + protected String dispatcherName; + protected transient Delegator delegator; + protected String delegatorName; protected GenericValue productConfigItem; protected Locale locale; protected String mimeTypeId; + public static ProductConfigItemContentWrapper makeProductConfigItemContentWrapper(GenericValue productConfigItem, HttpServletRequest request) { return new ProductConfigItemContentWrapper(productConfigItem, request); } public ProductConfigItemContentWrapper(LocalDispatcher dispatcher, GenericValue productConfigItem, Locale locale, String mimeTypeId) { this.dispatcher = dispatcher; + this.dispatcherName = dispatcher.getName(); + this.delegator = productConfigItem.getDelegator(); + this.delegatorName = delegator.getDelegatorName(); this.productConfigItem = productConfigItem; this.locale = locale; this.mimeTypeId = mimeTypeId; @@ -68,13 +77,30 @@ public class ProductConfigItemContentWra public ProductConfigItemContentWrapper(GenericValue productConfigItem, HttpServletRequest request) { this.dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); + this.dispatcherName = dispatcher.getName(); + this.delegator = (Delegator) request.getAttribute("delegator"); + this.delegatorName = delegator.getDelegatorName(); this.productConfigItem = productConfigItem; this.locale = UtilHttp.getLocale(request); this.mimeTypeId = "text/html"; } public String get(String confItemContentTypeId) { - return getProductConfigItemContentAsText(productConfigItem, confItemContentTypeId, locale, mimeTypeId, productConfigItem.getDelegator(), dispatcher); + return getProductConfigItemContentAsText(productConfigItem, confItemContentTypeId, locale, mimeTypeId, getDelegator(), getDispatcher()); + } + + public Delegator getDelegator() { + if (delegator == null) { + delegator = DelegatorFactory.getDelegator(delegatorName); + } + return delegator; + } + + public LocalDispatcher getDispatcher() { + if (dispatcher == null) { + dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, this.getDelegator()); + } + return dispatcher; } public static String getProductConfigItemContentAsText(GenericValue productConfigItem, String confItemContentTypeId, HttpServletRequest request) { Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Wed Aug 3 16:12:58 2011 @@ -35,9 +35,11 @@ import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.Delegator; +import org.ofbiz.entity.DelegatorFactory; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.util.EntityUtil; +import org.ofbiz.service.GenericDispatcher; import org.ofbiz.service.LocalDispatcher; @@ -49,12 +51,14 @@ public class ProductConfigWrapper implem public static final String module = ProductConfigWrapper.class.getName(); - protected LocalDispatcher dispatcher; + protected transient LocalDispatcher dispatcher; + protected String dispatcherName; protected String productStoreId; protected String catalogId; protected String webSiteId; protected String currencyUomId; - protected Delegator delegator; + protected transient Delegator delegator; + protected String delegatorName = null; protected GenericValue product = null; // the aggregated product protected GenericValue autoUserLogin = null; protected BigDecimal listPrice = BigDecimal.ZERO; @@ -77,12 +81,14 @@ public class ProductConfigWrapper implem basePrice = pcw.basePrice; defaultPrice = pcw.defaultPrice; questions = FastList.newInstance(); - dispatcher = pcw.dispatcher; + delegator = pcw.getDelegator(); + delegatorName = delegator.getDelegatorName(); + dispatcher = pcw.getDispatcher(); + dispatcherName = dispatcher.getName(); productStoreId = pcw.productStoreId; catalogId = pcw.catalogId; webSiteId = pcw.webSiteId; currencyUomId = pcw.currencyUomId; - delegator = pcw.delegator; autoUserLogin = pcw.autoUserLogin; for (ConfigItem ci: pcw.questions) { questions.add(new ConfigItem(ci)); @@ -95,11 +101,13 @@ public class ProductConfigWrapper implem throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); } this.dispatcher = dispatcher; + this.dispatcherName = dispatcher.getName(); this.productStoreId = productStoreId; this.catalogId = catalogId; this.webSiteId = webSiteId; this.currencyUomId = currencyUomId; this.delegator = delegator; + this.delegatorName = delegator.getDelegatorName(); this.autoUserLogin = autoUserLogin; // get the list Price, the base Price @@ -202,6 +210,20 @@ public class ProductConfigWrapper implem return configId; } + public Delegator getDelegator() { + if (delegator == null) { + delegator = DelegatorFactory.getDelegator(delegatorName); + } + return delegator; + } + + public LocalDispatcher getDispatcher() { + if (dispatcher == null) { + dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, this.getDelegator()); + } + return dispatcher; + } + @Override public boolean equals(Object obj) { if (!(obj instanceof ProductConfigWrapper)) { @@ -607,7 +629,7 @@ public class ProductConfigWrapper implem // Get the component's price Map<String, Object> fieldMap = UtilMisc.toMap("product", oneComponentProduct, "prodCatalogId", pcw.catalogId, "webSiteId", pcw.webSiteId, "currencyUomId", pcw.currencyUomId, "productPricePurposeId", "COMPONENT_PRICE", "autoUserLogin", pcw.autoUserLogin, "productStoreId",productStoreId); - Map<String, Object> priceMap = dispatcher.runSync("calculateProductPrice", fieldMap); + Map<String, Object> priceMap = pcw.getDispatcher().runSync("calculateProductPrice", fieldMap); BigDecimal componentListPrice = (BigDecimal) priceMap.get("listPrice"); BigDecimal componentPrice = (BigDecimal) priceMap.get("price"); Boolean validPriceFound = (Boolean)priceMap.get("validPriceFound"); @@ -627,7 +649,7 @@ public class ProductConfigWrapper implem } } else { fieldMap.put("productPricePurposeId", "PURCHASE"); - Map<String, Object> purchasePriceResultMap = dispatcher.runSync("calculateProductPrice", fieldMap); + Map<String, Object> purchasePriceResultMap = pcw.getDispatcher().runSync("calculateProductPrice", fieldMap); BigDecimal purchaseListPrice = (BigDecimal) purchasePriceResultMap.get("listPrice"); BigDecimal purchasePrice = (BigDecimal) purchasePriceResultMap.get("price"); if (purchaseListPrice != null) { Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Wed Aug 3 16:12:58 2011 @@ -1238,7 +1238,7 @@ public class ProductSearchSession { List<Map<String, String>> featureCountList = FastList.newInstance(); GenericValue searchResult = null; while ((searchResult = eli.next()) != null) { - featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); + featureCountList.add(UtilMisc.<String, String>toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); } if (eli != null) { Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java Wed Aug 3 16:12:58 2011 @@ -460,10 +460,10 @@ public class ProductWorker { } } featureList.add(featureData); - if (oldType != null) { - // last map - featureTypeFeatures.add(featureList); - } + } + if (oldType != null) { + // last map + featureTypeFeatures.add(featureList); } } catch (GenericEntityException e) { Debug.logError(e, module); Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy Wed Aug 3 16:12:58 2011 @@ -49,4 +49,16 @@ if ("RELATED_URL".equals(prodCatContentT } context.contentFormName = "EditCategoryContentRelatedUrl"; context.contentFormTitle = "${uiLabelMap.ProductUpdateRelatedURLContentCategory}"; +}else if ("VIDEO".equals(prodCatContentTypeId) || "CATEGORY_IMAGE".equals(prodCatContentTypeId)) { + if (UtilValidate.isNotEmpty(content)) { + context.fileDataResourceId = content.dataResourceId; + } + if("CATEGORY_IMAGE".equals(prodCatContentTypeId)){ + context.dataResourceTypeId = "IMAGE_OBJECT"; + }else{ + context.dataResourceTypeId = "VIDEO_OBJECT"; + } + context.contentFormName = "EditCategoryContentDownload"; + context.contentFormTitle = "${uiLabelMap.ProductUpdateDownloadContentCategory}"; + } Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml Wed Aug 3 16:12:58 2011 @@ -139,6 +139,10 @@ under the License. <security https="true" auth="true"/> <response name="success" type="view" value="EditCategory"/> </request-map> + <request-map uri="EditCategoryAjax"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditCategorySection"/> + </request-map> <request-map uri="createProductCategory"> <security https="true" auth="true"/> @@ -173,7 +177,7 @@ under the License. <request-map uri="updateProductCategoryToCategory"> <security https="true" auth="true"/> <event type="service-multi" path="" invoke="updateProductCategoryToCategory"/> - <response name="success" type="view" value="EditCategoryRollup"/> + <response name="success" type="request-redirect" value="EditCategoryRollup"/> <response name="error" type="view" value="EditCategoryRollup"/> </request-map> <request-map uri="removeProductCategoryFromCategory"> @@ -636,7 +640,19 @@ under the License. <response name="success" type="view" value="EditCategoryContent"/> <response name="error" type="view" value="EditCategoryContentContent"/> </request-map> - + <request-map uri="updateDownloadContentForCategory"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="updateDownloadContentForCategory"/> + <response name="success" type="view" value="EditCategoryContent"/> + <response name="error" type="view" value="EditCategoryContentContent"/> + </request-map> + <request-map uri="createDownloadContentForCategory"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="createDownloadContentForCategory"/> + <response name="success" type="view" value="EditCategoryContent"/> + <response name="error" type="view" value="EditCategoryContentContent"/> + </request-map> + <!-- ================ Product Content Requests ================= --> <request-map uri="EditProductContent"> <security https="true" auth="true"/> @@ -1410,6 +1426,10 @@ under the License. <response name="success" type="view" value="EditProdCatalog"/> <response name="error" type="view" value="EditProdCatalog"/> </request-map> + <request-map uri="EditProdCatalogAjax"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditProdCatalogSection"/> + </request-map> <!-- ================ ProdCatalog Categories Requests ================= --> <request-map uri="EditProdCatalogCategories"> @@ -3072,12 +3092,17 @@ under the License. <event type="java" path="org.ofbiz.product.category.CategoryServices" invoke="getChildCategoryTree"/> <response name="success" type="none"/> </request-map> + <request-map uri="listMiniproduct"> + <security auth="false" https="true"/> + <response name="success" type="view" value="listMiniproduct"/> + </request-map> <!-- View Mappings --> <view-map name="main" type="screen" page="component://product/widget/catalog/CommonScreens.xml#main"/> <view-map name="ChooseTopCategory" type="screen" page="component://product/widget/catalog/CommonScreens.xml#ChooseTopCategory"/> <view-map name="FastLoadCache" type="screen" page="component://product/widget/catalog/CommonScreens.xml#FastLoadCache"/> + <view-map name="listMiniproduct" type="screen" page="component://product/widget/catalog/CommonScreens.xml#listMiniproduct"/> <view-map name="advancedsearch" type="screen" page="component://product/widget/catalog/FindScreens.xml#advancedsearch"/> <view-map name="keywordsearch" type="screen" page="component://product/widget/catalog/FindScreens.xml#keywordsearch"/> @@ -3101,6 +3126,7 @@ under the License. <view-map name="EditCategoryFeatureCats" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#EditCategoryFeatureCats"/> <view-map name="EditCategoryParties" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#EditCategoryParties"/> <view-map name="EditProductCategoryLinks" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#EditProductCategoryLinks"/> + <view-map name="EditCategorySection" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#EditCategorySection"/> <view-map name="createProductInCategoryStart" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#createProductInCategoryStart"/> <view-map name="CreateProductInCategoryCheckExisting" type="screen" page="component://product/widget/catalog/CategoryScreens.xml#CreateProductInCategoryCheckExisting"/> @@ -3114,6 +3140,7 @@ under the License. <view-map name="newFixedAssetProduct" type="screen" page="component://product/widget/catalog/ProductScreens.xml#newFixedAssetProduct"/> <view-map name="ProductPriceHistory" type="screen" page="component://product/widget/catalog/ProductScreens.xml#ProductPriceHistory"/> <view-map name="ProductBarCode.pdf" type="screenfop" page="component://product/widget/catalog/ProductScreens.xml#ProductBarCode.fo" content-type="application/pdf" encoding="none"/> + <view-map name="EditProductContent" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductContent"/> <view-map name="EditProductGeos" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductGeos"/> @@ -3168,6 +3195,13 @@ under the License. <view-map name="ListFeaturePrice" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#ListFeaturePrice"/> <view-map name="CreateFeature" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#CreateFeature"/> + <view-map name="FindProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#FindProdCatalog"/> + <view-map name="EditProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalog"/> + <view-map name="EditProdCatalogCategories" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalogCategories"/> + <view-map name="EditProdCatalogStores" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalogStores"/> + <view-map name="EditProdCatalogParties" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalogParties"/> + <view-map name="EditProdCatalogSection" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalogSection"/> + <view-map name="FindProductPromo" type="screen" page="component://product/widget/catalog/PromoScreens.xml#FindProductPromo"/> <view-map name="EditProductPromo" type="screen" page="component://product/widget/catalog/PromoScreens.xml#EditProductPromo"/> <view-map name="EditProductPromoRules" type="screen" page="component://product/widget/catalog/PromoScreens.xml#EditProductPromoRules"/> Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/web.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/web.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/web.xml Wed Aug 3 16:12:58 2011 @@ -24,12 +24,7 @@ under the License. <display-name>Open For Business - Catalog</display-name> <description>Catalog Module of the Open For Business Project</description> - <context-param> - <param-name>webSiteId</param-name> - <param-value>PRODCATALOG</param-value> - <description>A unique ID used to look up the WebSite entity</description> - </context-param> - <context-param> + <context-param> <param-name>entityDelegatorName</param-name> <param-value>default</param-value> <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description> Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/category/CategoryTree.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/category/CategoryTree.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/category/CategoryTree.ftl (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/category/CategoryTree.ftl Wed Aug 3 16:12:58 2011 @@ -35,7 +35,7 @@ var rawdata = [ <#if (rootCat?has_content)> <#list rootCat as root> { - "data": {"title" : unescapeHtmlText("<#if root.categoryName?exists>${root.categoryName?js_string} [${root.productCategoryId}]<#else>${root.productCategoryId?js_string}</#if>"), "attr": {"onClick" : "window.location.href='<@ofbizUrl>/EditProdCatalog?prodCatalogId=${root.productCategoryId}</@ofbizUrl>'; return false;"}}, + "data": {"title" : unescapeHtmlText("<#if root.categoryName?exists>${root.categoryName?js_string} [${root.productCategoryId}]<#else>${root.productCategoryId?js_string}</#if>"), "attr": {"href" : "<@ofbizUrl>/EditProdCatalog?prodCatalogId=${root.productCategoryId}</@ofbizUrl>","onClick" : "callDocument('${root.productCategoryId}', 'catalog');"}}, "attr": {"id" : "${root.productCategoryId}", "rel" : "root", "isCatalog" : "${root.isCatalog?string}" ,"isCategoryType" : "${root.isCategoryType?string}"} <#if root.child?exists> ,"state" : "closed" @@ -70,7 +70,10 @@ var rawdata = [ return { "isCategoryType" : n.attr ? n.attr("isCatalog").replace("node_","") : 1 , "isCatalog" : n.attr ? n.attr("isCatalog").replace("node_","") : 1 , - "productCategoryId" : n.attr ? n.attr("id").replace("node_","") : 1 + "productCategoryId" : n.attr ? n.attr("id").replace("node_","") : 1 , + "additionParam" : "','category" , + "hrefString" : "EditCategory?productCategoryId=" , + "onclickFunction" : "callDocument" }; } } @@ -89,6 +92,40 @@ var rawdata = [ }); }); } + + function callDocument(id,type) { + //jQuerry Ajax Request + var dataSet = {}; + if(type == "catalog") { + URL = 'EditProdCatalogAjax'; + dataSet = {"prodCatalogId" : id, "ajaxUpdateEvent" : "Y"}; + } else { + URL = 'EditCategoryAjax'; + dataSet = {"productCategoryId" : id, "ajaxUpdateEvent" : "Y"}; + } + jQuery.ajax({ + url: URL, + type: 'POST', + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#centerdiv').html(msg); + } + }); + jQuery.ajax({ + url: 'listMiniproduct', + type: 'POST', + data: {"productCategoryId" : id}, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#miniproductlist').html(msg); + } + }); + } </script> <div id="tree"></div> Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy Wed Aug 3 16:12:58 2011 @@ -37,7 +37,7 @@ try { inventoryItemAndLabelsView = new DynamicViewEntity(); inventoryItemAndLabelsView.addMemberEntity("II", "InventoryItem"); -inventoryItemAndLabelsView.addAliasAll("II", null); +inventoryItemAndLabelsView.addAliasAll("II", null, null); for (int i = 1; i <= numberOfFields; i++) { inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i); if (inventoryItemLabelId) { Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.groovy Wed Aug 3 16:12:58 2011 @@ -63,7 +63,7 @@ if (action) { } prodView.addMemberEntity("PRFA", "ProductFacility"); - prodView.addAliasAll("PRFA", null); + prodView.addAliasAll("PRFA", null, null); prodView.addMemberEntity("PROD", "Product"); prodView.addViewLink("PROD", "PRFA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId")); Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/web.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/web.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/WEB-INF/web.xml Wed Aug 3 16:12:58 2011 @@ -25,11 +25,6 @@ under the License. <description>Facility Manager Module of the Open For Business Project</description> <context-param> - <param-name>webSiteId</param-name> - <param-value>FACILITY</param-value> - <description>A unique ID used to look up the WebSite entity</description> - </context-param> - <context-param> <param-name>entityDelegatorName</param-name> <param-value>default</param-value> <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description> Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/facility/PicklistManage.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/facility/PicklistManage.ftl?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/facility/PicklistManage.ftl (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/facility/facility/PicklistManage.ftl Wed Aug 3 16:12:58 2011 @@ -97,7 +97,11 @@ under the License. <span class="label">${uiLabelMap.ProductBinNum}</span> ${picklistBinInfo.picklistBin.binLocationNumber} (${picklistBinInfo.picklistBin.picklistBinId}) <#if picklistBinInfo.primaryOrderHeader?exists><span class="label">${uiLabelMap.ProductPrimaryOrderId}</span> ${picklistBinInfo.primaryOrderHeader.orderId}</#if> <#if picklistBinInfo.primaryOrderItemShipGroup?exists><span class="label">${uiLabelMap.ProductPrimaryShipGroupSeqId}</span> ${picklistBinInfo.primaryOrderItemShipGroup.shipGroupSeqId}</#if> - <#if !picklistBinInfo.picklistItemInfoList?has_content><a href="<@ofbizUrl>deletePicklistBin?picklistBinId=${picklistBinInfo.picklistBin.picklistBinId}&facilityId=${facilityId?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a></#if> + <#if !picklistBinInfo.picklistItemInfoList?has_content><a href="javascript:document.DeletePicklistBin_${picklistInfo_index}_${picklistBinInfo_index}.submit()" class="buttontext">${uiLabelMap.CommonDelete}</a></#if> + <form name="DeletePicklistBin_${picklistInfo_index}_${picklistBinInfo_index}" method="post" action="<@ofbizUrl>deletePicklistBin</@ofbizUrl>"> + <input type="hidden" name="picklistBinId" value="${picklistBinInfo.picklistBin.picklistBinId}"/> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/> + </form> </div> <div style="margin-left: 30px;"> <span class="label">${uiLabelMap.CommonUpdate} ${uiLabelMap.ProductBinNum}</span> Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml?rev=1153560&r1=1153559&r2=1153560&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml (original) +++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml Wed Aug 3 16:12:58 2011 @@ -35,6 +35,43 @@ under the License. <menu-item name="Imagemanagement" title="${uiLabelMap.ImageManagement}"><link target="Imagemanagement"/></menu-item> </menu> + <menu name="CatalogTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="ProductCatalog" title="${uiLabelMap.ProductCatalog}"> + <link target="EditProdCatalog"> + <parameter param-name="prodCatalogId"/> + </link> + </menu-item> + <menu-item name="ProductStores" title="${uiLabelMap.ProductStores}"> + <link target="EditProdCatalogStores"> + <parameter param-name="prodCatalogId"/> + </link> + </menu-item> + <menu-item name="PartyParties" title="${uiLabelMap.PartyParties}"> + <link target="EditProdCatalogParties"> + <parameter param-name="prodCatalogId"/> + </link> + </menu-item> + <menu-item name="ProductCategories" title="${uiLabelMap.ProductCategories}"> + <link target="EditProdCatalogCategories"> + <parameter param-name="prodCatalogId"/> + </link> + </menu-item> + </menu> + + <menu name="CatalogSubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected"> + <menu-item name="EditProductCatalog" title="${uiLabelMap.ProductNewProdCatalog}" widget-style="buttontext create"> + <link target="EditProdCatalog"/> + </menu-item> + <menu-item name="CreateSeo" title="${uiLabelMap.ProductCatalogSeoCreate}"> + <condition> + <not><if-empty field="prodCatalog"/></not> + </condition> + <link target="CreateSeoProdCatalog"> + <parameter param-name="prodCatalogId" from-field="parameters.prodCatalogId"/> + </link> + </menu-item> + </menu> + <menu name="FeaturesTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="FeatureType" title="${uiLabelMap.ProductFeatureType}"> <link target="EditFeatureTypes"/> @@ -163,7 +200,7 @@ under the License. </menu-item> <menu-item name="EditProductStoreWebSites" title="${uiLabelMap.ProductWebSites}"> <link target="EditProductStoreWebSites"> - <parameter param-name="viewProductStoreId" from-field="productStoreId"/> + <parameter param-name="productStoreId" from-field="productStoreId"/> </link> </menu-item> <!-- The tax stuff is in the Tax Authority area of the accounting manager, need to re-do this screen to list current tax entries and link to the accmgr screens @@ -229,6 +266,30 @@ under the License. </link> </menu-item> </menu> + <menu name="ProductStoreSubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected"> + <menu-item name="EditProductStore" title="${uiLabelMap.ProductNewProductStore}" widget-style="buttontext create"> + <link target="EditProductStore"/> + </menu-item> + <menu-item name="Expand" title="${uiLabelMap.CommonExpandAll}"> + <condition> + <or> + <if-compare operator="equals" value="EditProductStore" field="tabButtonItem"/> + <if-compare operator="equals" value="EditProductStoreShipmentCostEstimates" field="tabButtonItem"/> + </or> + </condition> + <link target="javascript:expandAll(true);" url-mode="plain"/> + </menu-item> + <menu-item name="Collapse" title="${uiLabelMap.CommonCollapseAll}"> + <condition> + <or> + <if-compare operator="equals" value="EditProductStore" field="tabButtonItem"/> + <if-compare operator="equals" value="EditProductStoreShipmentCostEstimates" field="tabButtonItem"/> + </or> + </condition> + <link target="javascript:expandAll(false);" url-mode="plain"/> + </menu-item> + </menu> + <menu name="ProductStoreFacility" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="AddProductStoreFacility" title="${uiLabelMap.ProductAddFacility}"> <link target="javascript:ajaxUpdateArea('ProductStoreFacilityEditArea', 'editProductStoreFacility', 'productStoreId=${parameters.productStoreId}');" @@ -236,43 +297,6 @@ under the License. </menu-item> </menu> - <menu name="CatalogTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> - <menu-item name="ProductCatalog" title="${uiLabelMap.ProductCatalog}"> - <link target="EditProdCatalog"> - <parameter param-name="prodCatalogId"/> - </link> - </menu-item> - <menu-item name="ProductStores" title="${uiLabelMap.ProductStores}"> - <link target="EditProdCatalogStores"> - <parameter param-name="prodCatalogId"/> - </link> - </menu-item> - <menu-item name="PartyParties" title="${uiLabelMap.PartyParties}"> - <link target="EditProdCatalogParties"> - <parameter param-name="prodCatalogId"/> - </link> - </menu-item> - <menu-item name="ProductCategories" title="${uiLabelMap.ProductCategories}"> - <link target="EditProdCatalogCategories"> - <parameter param-name="prodCatalogId"/> - </link> - </menu-item> - </menu> - - <menu name="CatalogSubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected"> - <menu-item name="EditProductCatalog" title="${uiLabelMap.ProductNewProdCatalog}" widget-style="buttontext create"> - <link target="EditProdCatalog"/> - </menu-item> - <menu-item name="CreateSeo" title="${uiLabelMap.ProductCatalogSeoCreate}"> - <condition> - <not><if-empty field="prodCatalog"/></not> - </condition> - <link target="CreateSeoProdCatalog"> - <parameter param-name="prodCatalogId" from-field="parameters.prodCatalogId"/> - </link> - </menu-item> - </menu> - <menu name="PriceRulesButtonBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="FindRules" title="${uiLabelMap.CommonAdd}/${uiLabelMap.ProductFindRule}"> <link target="FindProductPriceRules"/> @@ -498,7 +522,7 @@ under the License. <parameter param-name="product_id" from-field="productId"/> </link> </menu-item> - <menu-item name="ProductBarCode" title="${uiLabelMap.ProductProductPage}"> + <menu-item name="ProductBarCode" title="${uiLabelMap.ProductBarcode}"> <condition> <not><if-empty field="product"/></not> </condition> |
Free forum by Nabble | Edit this page |