BF[2548885] search window problem

- null checking needed to handle potential user cancel
This commit is contained in:
Heng Sin Low 2009-04-27 07:08:09 +00:00
parent 93a037edf4
commit feedcedcb5
1 changed files with 8 additions and 4 deletions

View File

@ -192,8 +192,10 @@ public abstract class TabbedDesktop extends AbstractDesktop {
ADWindow wnd = new ADWindow(Env.getCtx(), AD_Window_ID, query);
DesktopTabpanel tabPanel = new DesktopTabpanel();
wnd.createPart(tabPanel);
windowContainer.insertAfter(windowContainer.getSelectedTab(), tabPanel, wnd.getTitle(), true, true);
if (wnd.createPart(tabPanel) != null)
{
windowContainer.insertAfter(windowContainer.getSelectedTab(), tabPanel, wnd.getTitle(), true, true);
}
}
/**
@ -205,8 +207,10 @@ public abstract class TabbedDesktop extends AbstractDesktop {
ADWindow wnd = new ADWindow(Env.getCtx(), AD_Window_ID, query);
DesktopTabpanel tabPanel = new DesktopTabpanel();
wnd.createPart(tabPanel);
windowContainer.addWindow(tabPanel, wnd.getTitle(), true);
if (wnd.createPart(tabPanel) != null)
{
windowContainer.addWindow(tabPanel, wnd.getTitle(), true);
}
}
/**