/** * Reflects the read-only status of the datasource. If there is no data * source, returns false. */ public boolean isReadOnly() { return dataSource != null && dataSource.isReadOnly(); }
@Override public boolean isReadOnly() { return propertyDataSource.isReadOnly(); }
@Override public boolean isReadOnly() { return super.isReadOnly() || (dataSource != null && dataSource.isReadOnly()); }
@Override public boolean isReadOnly() { return super.isReadOnly() || property.isReadOnly(); }
@Override public void readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent event) { updateVisibility(event.getProperty().isReadOnly()); }
@Override public void evaluate(Property component, WidgetElement element) throws Exception { if (component instanceof Validatable) { Validatable validatable = (Validatable) component; try { validatable.validate(); } catch (InvalidValueException e) { errors.add(e.getMessage()); } } if (!component.isReadOnly()) { try { fetchOrCreateAttribute(element); } catch (Exception e) { errors.add(getMessage("processdata.block.error.eval.other").replaceFirst("%s", component.toString()).replaceFirst("%s", element.getBind()) + "<br/>" + e.getMessage()); } } } };
((ProcessInstanceSimpleAttribute) value).getValue() : value; if (value != null) { boolean readonly = component.isReadOnly(); if (readonly) { component.setReadOnly(false);
boolean readOnly = property.isReadOnly(); if ( readOnly ) { property.setReadOnly( false );
@Override public void evaluate(Property component, WidgetElement element) throws Exception { if (!component.isReadOnly()) { ProcessInstanceAttribute attribute = fetchOrCreateAttribute(element); if (component instanceof FileUploadComponent) { ProcessInstanceAttachmentAttribute attachment = (ProcessInstanceAttachmentAttribute) component.getValue(); if (attachment==null) return; attachment.setProcessState(task.getTaskName()); attachment.setProcessInstance(task.getProcessInstance()); attachment.setKey(attribute.getKey()); PropertyUtils.setProperty(processAttributes, element.getBind(), component.getValue()); } else if (attribute instanceof ProcessInstanceSimpleAttribute) { if (element instanceof DateWidgetElement) { String dateString = null; if (component.getValue() != null) dateString = new SimpleDateFormat(((DateWidgetElement) element).getFormat()).format(component.getValue()); ((ProcessInstanceSimpleAttribute) attribute).setValue(dateString); } else if (component.getValue() != null) { ((ProcessInstanceSimpleAttribute) attribute).setValue(component.getValue().toString()); } } else { PropertyUtils.setProperty(processAttributes, element.getBind(), component.getValue()); } } } };
public void commit() throws Buffered.SourceException, InvalidValueException { if (dataSource != null && !dataSource.isReadOnly()) { if ((isInvalidCommitted() || isValid())) { final Object newValue = getValue();