Package com.smartgwt.client.data

Examples of com.smartgwt.client.data.Record


                    .append(FIELD_END_ROW).append('\n');

                RecordList records = getListGrid().getDataAsRecordList();
                int recordsSize = records.getLength();
                for (int i = 0; i < recordsSize; i++) {
                    Record record = records.get(i);
                    csv.append(record.getAttributeAsDate(FIELD_TIMESTAMP)).append(',') //
                        .append(record.getAttribute(FIELD_REQUEST_ID)).append(',') //
                        .append(record.getAttribute(FIELD_STATUS)).append(',') //
                        .append(record.getAttribute(FIELD_TOTAL_ROWS)).append(',') //
                        .append(record.getAttribute(FIELD_START_ROW)).append(',') //
                        .append(record.getAttribute(FIELD_END_ROW)).append('\n');
                }

                new MessageWindow("Export To CSV", "<pre>" + csv.toString() + "</pre>").show();
                refresh();
            }
View Full Code Here


    @Override
    protected void configureCarousel() {
        addCarouselAction("Compare", MSG.common_button_compare(), null, new CarouselAction() {

            public void executeAction(Object actionValue) {
                Record record1 = selectedRecords.get(0);
                Record record2 = selectedRecords.get(1);
                final String path = record1.getAttribute(DriftDataSource.ATTR_PATH);
                String id1 = record1.getAttribute(DriftDataSource.ATTR_ID);
                String id2 = record2.getAttribute(DriftDataSource.ATTR_ID);
                // regardless of selection order, compare the same way, showing newest changes with '+' signs
                int version1 = record1.getAttributeAsInt(DriftDataSource.ATTR_CHANGESET_VERSION);
                int version2 = record2.getAttributeAsInt(DriftDataSource.ATTR_CHANGESET_VERSION);
                String diffOldId = (version1 < version2) ? id1 : id2;
                String diffNewId = (version1 < version2) ? id2 : id1;

                GWTServiceLookup.getDriftService().generateUnifiedDiffByIds(diffOldId, diffNewId,
                    new AsyncCallback<FileDiffReport>() {
View Full Code Here

        //add cell click handler to execute on Table data entries.
        getListGrid().addCellClickHandler(new CellClickHandler() {
            @Override
            public void onCellClick(CellClickEvent event) {
                Record record = event.getRecord();
                String title = record.getAttribute(GroupMetricsTableDataSource.FIELD_METRIC_LABEL);
                ChartViewWindow window = new ChartViewWindow("", title);
                int defId = record.getAttributeAsInt(GroupMetricsTableDataSource.FIELD_METRIC_DEF_ID);

                CompositeGroupD3GraphListView graph = new CompositeGroupD3MultiLineGraph(context, defId);
                window.addItem(graph);
                graph.populateData();
                window.show();
View Full Code Here

                    throw new RuntimeException(caught);
                }
            }

            public void onSuccess(final BundleGroup createdBundleGroup) {
                Record createdBundleGroupRecord = copyValues(createdBundleGroup, false);
                sendSuccessResponse(request, response, createdBundleGroupRecord);
            }
        });
    }
View Full Code Here

        to.setAttribute(Field.NEXT_FIRE_TIME, from.getNextFireTime());
        to.setAttribute(Field.TIMEOUT, (parameters != null) ? parameters.getSimpleValue(
            OperationDefinition.TIMEOUT_PARAM_NAME, null) : null);

        JobTrigger jobTrigger = from.getJobTrigger();
        Record jobTriggerRecord = new ListGridRecord();
        jobTriggerRecord.setAttribute(Field.START_TIME, jobTrigger.getStartDate());
        jobTriggerRecord.setAttribute(Field.REPEAT_INTERVAL, jobTrigger.getRepeatInterval());
        jobTriggerRecord.setAttribute(Field.REPEAT_COUNT, jobTrigger.getRepeatCount());
        jobTriggerRecord.setAttribute(Field.END_TIME, jobTrigger.getEndDate());
        jobTriggerRecord.setAttribute(Field.CRON_EXPRESSION, jobTrigger.getCronExpression());
        to.setAttribute("jobTrigger", jobTriggerRecord);

        return to;
    }
View Full Code Here

    }

    @Override
    protected Record createNewRecord() {
        BundleGroup bundleGroup = new BundleGroup();
        Record bundleGroupRecord = BundleGroupsDataSource.getInstance().copyValues(bundleGroup);
        return bundleGroupRecord;
    }
View Full Code Here

        this.form.saveData(new DSCallback() {
            public void execute(DSResponse response, Object rawData, DSRequest request) {
                if (response.getStatus() == RPCResponse.STATUS_SUCCESS) {
                    Record[] data = response.getData();
                    Record record = data[0];

                    String id = record.getAttribute(FIELD_ID);
                    String name = record.getAttribute(getTitleFieldName());

                    Message message;
                    String conciseMessage;
                    String detailedMessage;
                    DSOperationType operationType = request.getOperationType();
View Full Code Here

    protected void editNewRecord() {
        // Update the view title.
        this.titleBar.setTitle(MSG.widget_recordEditor_title_new(this.dataTypeName));

        // Create a new record.
        Record record = createNewRecord();

        // And populate the form with it.
        this.form.editRecord(record);
        this.form.setSaveOperationType(DSOperationType.ADD);
View Full Code Here

                            throw new IllegalStateException(MSG.widget_recordEditor_error_noRecords());
                        }
                        if (records.length > 1) {
                            throw new IllegalStateException(MSG.widget_recordEditor_error_multipleRecords());
                        }
                        Record record = records[0];
                        editExistingRecord(record);

                        // Now that all the widgets have been created and initialized, make everything visible.
                        displayForm();
                    }
View Full Code Here

    }

    protected static ListGridRecord[] toListGridRecordArray(Record[] roleRecords) {
        ListGridRecord[] roleListGridRecords = new ListGridRecord[roleRecords.length];
        for (int i = ID_NEW, roleRecordsLength = roleRecords.length; i < roleRecordsLength; i++) {
            Record roleRecord = roleRecords[i];
            roleListGridRecords[i] = (ListGridRecord) roleRecord;
        }
        return roleListGridRecords;
    }
View Full Code Here

TOP

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

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.