@Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); design.html(DesignFormatter.encodeForTextNode(getValue())); } }
@Override public String getValue() { String value = super.getValue(); if (value != null && value.length() == 0 && isEmptyValuesAsNull()) { return null; } return value; }
private boolean isNoOfGroupsOrTargetFilterEmpty() { return !StringUtils.hasText(noOfGroups.getValue()) || (!StringUtils.hasText((String) targetFilterQueryCombo.getValue()) && !StringUtils.hasText(targetFilterQuery.getValue())); } }
@Override public void buttonClick(ClickEvent event) { contextHolder.setNavigationContext(marshaller.unmarshal(new StreamSource(new ByteArrayInputStream(textArea.getValue().toString().getBytes()) ))); if(specificClickListener != null) { specificClickListener.buttonClick(event); } } });
private void validateXmlSyntaxAndCorrectness() throws Validator.InvalidValueException { try { definitionLoader.unmarshall((String) rawText.getValue()); } catch (Throwable t) { throw new Validator.InvalidValueException(t.getMessage()); } }
private void onKeyChange(final TextChangeEvent event) { if (hasCreatePermission() || hasUpdatePermission()) { if (!valueTextArea.getValue().isEmpty() && !event.getText().isEmpty()) { metadataWindow.setSaveButtonEnabled(true); } else { metadataWindow.setSaveButtonEnabled(false); } } }
private boolean mandatoryCheck() { if (keyTextField.getValue().isEmpty()) { uiNotification.displayValidationError(i18n.getMessage("message.key.missing")); return false; } if (valueTextArea.getValue().isEmpty()) { uiNotification.displayValidationError(i18n.getMessage("message.value.missing")); return false; } return true; }
protected Item updateItemInGrid(final String key) { final IndexedContainer metadataContainer = (IndexedContainer) metaDataGrid.getContainerDataSource(); final Item item = metadataContainer.getItem(key); item.getItemProperty(VALUE).setValue(valueTextArea.getValue()); return item; }
protected Item updateItemInGrid(final String key) { final IndexedContainer metadataContainer = (IndexedContainer) metaDataGrid.getContainerDataSource(); final Item item = metadataContainer.getItem(key); item.getItemProperty(VALUE).setValue(valueTextArea.getValue()); return item; }
@SuppressWarnings("squid:S1172") private void onCheckBoxChange(final ValueChangeEvent event) { if (hasCreatePermission() || hasUpdatePermission()) { if (!getValueTextArea().getValue().isEmpty() && !getKeyTextField().getValue().isEmpty()) { getMetadataWindow().setSaveButtonEnabled(true); } else { getMetadataWindow().setSaveButtonEnabled(false); } } }
protected void onStartOfUpload() { final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload(); targetBulkUpload.setDsNameAndVersion((Long) dsNamecomboBox.getValue()); targetBulkUpload.setDescription(descTextArea.getValue()); targetBulkUpload.setProgressBarCurrentValue(0F); targetBulkUpload.setFailedUploadCount(0); targetBulkUpload.setSucessfulUploadCount(0); closeButton.setEnabled(false); minimizeButton.setEnabled(true); }
private void addNewTarget() { final String newControllerId = controllerIDTextField.getValue(); final String newName = nameTextField.getValue(); final String newDesc = descTextArea.getValue(); final Target newTarget = targetManagement.create( entityFactory.target().create().controllerId(newControllerId).name(newName).description(newDesc)); eventBus.publish(this, new TargetTableEvent(BaseEntityEventType.ADD_ENTITY, newTarget)); uINotification.displaySuccess(i18n.getMessage("message.save.success", new Object[] { newTarget.getName() })); targetTable.setValue(Sets.newHashSet(newTarget.getId())); }
private void addNewTarget() { final String newControllerId = controllerIDTextField.getValue(); final String newName = nameTextField.getValue(); final String newDesc = descTextArea.getValue(); final Target newTarget = targetManagement.create( entityFactory.target().create().controllerId(newControllerId).name(newName).description(newDesc)); eventBus.publish(this, new TargetTableEvent(BaseEntityEventType.ADD_ENTITY, newTarget)); uINotification.displaySuccess(i18n.getMessage("message.save.success", newTarget.getName())); targetTable.setValue(Sets.newHashSet(newTarget.getId())); }
/** * Update the Target if modified. */ public void updateTarget() { /* save updated entity */ final Target target = targetManagement.update(entityFactory.target().update(controllerId) .name(nameTextField.getValue()).description(descTextArea.getValue())); /* display success msg */ uINotification.displaySuccess(i18n.getMessage("message.update.success", new Object[] { target.getName() })); // publishing through event bus eventBus.publish(this, new TargetTableEvent(BaseEntityEventType.UPDATED_ENTITY, target)); }
private void updateSWModuleType(final SoftwareModuleType existingType) { getSoftwareModuleTypeManagement().update(getEntityFactory().softwareModuleType().update(existingType.getId()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview()))); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", existingType.getName())); getEventBus().publish(this, new SoftwareModuleTypeEvent(SoftwareModuleTypeEnum.UPDATE_SOFTWARE_MODULE_TYPE, existingType)); }
private void updateSWModuleType(final SoftwareModuleType existingType) { getSoftwareModuleTypeManagement().update(getEntityFactory().softwareModuleType().update(existingType.getId()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview()))); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", existingType.getName())); getEventBus().publish(this, new SoftwareModuleTypeEvent(SoftwareModuleTypeEnum.UPDATE_SOFTWARE_MODULE_TYPE, existingType)); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getDistributionSetTagManagement().update(update); getEventBus().publish(this, new DistributionSetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (DistributionSetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getTargetTagManagement().update(update); getEventBus().publish(this, new TargetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (TargetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getDistributionSetTagManagement().update(update); getEventBus().publish(this, new DistributionSetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (DistributionSetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getTargetTagManagement().update(update); getEventBus().publish(this, new TargetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (TargetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }