private ListGridRecord toGridRecord(BlueprintDto blueprint) { ListGridRecord record = new ListGridRecord(); record.setAttribute(FLD_ID, blueprint.getId()); record.setAttribute(FLD_NAME, blueprint.getName()); record.setAttribute(FLD_LIMIT_TO_TERRITORY, blueprint.isLimitToCreatorTerritory()); record.setAttribute(FLD_PUBLIC, blueprint.isPublic()); record.setAttribute(FLD_ACTIVE, blueprint.isActive()); record.setAttribute(FLD_GEODESKSACTIVE, blueprint.isGeodesksActive()); return record; }
@Override public void onBlueprintChange(BlueprintEvent bpe) { if (!bpe.isDeleted() && !bpe.isNewInstance()) { // just changed for (Record r : getDataAsRecordList().toArray()) { GeodeskDto l = (GeodeskDto) r.getAttributeAsObject(FLD_OBJECT); if (l.getBlueprint().getId().equals(bpe.getBlueprint().getId())) { r.setAttribute(FLD_ACTIVE, l.isActive() && bpe.getBlueprint().isGeodesksActive()); refreshRow(getRecordIndex(r)); if (getSelectedRecord() != null && getSelectedRecord().equals(r)) { deselectAllRecords(); selectRecord(r); } } } } }
private ListGridRecord toGridRecord(GeodeskDto loket) { ListGridRecord record = new ListGridRecord(); record.setAttribute(FLD_ID, loket.getId()); record.setAttribute(FLD_NAME, loket.getName()); record.setAttribute(FLD_BLUEPRINT, loket.getBlueprint().getName()); record.setAttribute(FLD_AUTHOR, loket.getLastEditBy()); record.setAttribute(FLD_PUBLIC, loket.isPublic()); record.setAttribute(FLD_ACTIVE, loket.isActive() && loket.getBlueprint().isGeodesksActive()); record.setAttribute(FLD_ACTIONS, " "); record.setAttribute(FLD_GEODESKID, loket.getGeodeskId()); record.setAttribute(FLD_OWNER, loket.getOwner() != null ? loket.getOwner().getName() : MESSAGES.geodeskGridColumnOwnerNoOwner()); record.setAttribute(FLD_OBJECT, loket); return record; }
public void setBlueprint(BlueprintDto blueprint) { form.clearValues(); this.blueprint = blueprint; if (blueprint != null) { blueprintName.setValue(blueprint.getName()); clientApplicationName.setValue(blueprint.getUserApplicationKey()); lastEditBy.setValue(blueprint.getLastEditBy()); lastEditDate.setValue(DATE_FORMATTER.format(blueprint.getLastEditDate())); active.setValue(blueprint.isActive()); geodesksActive.setValue(blueprint.isGeodesksActive()); publiek.setValue(blueprint.isPublic()); limitToLoketTerritory.setValue(blueprint.isLimitToCreatorTerritory()); limitToUserTerritory.setValue(blueprint.isLimitToUserTerritory()); limitToLoketTerritory.setDisabled(!blueprint.isPublic()); limitToUserTerritory.setDisabled(blueprint.isPublic()); } fireChangedHandler(); }
bp.setLimitToCreatorTerritory(dto.isLimitToCreatorTerritory()); bp.setLimitToUserTerritory(dto.isLimitToUserTerritory()); bp.setGeodesksActive(dto.isGeodesksActive()); bp.setName(dto.getName()); bp.setPublic(dto.isPublic());
bp.setLimitToCreatorTerritory(dto.isLimitToCreatorTerritory()); bp.setLimitToUserTerritory(dto.isLimitToUserTerritory()); bp.setGeodesksActive(dto.isGeodesksActive()); bp.setName(dto.getName()); bp.setPublic(dto.isPublic());
limitToCreatorTerritory.setDisabled(loket.getBlueprint().isLimitToCreatorTerritory()); if (!loket.getBlueprint().isGeodesksActive()) { active.setDisabled(true); active.setHint("<nobr>" + MESSAGES.geodeskSettingsWarnGeodeskInactivedByBlueprint() + "</nobr>");