mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
04.14.2009 3c1e7fd4d2a7ffa65263e1e84c940c95faf44085
Fix for issue 4336 (Control Panel: Structural changes won't refresh / no refresh button/menuentry)
Refresh the contents when the browser window is re-opened.
1 files modified
31 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java 31 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
@@ -155,6 +155,8 @@
  private Thread entryReaderThread;
  private boolean forceRefreshWhenOpening;
  /**
   * {@inheritDoc}
   */
@@ -203,6 +205,28 @@
  /**
   * {@inheritDoc}
   */
  public void toBeDisplayed(boolean visible)
  {
    super.toBeDisplayed(visible);
    boolean isAuthenticated = false;
    if (getInfo() != null && getInfo().getServerDescriptor() != null)
    {
      isAuthenticated = getInfo().getServerDescriptor().isAuthenticated();
    }
    if (visible && !isDisposeOnClose() && forceRefreshWhenOpening &&
        isAuthenticated)
    {
      refreshClicked();
    }
    if (!visible)
    {
      forceRefreshWhenOpening = isAuthenticated;
    }
  }
  /**
   * {@inheritDoc}
   */
  protected Component createMainPanel()
  {
    JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
@@ -1328,7 +1352,7 @@
      {
        public void actionPerformed(ActionEvent ev)
        {
          entryPane.getController().startRefresh(null);
          refreshClicked();
        }
      });
      return menu;
@@ -1555,4 +1579,9 @@
    }
    return isInterruptedException;
  }
  private void refreshClicked()
  {
    entryPane.getController().startRefresh(null);
  }
}