@Override public void init(final ProcessInstanceListPresenter presenter) { final List<String> bannedColumns = new ArrayList<String>(); bannedColumns.add(constants.Select()); bannedColumns.add(constants.Id()); bannedColumns.add(constants.Name()); bannedColumns.add(constants.Process_Instance_Description()); bannedColumns.add(constants.Actions()); final List<String> initColumns = new ArrayList<String>(); initColumns.add(constants.Select()); initColumns.add(constants.Id()); initColumns.add(constants.Name()); initColumns.add(constants.Process_Instance_Description()); initColumns.add(constants.Version()); initColumns.add(constants.Actions()); initColumns.add(constants.Version()); final Button button = new Button(); button.setText("+"); button.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { Command addNewGrid = new Command() { @Override public void execute() { HashMap<String, Object> newTabFormValues = newTabFilterPopup.getFormValues(); final String key = getValidKeyForAdditionalListGrid("ProcessInstancesGrid_"); filterPagedTable.saveNewTabSettings(key, newTabFormValues); final ExtendedPagedTable<ProcessInstanceSummary> extendedPagedTable = createGridInstance( new GridGlobalPreferences(key, initColumns, bannedColumns), key); extendedPagedTable.setDataProvider(presenter.getDataProvider()); filterPagedTable.createNewTab( extendedPagedTable, key, button, new Command() { @Override public void execute() { currentListGrid = extendedPagedTable; applyFilterOnPresenter(key); } }); applyFilterOnPresenter(newTabFormValues); } }; createFilterForm(); newTabFilterPopup.show(addNewGrid, getMultiGridPreferencesStore()); } }); super.init( presenter, new GridGlobalPreferences("ProcessInstancesGrid", initColumns, bannedColumns), button); }
@Override public void init(final RequestListPresenter presenter) { final List<String> bannedColumns = new ArrayList<String>(); bannedColumns.add(COLUMN_ID); bannedColumns.add(COLUMN_COMMANDNAME); bannedColumns.add(COL_ID_ACTIONS); final List<String> initColumns = new ArrayList<String>(); initColumns.add(COLUMN_ID); initColumns.add(COLUMN_BUSINESSKEY); initColumns.add(COLUMN_COMMANDNAME); initColumns.add(COL_ID_ACTIONS); final Button button = GWT.create(Button.class); button.setIcon(IconType.PLUS); button.setSize(ButtonSize.SMALL); button.addClickHandler( new ClickHandler() { public void onClick(ClickEvent event) { final String key = getValidKeyForAdditionalListGrid(REQUEST_LIST_PREFIX + "_"); Command addNewGrid = new Command() { @Override public void execute() { final ExtendedPagedTable<RequestSummary> extendedPagedTable = createGridInstance( new GridGlobalPreferences(key, initColumns, bannedColumns), key); extendedPagedTable.setDataProvider(presenter.getDataProvider()); filterPagedTable.createNewTab( extendedPagedTable, key, button, new Command() { @Override public void execute() { currentListGrid = extendedPagedTable; applyFilterOnPresenter(key); } }); applyFilterOnPresenter(key); } }; FilterSettings tableSettings = createTableSettingsPrototype(); tableSettings.setKey(key); dataSetEditorManager.showTableSettingsEditor( filterPagedTable, constants.New_JobList(), tableSettings, addNewGrid); } }); super.init( presenter, new GridGlobalPreferences(REQUEST_LIST_PREFIX, initColumns, bannedColumns), button); }