示例#1
0
  public void renderHomeTab() {
    homeTab.getChildren().clear();

    dashboardController.render(homeTab, this, true);

    West w = layout.getWest();
    w.getChildren().clear();
    sideController.render(w, this, false);
  }
  /** Creates the MainMenu as TreeMenu as default. <br> */
  private void createMainTreeMenu(Event event) {

    // get an instance of the borderlayout defined in the index.zul-file
    Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain");

    // get an instance of the searched west layout area
    West west = bl.getWest();
    west.setFlex(true);
    west.setAutoscroll(true);
    // clear the WEST child comps
    west.getChildren().clear();

    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("indexController", this);

    // create the components from the src/main/resources/mainmenu.xml and
    // put it in the WEST layout area
    // Overhand this controller self in a map
    Executions.createComponents("/WEB-INF/xhtml/mainTreeMenu.zul", west, map);
  }