claudio
Aug 24th, 2004, 08:36 AM
Hi,
i've tried to use the InputApplicationDialog with the empty Constructor. It will not work:
InputApplicationDialog inputDialog = new InputApplicationDialog();
inputDialog.setInputField( new JTextField());
inputDialog.showDialog();
Doing this a NullPointerException will be thrown, because the member formModel is null.
ERROR] ApplicationAdvisor - null <java.lang.NullPointerException>java.lang.NullPointerException
at org.springframework.richclient.forms.SimpleValidat ionResultsReporter.initialize(SimpleValidationResu ltsReporter.java:56)
at org.springframework.richclient.forms.SimpleValidat ionResultsReporter.<init>(SimpleValidationResultsReporter.java:52)
at org.springframework.richclient.dialog.InputApplica tionDialog.getValidationReporter(InputApplicationD ialog.java:102)
at org.springframework.richclient.dialog.InputApplica tionDialog.createDialogContentPane(InputApplicatio nDialog.java:128)
at org.springframework.richclient.dialog.ApplicationD ialog.addDialogComponents(ApplicationDialog.java:4 79)
at org.springframework.richclient.dialog.ApplicationD ialog.createDialog(ApplicationDialog.java:283)
at org.springframework.richclient.dialog.ApplicationD ialog.showDialog(ApplicationDialog.java:252)
The Problem is that the FormModel is null and it will be used in the SimpleValidationResultsReporter. This class throws the NullPointer.
I think we should check this in the InputApplicationDialog like:
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]
i've tried to use the InputApplicationDialog with the empty Constructor. It will not work:
InputApplicationDialog inputDialog = new InputApplicationDialog();
inputDialog.setInputField( new JTextField());
inputDialog.showDialog();
Doing this a NullPointerException will be thrown, because the member formModel is null.
ERROR] ApplicationAdvisor - null <java.lang.NullPointerException>java.lang.NullPointerException
at org.springframework.richclient.forms.SimpleValidat ionResultsReporter.initialize(SimpleValidationResu ltsReporter.java:56)
at org.springframework.richclient.forms.SimpleValidat ionResultsReporter.<init>(SimpleValidationResultsReporter.java:52)
at org.springframework.richclient.dialog.InputApplica tionDialog.getValidationReporter(InputApplicationD ialog.java:102)
at org.springframework.richclient.dialog.InputApplica tionDialog.createDialogContentPane(InputApplicatio nDialog.java:128)
at org.springframework.richclient.dialog.ApplicationD ialog.addDialogComponents(ApplicationDialog.java:4 79)
at org.springframework.richclient.dialog.ApplicationD ialog.createDialog(ApplicationDialog.java:283)
at org.springframework.richclient.dialog.ApplicationD ialog.showDialog(ApplicationDialog.java:252)
The Problem is that the FormModel is null and it will be used in the SimpleValidationResultsReporter. This class throws the NullPointer.
I think we should check this in the InputApplicationDialog like:
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]