/** SetVisible for components by checking if there's a right for it. */
  private void doCheckRights() {

    final UserWorkspace workspace = getUserWorkspace();

    orderPositionDialogWindow.setVisible(workspace.isAllowed("orderPositionDialogWindow"));

    btnHelp.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnHelp"));
    btnNew.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnNew"));
    btnEdit.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnEdit"));
    btnDelete.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnDelete"));
    btnSave.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnSave"));
    btnClose.setVisible(workspace.isAllowed("button_OrderPositionDialog_btnClose"));
  }
Exemple #2
0
  /**
   * Recalculates the container size for this controller and resize them.
   *
   * <p>Calculate how many rows have been place in the listbox. Get the currentDesktopHeight from a
   * hidden Intbox from the index.zul that are filled by onClientInfo() in the indexCtroller.
   */
  public void doFitSize() {

    // normally 0 ! Or we have a i.e. a toolBar on top of the listBox.
    final int specialSize = 5;

    final int menuOffset = UserWorkspace.getInstance().getMenuOffset();
    int height =
        ((Intbox) Path.getComponent("/outerIndexWindow/currentDesktopHeight"))
            .getValue()
            .intValue();
    height = height - menuOffset;
    final int maxListBoxHeight = height - specialSize - 148;
    setCountRows((int) Math.round(maxListBoxHeight / 17.7));
    borderLayout_branchList.setHeight(String.valueOf(maxListBoxHeight) + "px");

    windowBranchList.invalidate();
  }