Examples of ListGridRecord


Examples of com.smartgwt.client.widgets.grid.ListGridRecord

    protected abstract T createOperationHistory();

    @Override
    public ListGridRecord copyValues(T from) {
        ListGridRecord record = new ListGridRecord();

        record.setAttribute(Field.ID, from.getId());
        record.setAttribute(Field.CREATED_TIME, convertTimestampToDate(from.getCreatedTime()));
        record.setAttribute(Field.STARTED_TIME, convertTimestampToDate(from.getStartedTime()));
        record.setAttribute(Field.DURATION, from.getDuration());
        record.setAttribute(Field.SUBJECT, from.getSubjectName());
        record.setAttribute(Field.OPERATION_DEFINITION, from.getOperationDefinition());
        record.setAttribute(Field.OPERATION_NAME, from.getOperationDefinition().getDisplayName());
        record.setAttribute(Field.ERROR_MESSAGE, from.getErrorMessage());
        record.setAttribute(Field.STATUS, from.getStatus().name());
        record.setAttribute(Field.PARAMETERS, from.getParameters());

        return record;
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

                return null;
            }

            @Override
            public ListGridRecord copyValues(Drift<?, ?> from) {
                ListGridRecord record = new ListGridRecord();

                record.setAttribute(DriftDataSource.ATTR_ID, from.getId());

                record.setAttribute(DriftDataSource.ATTR_CTIME, new Date(from.getCtime()));

                record.setAttribute(DriftDataSource.ATTR_CATEGORY,
                    ImageManager.getDriftCategoryIcon((0 == version) ? null : from.getCategory()));

                record.setAttribute(DriftDataSource.ATTR_CHANGESET_VERSION, (null == from.getChangeSet()) ? "0" : from
                    .getChangeSet().getVersion());

                record.setAttribute(DriftDataSource.ATTR_PATH, getFileName(from.getPath(), "/"));

                return record;
            }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

                        + ".getFetchCriteria() returned null - no paging of results will be done.");
                }
                executeFetch(request, response, criteria);
                break;
            case ADD:
                ListGridRecord newRecord = getDataObject(request);
                executeAdd(newRecord, request, response);
                break;
            case UPDATE:
                Record oldRecord = request.getOldValues(); // original values before the update
                Record updatedRecord = getUpdatedRecord(request, oldRecord);
                executeUpdate(updatedRecord, oldRecord, request, response);
                break;
            case REMOVE:
                ListGridRecord deletedRecord = getDataObject(request);
                executeRemove(deletedRecord, request, response);
                break;
            default:
                super.transformRequest(request);
                break;
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

    private Record getUpdatedRecord(DSRequest request, Record oldRecord) {
        // Get changed values.
        JavaScriptObject data = request.getData();
        // Apply changes.
        JSOHelper.apply(data, oldRecord.getJsObj());
        return new ListGridRecord(data);
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

        }
        return results;
    }

    private ListGridRecord transform(DataSourceResponseStatistics.Record stat) {
        ListGridRecord record = new ListGridRecord();
        record.setAttribute(FIELD_TIMESTAMP, stat.timestamp);
        record.setAttribute(FIELD_REQUEST_ID, stat.requestId);
        record.setAttribute(FIELD_STATUS, stat.status);
        record.setAttribute(FIELD_TOTAL_ROWS, stat.totalRows);
        record.setAttribute(FIELD_START_ROW, stat.startRow);
        record.setAttribute(FIELD_END_ROW, stat.endRow);
        return record;
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

        return new ListGridRecord(data);
    }

    private static ListGridRecord getDataObject(DSRequest request) {
        JavaScriptObject data = request.getData();
        ListGridRecord newRecord = new ListGridRecord(data);
        return newRecord;
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

    }

    private void initTitle() {
        if (getTitle() == null) {
            // Now that the table data has been loaded, set the title to include the trait name.
            ListGridRecord record = getListGrid().getRecord(0);
            String displayName = record.getAttributeAsString(MeasurementDataTraitCriteria.SORT_FIELD_DISPLAY_NAME);
            String title = MSG.view_metric_viewTraitHistory(displayName);
            setTitle(title);
        }
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

            return (AlertCondition) from.getAttributeAsObject(FIELD_OBJECT);
        }

        @Override
        public ListGridRecord copyValues(AlertCondition from) {
            ListGridRecord record = new ListGridRecord();
            record.setAttribute(FIELD_CONDITION, AlertFormatUtility.formatAlertConditionForDisplay(from));
            record.setAttribute(FIELD_OBJECT, from);
            return record;
        }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

    }

    public ListGridRecord convert(DriftDefinitionComposite from) {
        DriftDefinition def = from.getDriftDefinition();
        DriftChangeSet<?> changeSet = from.getMostRecentChangeset();
        ListGridRecord record = new ListGridRecord();

        // We need this for Detect Now support
        record.setAttribute(ATTR_ENTITY, def);

        record.setAttribute(ATTR_ID, def.getId());
        record.setAttribute(ATTR_NAME, def.getName());
        record.setAttribute(ATTR_DRIFT_HANDLING_MODE, getDriftHandlingModeDisplayName(def.getDriftHandlingMode()));
        record.setAttribute(ATTR_INTERVAL, String.valueOf(def.getInterval()));
        record.setAttribute(ATTR_BASE_DIR_STRING, getBaseDirString(def.getBasedir()));
        record.setAttribute(ATTR_IS_ENABLED, String.valueOf(def.isEnabled()));
        record.setAttribute(ATTR_IS_ENABLED_ICON, ImageManager.getAvailabilityIcon(def.isEnabled()));
        record.setAttribute(ATTR_COMPLIANCE, def.getComplianceStatus().ordinal());
        record.setAttribute(ATTR_COMPLIANCE_ICON,
            ImageManager.getAvailabilityIcon(def.getComplianceStatus() == DriftComplianceStatus.IN_COMPLIANCE));
        // fixed value, just the edit icon
        record.setAttribute(ATTR_EDIT, hasWriteAccess ? ImageManager.getEditIcon() : ImageManager.getViewIcon());
        record.setAttribute(ATTR_IS_PINNED,
            def.isPinned() ? ImageManager.getPinnedIcon() : ImageManager.getUnpinnedIcon());
        record.setAttribute(ATTR_ATTACHED, def.isAttached() ? MSG.common_val_yes() : MSG.common_val_no());
        if (def.getTemplate() != null) {
            record.setAttribute(ATTR_TEMPLATE, def.getTemplate().getName());
        } else {
            record.setAttribute(ATTR_TEMPLATE, MSG.common_val_none());
        }

        record.setAttribute(ATTR_CHANGE_SET_VERSION,
            (null != changeSet) ? String.valueOf(changeSet.getVersion()) : MSG.common_label_none());
        record.setAttribute(ATTR_CHANGE_SET_CTIME, (null != changeSet) ? new Date(changeSet.getCtime()) : null);

        return record;
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.grid.ListGridRecord

        return rg;
    }

    @Override
    public ListGridRecord copyValues(ResourceGroup from) {
        ListGridRecord record = new ListGridRecord();
        record.setAttribute("group", from);
        record.setAttribute("id", from.getId());
        record.setAttribute(NAME.propertyName(), from.getName());
        record.setAttribute(DESCRIPTION.propertyName(), from.getDescription());
        record.setAttribute(CATEGORY.propertyName(), from.getGroupCategory().name());

        if (from.getResourceType() != null) {
            record.setAttribute("resourceType", from.getResourceType());
            record.setAttribute(TYPE.propertyName(), from.getResourceType().getName());
            record.setAttribute(PLUGIN.propertyName(), from.getResourceType().getPlugin());
        }

        return record;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.