Package org.rhq.coregui.client.components.table

Examples of org.rhq.coregui.client.components.table.AbstractTableAction


        super.configureTable();
        addExportAction();
    }

    private void addExportAction() {
        addTableAction("Export", MSG.common_button_reports_export(), ButtonColor.BLUE, new AbstractTableAction() {
            @Override
            public boolean isEnabled(ListGridRecord[] selection) {
                return enableIfRecordsExist(getListGrid());
            }
View Full Code Here


        // alerts grouping
        Map<String, Object> items = new LinkedHashMap<String, Object>(2);
        items.put("On", true);
        items.put("Off", false);
        addTableAction(MSG.view_adminTopology_storageNodes_groupAlerts(), null, items, ButtonColor.GRAY,
            new AbstractTableAction(TableActionEnablement.ALWAYS) {
                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    setGrouping((Boolean) actionValue);
                }
            });
    }
View Full Code Here

        super.configureTable();
        addExportAction();
    }

    private void addExportAction() {
        addTableAction("Export", MSG.common_button_reports_export(), ButtonColor.BLUE, new AbstractTableAction() {
            @Override
            public boolean isEnabled(ListGridRecord[] selection) {
                return enableIfRecordsExist(getListGrid());
            }
View Full Code Here

        addExportAction();

    }

    private void addExportAction() {
        addTableAction("Export", MSG.common_button_reports_export(), ButtonColor.BLUE, new AbstractTableAction() {
            @Override
            public boolean isEnabled(ListGridRecord[] selection) {
                return enableIfRecordsExist(getListGrid());
            }
View Full Code Here

        return VIEW_ID;
    }


    private void addExportAction() {
        addTableAction("Export",  MSG.common_button_reports_export(), ButtonColor.BLUE, new AbstractTableAction() {
            @Override
            public boolean isEnabled(ListGridRecord[] selection) {
                return enableIfRecordsExist(getListGrid());
            }
View Full Code Here

            addExportAction();
        }
    }

    private void addExportAction() {
        addTableAction("Export", MSG.common_button_reports_export(), ButtonColor.BLUE, new AbstractTableAction() {
            @Override
            public boolean isEnabled(ListGridRecord[] selection) {
                return enableIfRecordsExist(getListGrid());
            }
View Full Code Here

        ListGrid listGrid = getListGrid();
        listGrid.setFields(fieldId, fieldDateCreated, fieldLastUpdated, fieldStatus, fieldUser);

        addTableAction(MSG.common_button_delete(), MSG.common_msg_areYouSure(), ButtonColor.RED,
            new AbstractTableAction(this.groupPerms.isInventory() ? TableActionEnablement.ANY
                : TableActionEnablement.NEVER) {

                @Override
                public void executeAction(final ListGridRecord[] selection, Object actionValue) {
                    if (selection == null || selection.length == 0) {
                        return;
                    }

                    ConfigurationGWTServiceAsync service = GWTServiceLookup.getConfigurationService();
                    Integer groupId = HistoryGroupPluginConfigurationTable.this.group.getId();
                    Integer[] updateIds = new Integer[selection.length];
                    int i = 0;
                    for (ListGridRecord record : selection) {
                        updateIds[i++] = record.getAttributeAsInt(DataSource.Field.ID);
                    }

                    service.deleteGroupPluginConfigurationUpdate(groupId, updateIds, new AsyncCallback<Void>() {
                        @Override
                        public void onSuccess(Void result) {
                            refresh();
                            Message message = new Message(MSG.view_group_pluginConfig_table_deleteSuccessful(String
                                .valueOf(selection.length)), Message.Severity.Info, EnumSet
                                .of(Message.Option.Transient));
                            CoreGUI.getMessageCenter().notify(message);
                        }

                        @Override
                        public void onFailure(Throwable caught) {
                            refreshTableInfo();
                            CoreGUI.getErrorHandler().handleError(MSG.view_group_pluginConfig_table_deleteFailure(),
                                caught);
                        }
                    });
                }
            });

        addTableAction(MSG.view_group_pluginConfig_table_viewSettings(), ButtonColor.BLUE, new AbstractTableAction(
            TableActionEnablement.SINGLE) {
            @Override
            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                CoreGUI.goToView(LinkManager.getGroupPluginConfigurationUpdateHistoryLink(
                    EntityContext.forGroup(HistoryGroupPluginConfigurationTable.this.group), null)
                    + "/" + selection[0].getAttribute(DataSource.Field.ID) + "/Settings");
                refreshTableInfo();
            }
        });

        addTableAction(MSG.view_group_pluginConfig_table_viewMemberHistory(), new AbstractTableAction(
            TableActionEnablement.SINGLE) {
            @Override
            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                CoreGUI.goToView(LinkManager.getGroupPluginConfigurationUpdateHistoryLink(
                    EntityContext.forGroup(HistoryGroupPluginConfigurationTable.this.group), null)
View Full Code Here

                        popupNotificationEditor(notif);
                    }
                }
            });

            addTableAction(MSG.common_button_add(), null, ButtonColor.BLUE, new AbstractTableAction() {
                @Override
                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    popupNotificationEditor(null);
                }
            });

            addTableAction(MSG.common_button_delete(), MSG.view_alert_definition_notification_editor_delete_confirm(),
                ButtonColor.RED, new AbstractTableAction(TableActionEnablement.ANY) {
                    @Override
                    public void executeAction(ListGridRecord[] selection, Object actionValue) {
                        for (ListGridRecord record : selection) {
                            AlertNotification notif = (getDataSource()).copyValues(record);
                            notifications.remove(notif);
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.table.AbstractTableAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.