svn commit: r1334338 - in /ofbiz/branches/release12.04: ./ applications/product/widget/facility/FacilityForms.xml

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

svn commit: r1334338 - in /ofbiz/branches/release12.04: ./ applications/product/widget/facility/FacilityForms.xml

jleroux@apache.org
Author: jleroux
Date: Sat May  5 08:02:25 2012
New Revision: 1334338

URL: http://svn.apache.org/viewvc?rev=1334338&view=rev
Log:
"Applied fix from trunk for revision: 1334201"
------------------------------------------------------------------------
r1334201 | jleroux | 2012-05-04 23:46:25 +0200 (ven., 04 mai 2012) | 9 lines

A slightly modified patch from Ankit Jain "Error on View Facility Inventory Items Details Page" https://issues.apache.org/jira/browse/OFBIZ-4851

Error on https://demo-trunk.ofbiz.apache.org:8443/facility/control/ViewFacilityInventoryItemsDetails Page, when you select Report Type - "By Inventory Item" or "By Product" its throwing error.

org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen component://common/widget/CommonScreens.xml#GlobalDecorator: java.lang.IllegalArgumentException: Return value from use-when condition eval was not a Boolean: null [null] on the field inventoryItemId of form ListFacilityInventoryItemsDetailsByItem (Return value from use-when condition eval was not a Boolean: null [null] on the field inventoryItemId of form ListFacilityInventoryItemsDetailsByItem)

jleroux: I supposed it was related to recent changes on scripts language, but was not sure. So I searched for ${bsh:* type="Boolean"/> and found some others of the same kind: in UpdateProductFacilityLocations, FindProject, sprintBacklogListItems forms and more in scrumForms.xml. I tried with UpdateProductFacilityLocations & FindProject but surprisingly did not reproduce the problem. At this stage I gave up...

Sligth changes from Ankit's patch: I simply used real ' instead of " and reformatted to make things more legible
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/product/widget/facility/FacilityForms.xml

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1334201

Modified: ofbiz/branches/release12.04/applications/product/widget/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/widget/facility/FacilityForms.xml?rev=1334338&r1=1334337&r2=1334338&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/widget/facility/FacilityForms.xml (original)
+++ ofbiz/branches/release12.04/applications/product/widget/facility/FacilityForms.xml Sat May  5 08:02:25 2012
@@ -229,7 +229,7 @@ under the License.
             </service>
         </actions>
         <row-actions>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;inventoryItemId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(inventoryItemId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy: String prev = (String) previousItem.get('inventoryItemId');return new Boolean(!(prev!=null &amp;&amp; prev.equals(inventoryItemId)));}" type="Boolean"/>
         </row-actions>
 
         <field name="inventoryItemId" widget-style="buttontext" position="1" use-when="showPosition1">
@@ -293,7 +293,7 @@ under the License.
             </service>
         </actions>
         <row-actions>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;productId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(productId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev = (String) previousItem.get('productId'); return new Boolean(!(prev!=null &amp;&amp; prev.equals(productId)));}" type="Boolean"/>
         </row-actions>
 
         <field name="productId" position="1" use-when="showPosition1" widget-style="buttontext">