Community
Participate
Working Groups
The method updateFromModel fails in certain cases: NumericTextRidget numericText = getRidget(INumericTextRidget.class,"amount"); a) numericText.updateFromModel() and no model is bound, that should silently do nothing..... creates NPE like this: Caused by: java.lang.NullPointerException at org.eclipse.riena.internal.ui.ridgets.swt.NumericTextRidget.checkValue(NumericTextRidget.java:490) at org.eclipse.riena.internal.ui.ridgets.swt.NumericTextRidget.updateFromModel(NumericTextRidget.java:412) at org.eclipse.riena.navigation.ui.controllers.SubModuleController.updateAllRidgetsFromModel(SubModuleController.java:241) b) numericText.bindToModel(new WritableValue()); creates NPE like this: java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at org.eclipse.riena.ui.ridgets.swt.ToStringConverterFactory.createNumberConverter(ToStringConverterFactory.java:38) at org.eclipse.riena.internal.ui.ridgets.swt.NumericTextRidget.getConverter(NumericTextRidget.java:262) at org.eclipse.riena.internal.ui.ridgets.swt.NumericTextRidget.checkValue(NumericTextRidget.java:492) at org.eclipse.riena.internal.ui.ridgets.swt.NumericTextRidget.updateFromModel(NumericTextRidget.java:412) at org.eclipse.riena.navigation.ui.controllers.SubModuleController.updateAllRidgetsFromModel(SubModuleController.java:241)
Created attachment 170328 [details] patch that fixes the problem described under a)
@Elias: can you please review the first patch (it
@Elias can please review patch #1 which should fix usecase a)
usecase b) is actually numericText.bindToModel(new WritableValue()); numericText.updateFromModel();
Created attachment 170329 [details] patch that fixes usecase b)
@elias can you please also review patch b). If you find both ok (they are both already in CVS), please close the bug. thanks
Looks ok to me.