You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2011/03/23 19:52:45 UTC

svn commit: r1084671 - in /ofbiz/trunk/applications/product: webapp/catalog/product/ProductBarCode.fo.ftl widget/catalog/ProductScreens.xml

Author: jleroux
Date: Wed Mar 23 18:52:45 2011
New Revision: 1084671

URL: http://svn.apache.org/viewvc?rev=1084671&view=rev
Log:
A modified patch from Konstantin Nikkel "Exception while creating a productBarCode" https://issues.apache.org/jira/browse/OFBIZ-4226 - OFBIZ-4226

If you try to create a barcode of a product that has no productName as content, you get the exception "Variable pruductName does not exist".
An exclamation mark in the "ProductBarCode.fo.ftl" manages this problem.

I added this feature, so I changed it a bit more by using also internalName as default for productName and changed the decorator since now productName is not needed (better to do that only in the ProductBarCode.fo screen, I checked it's no used anywhere else)

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductBarCode.fo.ftl
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductBarCode.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductBarCode.fo.ftl?rev=1084671&r1=1084670&r2=1084671&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductBarCode.fo.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductBarCode.fo.ftl Wed Mar 23 18:52:45 2011
@@ -32,7 +32,7 @@ under the License.
     <fo:page-sequence master-reference="main">
         <fo:flow flow-name="xsl-region-body" font-family="Helvetica">
             <fo:block text-align="center">
-                 ${productName}
+                 ${productName!}
             </fo:block>
             <fo:block text-align="center">
                 <fo:instream-foreign-object>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=1084671&r1=1084670&r2=1084671&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Wed Mar 23 18:52:45 2011
@@ -31,8 +31,6 @@ under the License.
                 <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="productId" from-field="parameters.productId"/>
-                <entity-one entity-name="Product" value-field="product"/>
-                <set field="productName" from-field="product.productName"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -367,7 +365,7 @@ under the License.
                 <decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet title="${uiLabelMap.PageTitleEditProductAssetUsage}">
-                            <include-form name="EditProductAssetUsage" location="component://product/widget/catalog/ProductForms.xml"/>                        
+                            <include-form name="EditProductAssetUsage" location="component://product/widget/catalog/ProductForms.xml"/>
                         </screenlet>
                         <screenlet title="${uiLabelMap.PageTitleEditProductAssetUsage}">
                             <container>
@@ -1264,7 +1262,8 @@ under the License.
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
 
                 <set field="productId" from-field="parameters.productId"/>
-                <set field="productName" from-field="parameters.productName"/>
+                <entity-one entity-name="Product" value-field="product" auto-field-map="true"/>
+                <set field="productName" from-field="product.productName" default-value="product.internalName"/>
             </actions>
             <widgets>
                 <platform-specific>
@@ -1334,7 +1333,7 @@ under the License.
             </widgets>
         </section>
     </screen>
-    
+
     <screen name="BestSellingProducts">
         <section>
             <actions>