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 2017/03/11 19:26:22 UTC
svn commit: r1786526 - in /ofbiz/branches/release16.11: ./
applications/product/widget/catalog/ReviewForms.xml
Author: jleroux
Date: Sat Mar 11 19:26:21 2017
New Revision: 1786526
URL: http://svn.apache.org/viewvc?rev=1786526&view=rev
Log:
"Applied fix from trunk framework for revision: 1786525 "
------------------------------------------------------------------------
r1786525 | jleroux | 2017-03-11 20:25:31 +0100 (sam. 11 mars 2017) | 25 lignes
Fixed: catalog/control/FindReviews does not render proper column data
(OFBIZ-)
go to https://localhost:8443/catalog/control/FindReviews
find productId=GZ-2644
notice the table columns do not match the data
Here the problem is :
1. FindReviews page includes "ListReviews" form to render this content.
2. Here "use-when" attribute is used with "field" element on "productRating"
and "productReview" for conditions "statusId != 'PRR_DELETED'" and
"statusId == 'PRR_DELETED'"
3. Citing documentation of "ignore-when": "This attribute is defined to enable
ignoring a field on a form of type list or multi, which is not possible using
use-when attribute".
4. So when condition is not true it renders a empty <td></td> causing data to
be placed inappropriately
5. Here if the "use-when" attribute is replaced with "ignore-when" attribute
it will make the columns to match with apt data.
Solution:
Replace "use-when" attribute with "ignore-when" attribute amending conditions
used accordingly.
Thanks: Wai Tam for the report, Aditya Sharma for the patch
------------------------------------------------------------------------
Modified:
ofbiz/branches/release16.11/ (props changed)
ofbiz/branches/release16.11/applications/product/widget/catalog/ReviewForms.xml
Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 11 19:26:21 2017
@@ -10,5 +10,5 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525
/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520
Modified: ofbiz/branches/release16.11/applications/product/widget/catalog/ReviewForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/product/widget/catalog/ReviewForms.xml?rev=1786526&r1=1786525&r2=1786526&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/product/widget/catalog/ReviewForms.xml (original)
+++ ofbiz/branches/release16.11/applications/product/widget/catalog/ReviewForms.xml Sat Mar 11 19:26:21 2017
@@ -63,10 +63,10 @@ under the License.
</field>
<field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
<field name="userLoginId" title="${uiLabelMap.ProductReviewBy}" ><display/></field>
- <field name="productRating" use-when="${statusId != 'PRR_DELETED'}"><text/></field>
- <field name="productRating" use-when="${statusId == 'PRR_DELETED'}"><text disabled="true"/></field>
- <field name="productReview" use-when="${statusId != 'PRR_DELETED'}"><textarea/></field>
- <field name="productReview" use-when="${statusId == 'PRR_DELETED'}"><textarea read-only="true"/></field>
+ <field name="productRating" ignore-when="${statusId == 'PRR_DELETED'}"><text/></field>
+ <field name="productRating" ignore-when="${statusId != 'PRR_DELETED'}"><text disabled="true"/></field>
+ <field name="productReview" ignore-when="${statusId == 'PRR_DELETED'}"><textarea/></field>
+ <field name="productReview" ignore-when="${statusId != 'PRR_DELETED'}"><textarea read-only="true"/></field>
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" use-when="${statusId != 'PRR_DELETED'}"><submit button-type="button"/></field>
<field name="approve" widget-style="buttontext" use-when="${statusId == 'PRR_PENDING'}">
<hyperlink description="${uiLabelMap.FormFieldTitle_approve}" target="updateProductReviewStatus" also-hidden="false">