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 2012/10/18 09:14:35 UTC

svn commit: r1399539 - in /ofbiz/trunk: applications/product/widget/catalog/ProductForms.xml specialpurpose/projectmgr/widget/forms/ProjectForms.xml specialpurpose/scrum/widget/scrumForms.xml

Author: jleroux
Date: Thu Oct 18 07:14:35 2012
New Revision: 1399539

URL: http://svn.apache.org/viewvc?rev=1399539&view=rev
Log:
Extended from a Tom Burns's patch at https://issues.apache.org/jira/browse/OFBIZ-4851

To reproduce:
1. In Catalog Manager select the Products menu
2. Click find
3. Click product id GZ-1006-1
4. Click Locations tab
5. In Add Facility Location screenlet select Web Store Warehouse from the Facility Id drop-down list
6. In the Location Seq Id pop up window select Facility Id Web Store Warehouse click find.
7. Select a Location Id
8. In Add Facility Location click Add

Expected: Add location to product record
Actual:
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 facilityName of form UpdateProductFacilityLocations (Return value from use-when condition eval was not a Boolean: null [null] on the field facilityName of form UpdateProductFacilityLocations)

jleroux: I found some other same cases and fixed them the same way

Modified:
    ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
    ofbiz/trunk/specialpurpose/scrum/widget/scrumForms.xml

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1399539&r1=1399538&r2=1399539&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Thu Oct 18 07:14:35 2012
@@ -1884,7 +1884,7 @@ under the License.
             <entity-one entity-name="Enumeration" value-field="locationType">
                 <field-map field-name="enumId" from-field="facilityLocation.locationTypeEnumId"/>
             </entity-one>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;facilityId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(facilityId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;facilityId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(facilityId)));}" type="Boolean"/>
         </row-actions>
         <auto-fields-service service-name="updateProductFacilityLocation" default-position="2"/>
         <field name="productId" position="2"><hidden/></field>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=1399539&r1=1399538&r2=1399539&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Thu Oct 18 07:14:35 2012
@@ -124,7 +124,7 @@
             </entity-condition>
         </actions>
         <row-actions>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;workEffortId&quot;);return !(prev!=null&amp;&amp;prev.equals(workEffortId));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;workEffortId&quot;);return !(prev!=null&amp;&amp;prev.equals(workEffortId));}" type="Boolean"/>
         </row-actions>
         <field name="workEffortId"><hidden/></field>
         <field name="phaseName" position="1" use-when="showPosition1"><display description="${phaseName}[${phaseId}]"/></field>

Modified: ofbiz/trunk/specialpurpose/scrum/widget/scrumForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/widget/scrumForms.xml?rev=1399539&r1=1399538&r2=1399539&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/scrum/widget/scrumForms.xml (original)
+++ ofbiz/trunk/specialpurpose/scrum/widget/scrumForms.xml Thu Oct 18 07:14:35 2012
@@ -115,7 +115,7 @@ under the License.
             </service>
             <set field="planHours" from-field="taskPlanHourOutMap.planHours"/>
             <!-- condition -->
-             <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(custRequestId)));}" type="Boolean"/>
+             <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(custRequestId)));}" type="Boolean"/>
             <!-- Get list of task for each sprint backlog -->
             <entity-and entity-name="WorkEffortPartyAssignView" list="sprintMember">
                 <field-map field-name="workEffortId" from-field="sprintId"/>
@@ -926,7 +926,7 @@ under the License.
             <set field="description" from-field="custRequest.description"/>
             <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/>
             <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
         </row-actions>
         <field name="postWorkHours"><hidden value="1"/></field>
         <field name="priority"><hidden/></field>
@@ -1802,7 +1802,7 @@ under the License.
     <form name="hoursNotYetBilled" type="multi" list-name="hoursNotYetBilledTasks" use-row-submit="false" paginate-target="ProductBilling" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" 
         target="updateNotBilledBacklog?productId=${productId}&amp;fromDate=${fromDate}&amp;thruDate=${thruDate}&amp;includeMeeting=${includeMeeting}&amp;VIEW_SIZE_1=${parameters.VIEW_SIZE_1}&amp;VIEW_INDEX_1=${parameters.VIEW_INDEX_1}">
         <row-actions>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return !(prev!=null&amp;&amp;prev.equals(custRequestId));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return !(prev!=null&amp;&amp;prev.equals(custRequestId));}" type="Boolean"/>
             <entity-one entity-name="WorkEffort" value-field="project">
                 <field-map field-name="workEffortId" from-field="projectId"/>
             </entity-one>
@@ -2013,7 +2013,7 @@ under the License.
             <set field="description" from-field="custRequest.description"/>
             <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/>
             <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
         </row-actions>
         <field name="custSequenceNum" position="2" title="${uiLabelMap.ScrumSeq}"><display/></field>
         <field name="custRequestId" position="2" title="${uiLabelMap.ScrumProductBacklogItem}">
@@ -2046,7 +2046,7 @@ under the License.
             <entity-one entity-name="CustRequest" value-field="custRequest"/>
             <set field="description" from-field="custRequest.description"/>
             <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/>
-            <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(&quot;productId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(productId)));}" type="Boolean"/>
         </row-actions>
         <field name="productId" title="${uiLabelMap.PageTitleProduct}" position="1" use-when="showPosition1">
             <display-entity entity-name="Product" description="${internalName} " key-field-name="productId">
@@ -3003,7 +3003,7 @@ under the License.
             </service>
             <set field="planHours" from-field="taskPlanHourOutMap.planHours"/>
             <!-- condition -->
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(custRequestId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;custRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(custRequestId)));}" type="Boolean"/>
             <!-- Get list of task for each sprint backlog -->
             <entity-and entity-name="WorkEffortPartyAssignView" list="assignedTos">
                 <field-map field-name="workEffortId" from-field="workEffortId"/>
@@ -3156,7 +3156,7 @@ under the License.
             <set field="description" from-field="custRequest.description"/>
             <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/>
             <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;parentCustRequestId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(parentCustRequestId)));}" type="Boolean"/>
         </row-actions>
         <!--<field name="custRequestCategoryGroupId" position="1" use-when="${groovy:showPosition1}" title="${uiLabelMap.ScrumCategory}">
             <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${custRequestName}"/>