public void execute(List<BlueprintDto> result) { for (BlueprintDto bp : result) { blueprints.put(bp.getId(), bp); ListGridRecord record = toGridRecord(bp); addData(record); } setShowEmptyMessage(false); redraw(); } });
public void execute(List<BlueprintDto> result) { if (result.size() > 0) { LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); for (BlueprintDto blueprintDto : result) { if (blueprintDto.isActive()) { valueMap.put(blueprintDto.getId(), blueprintDto.getName()); } } blueprints.setValueMap(valueMap); } else { SC.logWarn(MESSAGES.geodeskSettingsWarnNoBlueprints()); } } });
public void execute(List<BlueprintDto> result) { if (result.size() > 0) { LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); for (BlueprintDto blueprintDto : result) { if (blueprintDto.isActive()) { // only needed for superadmin as list isn't filtered there valueMap.put(blueprintDto.getId(), blueprintDto.getName()); } } blueprints.setValueMap(valueMap); blueprints.clearValue(); blueprints.setDisabled(false); } else { SC.say(MESSAGES.chooseBlueprinWarnNoBlueprints()); save.setDisabled(true); } } });
public void onBlueprintChange(BlueprintEvent bpe) { BlueprintDto old = blueprints.remove(bpe.getBlueprint().getId()); if (old != null && getRecordList() != null) { Record oldr = getRecordList().find(FLD_ID, old.getId()); removeData(oldr); } if (!bpe.isDeleted()) { blueprints.put(bpe.getBlueprint().getId(), bpe.getBlueprint()); ListGridRecord record = toGridRecord(bpe.getBlueprint()); addData(record); if (bpe.isNewInstance()) { deselectAllRecords(); selectRecord(record); } } } }
throw e; } else { Blueprint target = blueprintService.getBlueprintById(request.getBlueprint().getId()); if (target == null) { Exception e = new IllegalArgumentException("No blueprint found for the given id: "
throw e; } else { Blueprint target = blueprintService.getBlueprintById(request.getBlueprint().getId()); if (target == null) { Exception e = new IllegalArgumentException("No blueprint found for the given id: "
/** * {@see org.geomajas.plugin.deskmanager.command.manager.DeleteBlueprintCommand}. * * @param blueprint the blueprint to delete. */ public static void deleteBlueprint(final BlueprintDto blueprint) { DeleteBlueprintRequest request = new DeleteBlueprintRequest(); request.setBlueprintId(blueprint.getId()); GwtCommand command = new GwtCommand(DeleteBlueprintRequest.COMMAND); command.setCommandRequest(request); GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<CommandResponse>() { public void execute(CommandResponse response) { Whiteboard.fireEvent(new BlueprintEvent(blueprint, true, false)); } }); }
@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(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; }
bp.setUserApplicationKey(dto.getUserApplicationKey()); bp.setDeleted(dto.isDeleted()); bp.setId(dto.getId()); bp.setLastEditBy(dto.getLastEditBy()); bp.setLastEditDate(dto.getLastEditDate());
bp.setUserApplicationKey(dto.getUserApplicationKey()); bp.setDeleted(dto.isDeleted()); bp.setId(dto.getId()); bp.setLastEditBy(dto.getLastEditBy()); bp.setLastEditDate(dto.getLastEditDate());
geodeskName.setValue(loket.getName()); geodeskId.setValue(loket.getGeodeskId()); blueprints.setValue(loket.getBlueprint().getId()); geodeskAdministrator.setValue(loket.getCreationBy()); lastEditBy.setValue(loket.getLastEditBy());