Here is the code that shows that you can keep clicking on the dialog's Ok button when modal message box is opened on top of it. Every click on Dialog's Ok will cause new message box appear.
I was under impression that Modal (Dialog or MessageBox) means you cannot click on anything besides the modal dialog.
final Dialog d = new Dialog();
d.setHeading( "Test" );
d.setModal( true );
d.setHeight( 300 );
d.getButtonBar().getButtonById( Dialog.OK ).addSelectionListener( new SelectionListener(){
public void componentSelected( ComponentEvent ce ) {
MessageBox mb = new MessageBox();
mb.setTitle( "Error" );
mb.setMessage( "Test" );
mb.setButtons( MessageBox.OK );
mb.setIcon( MessageBox.ERROR );
mb.setModal( true );
mb.show();
}
} );
d.show();
I have the same problem. Also one modal dialog appears BEHIND parent modal dialog.
I don't use SVN builds so I cannot try that but even if it works and this is how things suppose to be invoked for modal dialogs this should be moved inside the dialog's show() method instead of forcing users of the API to make this extra calls. Gwt | pgt / adminSight:: As long as this isn’t clarified, GXT is a “no go”. .. allows me to create modal dialog windows with a table widget on them very easily, like this one: http://adminsight.de/?s=gwtHOME |
Have you tried to put your call to the dialog boxes inside a DeferredCommand statement?
DeferredCommand.addCommand(new Command() {
public void execute() {
mb.show();
}
});
Modal dialogs works as expected when using DeferredCommand.
just to clarify I'm using what was publicly available not SVN updates.
DeferredCommand is a GWT class. You should be able to use it regardless of access to SVN.
This is fixed in SVN.
posta07
I'll try it.
Also I completely agree with plitvak that this should be factored into the code of the show() method Ext JS Forums - Search Results:: Modal dialog isn't really modal (GXT 1.0). Views: 758. Posted By Ivan Yatskevich · Modal dialogs works as expected when using Modal dialogs works as http://extjs.net/forum/search.php?searchid=5651156HOME |
I wasn't clear probably.
I mean that if usage of the DeferredCommand is required even after the fix that was put in to SVN to make modal dialogs work properly, then this should be factored into the code of the show() method.
If you just posted the workaround for GXT 1.0, then my previous comment can be ignored.
This should be fixed in the trunk and 1.0 branch. What code are you using?
I've build gxt library from 650 revision, but my dialogs are not modal and appear one behind another.
currently I'm using 1.0.1
I believe using the DeferredCommand will allow the dialog box to render on top of other elements. I guess I should have quoted the person to whom I was responding ;)
I've build gxt library from 650 revision, but my dialogs are not modal and appear one behind another.
1.0 and 1.0.1 both have this problem.
Thanks!
How much does getting a small tattoo on your hip/stomach hurt?
Do anyone else have an itchy anus? ?
|