Hi,
i've tried to use the InputApplicationDialog with the empty Constructor. It will not work:
Doing this a NullPointerException will be thrown, because the member formModel is null.Code:InputApplicationDialog inputDialog = new InputApplicationDialog(); inputDialog.setInputField( new JTextField()); inputDialog.showDialog();
The Problem is that the FormModel is null and it will be used in the SimpleValidationResultsReporter. This class throws the NullPointer.Code:ERROR] ApplicationAdvisor - null <java.lang.NullPointerException>java.lang.NullPointerException at org.springframework.richclient.forms.SimpleValidationResultsReporter.initialize(SimpleValidationResultsReporter.java:56) at org.springframework.richclient.forms.SimpleValidationResultsReporter.<init>(SimpleValidationResultsReporter.java:52) at org.springframework.richclient.dialog.InputApplicationDialog.getValidationReporter(InputApplicationDialog.java:102) at org.springframework.richclient.dialog.InputApplicationDialog.createDialogContentPane(InputApplicationDialog.java:128) at org.springframework.richclient.dialog.ApplicationDialog.addDialogComponents(ApplicationDialog.java:479) at org.springframework.richclient.dialog.ApplicationDialog.createDialog(ApplicationDialog.java:283) at org.springframework.richclient.dialog.ApplicationDialog.showDialog(ApplicationDialog.java:252)
I think we should check this in the InputApplicationDialog like:
Code:private SimpleMessageAreaPane getValidationReporter() { if (reporter == null) { this.reporter = new SimpleMessageAreaPane(); if( formModel != null) // not sure if check here or at the first if new SimpleValidationResultsReporter(formModel, this, this.reporter); } return reporter; }
siu
Claudio
ps: does this belongs the developerlist?
[/code]


Reply With Quote