Ejemplo n.º 1
0
  private void adjustLoggersTablePage(TablePanel loggersTable, LoggingDto dto) {
    if (loggersTable != null && dto.getLoggers().size() > 10) {
      DataTable table = loggersTable.getDataTable();

      if (table != null) {
        table.setCurrentPage((long) (dto.getLoggers().size() / 10));
      }
    }
  }
Ejemplo n.º 2
0
  private void addClassLoggerPerformed(AjaxRequestTarget target) {
    LoggingDto dto = getModel().getObject();
    ClassLogger logger = new ClassLogger(new ClassLoggerConfigurationType());
    logger.setEditing(true);
    dto.getLoggers().add(logger);

    TablePanel loggersTable = getLoggersTable();
    adjustLoggersTablePage(loggersTable, dto);
    target.add(getLoggersTable());
  }