PDA

View Full Version : Window called from Window



t3q
27 Aug 2009, 5:37 AM
Hello,

I just found out that when I try to show window in other window it won't be shown... I just want modal window called from non modal window. Here's the code:



public class GlobalPermissionDialog extends Window {
public GlobalPermissionDialog(final Content content) {
this.setSize(640, 400);
this.setPlain(true);
this.setModal(false);
this.setHeading("blah blah" + content.getId());
this.setLayout(new FitLayout());
(...)
ToolBar toolBar = new ToolBar();
Button addButton = new Button("Show me next Window");
addButton.addSelectionListener(new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
final ManagePermissionDialog dialog = new ManagePermissionDialog(content);
dialog.show();
}
});
toolBar.add(addButton);
(...)
}
}
Is this correct behaviour or I mess with something ? Meaby there's a different method to acheive this ?

t3q
27 Aug 2009, 6:10 AM
This was my fault, window was not shown becouse of CastException in window class that i tried to call.