com.vaadin.data.Property.isReadOnly()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(71)

本文整理了Java中com.vaadin.data.Property.isReadOnly()方法的一些代码示例,展示了Property.isReadOnly()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.isReadOnly()方法的具体详情如下:
包路径:com.vaadin.data.Property
类名称:Property
方法名:isReadOnly

Property.isReadOnly介绍

暂无

代码示例

代码示例来源:origin: org.vaadin.addons/customfield

/**
 * Reflects the read-only status of the datasource. If there is no data
 * source, returns false.
 */
public boolean isReadOnly() {
  return dataSource != null && dataSource.isReadOnly();
}

代码示例来源:origin: org.aperteworkflow/base-widgets

@Override
public boolean isReadOnly() {
  return propertyDataSource.isReadOnly();
}

代码示例来源:origin: org.vaadin.addons/customfield

@Override
public boolean isReadOnly() {
  return super.isReadOnly()
      || (dataSource != null && dataSource.isReadOnly());
}

代码示例来源:origin: org.vaadin.addons/customfield

@Override
public boolean isReadOnly() {
  return super.isReadOnly() || property.isReadOnly();
}

代码示例来源:origin: org.opennms.features/jmxconfiggenerator.webui

@Override
public void readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent event) {
  updateVisibility(event.getProperty().isReadOnly());
}

代码示例来源:origin: org.aperteworkflow/base-widgets

@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());
      }
    }
  }
};

代码示例来源:origin: org.aperteworkflow/base-widgets

((ProcessInstanceSimpleAttribute) value).getValue() : value;
if (value != null) {
  boolean readonly = component.isReadOnly();
  if (readonly) {
    component.setReadOnly(false);

代码示例来源:origin: org.metawidget.modules/metawidget-all

boolean readOnly = property.isReadOnly();
if ( readOnly ) {
  property.setReadOnly( false );

代码示例来源:origin: org.aperteworkflow/base-widgets

@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());
      }
    }
  }
};

代码示例来源:origin: org.vaadin.addons/customfield

public void commit() throws Buffered.SourceException, InvalidValueException {
  if (dataSource != null && !dataSource.isReadOnly()) {
    if ((isInvalidCommitted() || isValid())) {
      final Object newValue = getValue();

相关文章

微信公众号

最新文章

更多