Author: jleroux
Date: Mon Oct 23 19:28:32 2017
New Revision: 1813067
URL:
http://svn.apache.org/viewvc?rev=1813067&view=revLog:
Fixed: Not setting VIEW_INDEX for IterateSectionWidget.renderWidgetString causes
rendering error
(OFBIZ-9889)
A bug was introduced in OFBIZ-9710, that created a catch block for a
RuntimeException that would be thrown again. Unfortunately the code block relied
on catching a NumberFormatException in case VIEW_INDEX was not set, which in the
original code was not intuitively recognisable, because only Exception was caught.
In the provided patch I removed the catch block for the RTE und changed Exception
to NumberFormatException, since it is the only Exception that is expected.
Thanks: Tobias Laufkötter
Modified:
ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java
Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java?rev=1813067&r1=1813066&r2=1813067&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java Mon Oct 23 19:28:32 2017
@@ -152,9 +152,7 @@ public class IterateSectionWidget extend
String viewSizeString = params.get("VIEW_SIZE" + "_" + WidgetWorker.getPaginatorNumber(context));
viewIndex = Integer.parseInt(viewIndexString);
locViewSize = Integer.parseInt(viewSizeString);
- } catch (RuntimeException e) {
- throw e;
- } catch (Exception e) {
+ } catch (NumberFormatException e) {
try {
viewIndex = ((Integer) context.get("viewIndex")).intValue();
} catch (Exception e2) {