[MGNLUI-2902] Stacktrace in dialog by failed Long converting when field is required Created: 15/May/14 Updated: 13/Jan/18 Resolved: 13/Jan/18 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 5.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Frank Sommer | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Visible to: |
Oliver Emke, Rainer Blumenthal
|
||||||||||||||||
| Description |
|
You can see the stacktrace in a dialog with the following requirements:
See screenshot |
| Comments |
| Comment by Roman Kovařík [ 16/May/14 ] |
Caused by: com.vaadin.data.util.converter.Converter$ConversionException: Could not convert value to Long at com.vaadin.ui.AbstractField.convertToModel(AbstractField.java:748) at com.vaadin.ui.AbstractField.convertToModel(AbstractField.java:725) at com.vaadin.ui.AbstractField.setValue(AbstractField.java:508) ... 103 more Caused by: com.vaadin.data.util.converter.Converter$ConversionException: Could not convert 'dwa' to java.lang.Long at com.vaadin.data.util.converter.AbstractStringToNumberConverter.convertToNumber(AbstractStringToNumberConverter.java:83) at info.magnolia.ui.form.field.factory.AbstractFieldFactory$StringToLongConverter.convertToModel(AbstractFieldFactory.java:318) at info.magnolia.ui.form.field.factory.AbstractFieldFactory$StringToLongConverter.convertToModel(AbstractFieldFactory.java:313) at com.vaadin.data.util.converter.ConverterUtil.convertToModel(ConverterUtil.java:156) at com.vaadin.ui.AbstractField.convertToModel(AbstractField.java:745) ... 105 more |
| Comment by Federico Grilli [ 18/Aug/14 ] |
|
solved by |
| Comment by Jaroslav Simak [ 13/Jan/18 ] |
|
This is still an issue (at least on 5.6+). Haven't tried 5.5 or older.
// Set Required
if (definition.isRequired()) {
field.setInvalidCommitted(true); // this is the culprit
field.setRequired(true);
field.setRequiredError(definition.getRequiredErrorMessage());
}
field.setInvalidCommitted(true); - errors are gone after setting it to false in my custom field. EDIT: issue that caused the this regression: |