Package com.smartgwt.client.data

Examples of com.smartgwt.client.data.ResultSet


    private void refreshRowCount() {
        Label tableInfo = getTableInfo();
        if (tableInfo != null) {
            boolean lengthIsKnown = false;
            if (listGrid != null) {
                ResultSet results = listGrid.getResultSet();
                if (results != null) {
                    Boolean flag = results.lengthIsKnown();
                    if (flag != null) {
                        lengthIsKnown = flag.booleanValue();
                    }
                } else {
                    lengthIsKnown = (listGrid.getDataSource() == null); // not bound by a datasource, assume we know
View Full Code Here


        });
        if (canSupportDeleteAndAcknowledgeAll()) {
            addTableAction(MSG.common_button_ack_all(), MSG.view_alerts_ack_confirm_all(), new TableAction() {
                public boolean isEnabled(ListGridRecord[] selection) {
                    ListGrid grid = getListGrid();
                    ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                    return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
                }

                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    acknowledgeAll();
                }
            });
        }

        addTableAction(MSG.common_button_delete(), MSG.view_alerts_delete_confirm(), ButtonColor.RED,
            new ResourceAuthorizedTableAction(AlertHistoryView.this, TableActionEnablement.ANY, (hasWriteAccess ? null
                : Permission.MANAGE_ALERTS), new RecordExtractor<Integer>() {
                public Collection<Integer> extract(Record[] records) {
                    List<Integer> result = new ArrayList<Integer>(records.length);
                    for (Record record : records) {
                        result.add(record.getAttributeAsInt("resourceId"));
                    }
                    return result;
                }
            }) {

            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                delete(selection);
            }
        });
        if (canSupportDeleteAndAcknowledgeAll()) {
            addTableAction(MSG.common_button_delete_all(), MSG.view_alerts_delete_confirm_all(), ButtonColor.RED,
                new TableAction() {
                public boolean isEnabled(ListGridRecord[] selection) {
                    ListGrid grid = getListGrid();
                    ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                    return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
                }

                public void executeAction(ListGridRecord[] selection, Object actionValue) {
                    deleteAll();
                }
View Full Code Here

        addTableAction(MSG.common_button_delete_all(), MSG.view_drift_confirm_deleteAllDefs(), ButtonColor.RED,
            new TableAction() {
            public boolean isEnabled(ListGridRecord[] selection) {
                ListGrid grid = getListGrid();
                ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
                return (hasWriteAccess && grid != null && resultSet != null && !resultSet.isEmpty());
            }

            public void executeAction(ListGridRecord[] selection, Object actionValue) {
                deleteAll();
            }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.data.ResultSet

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.