TitleAreaDialog: Widgets disposed after click on the OK-Button [message #490423] |
Thu, 08 October 2009 11:39  |
Eclipse User |
|
|
|
Hello,
I have a JFace TitleAreaDialog, which change some properties for a given person.
In this dialog there are some textfields and some radio-Buttons.
I generate the OK and Cancel Button in the methode createButtonsForButtonBar().
@Override
protected void createButtonsForButtonBar(Composite parent) {
okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
okButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
person.setName(name.getText());
....
setReturnCode(OK);
close();
}
});
cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
cancelButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
setReturnCode(CANCEL);
close();
}
});
}
But the problem is, when I click the ok Button and want to set the properties for the person., all textfields, radiobuttons are disposed and I don't get any values.
What is the reason for that, and what must I changed to set the values after click on the ok-Button.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05075 seconds