com.vaadin.v7.ui.TextField.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(153)

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

TextField.setValue介绍

暂无

代码示例

代码示例来源:origin: OpenNMS/opennms

/**
 * Add key.
 *
 * @param key the key to be used
 * @return the instance itself
 */
public KeyValueInputDialogWindow withKey(String key) {
  m_keyInputField.setValue(key);
  return this;
}

代码示例来源:origin: OpenNMS/opennms

/**
 * Add value.
 *
 * @param value the value to be used
 * @return the instance itself
 */
public KeyValueInputDialogWindow withValue(String value) {
  m_valueInputField.setValue(value);
  return this;
}

代码示例来源:origin: viritin/viritin

@Override
protected void setValue(String newFieldValue, boolean repaintIsNotNeeded) throws ReadOnlyException, Converter.ConversionException, Validator.InvalidValueException {
  lastKnownTextChangeValue = null;
  eagerValidationError = null;
  super.setValue(newFieldValue, repaintIsNotNeeded);
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

@Override
public void clear() {
  setValue("");
}

代码示例来源:origin: OpenNMS/opennms

@Override
public void setValue(final String newValue) throws ReadOnlyException {
  this.textField.setValue(newValue);
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public Void visit(ExponentialPropagation exponentialPropagation) {
    m_exponentialPropagationBaseTextField.setValue(String.valueOf(exponentialPropagation.getBase()));
    return null;
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
public Void visit(Threshold threshold) {
  m_thresholdTextField.setValue(String.valueOf(threshold.getThreshold()));
  return null;
}

代码示例来源:origin: tepi/FilteringTable

@Override
  public void textChange(TextChangeEvent event) {
    textField.setValue(event.getText());
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
public Void visit(ReductionKeyEdge edge) {
  m_typeSelect.setValue(EdgeType.REDUCTION_KEY);
  m_reductionKeyComponent.setValue(edge.getReductionKey());
  m_friendlyNameField.setValue(edge.getFriendlyName());
  m_reductionKeyComponent.setEnabled(false);
  return null;
}

代码示例来源:origin: OpenNMS/opennms

@Override
  public Void visit(ApplicationEdge edge) {
    m_typeSelect.setValue(EdgeType.APPLICATION);
    m_friendlyNameField.setValue(edge.getFriendlyName());
    m_ipServiceComponent.setEnabled(false);
    return null;
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void textChange(FieldEvents.TextChangeEvent event) {
    editableField.setComponentError(null);
    editableField.setValue(event.getText());
    editableField.validate();
  }
});

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

@Override
public void readDesign(Element design, DesignContext designContext) {
  super.readDesign(design, designContext);
  Attributes attr = design.attributes();
  if (attr.hasKey("value")) {
    String newFieldValue = DesignAttributeHandler.readAttribute("value",
        attr, String.class);
    setValue(newFieldValue, false, true);
  }
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

private void enterDataForCompositeField(CompositeField compositeField, String... values) {
    Layout fieldContent = (Layout) compositeField.iterator().next();
    for (int index = 0; index < values.length; index++) {
      getTextField(fieldContent, index).setValue(values[index]);
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
protected void setInternalValue(Rrd rrd) {
  boolean stepState = step.isReadOnly();
  step.setReadOnly(false);
  step.setValue(rrd.getStep().toString());
  if (stepState) {
    step.setReadOnly(true);
  }
  container.removeAllItems();
  for (String rra : rrd.getRras()) {
    container.addOnmsBean(new RRA(rra));
  }
}

代码示例来源:origin: OpenNMS/opennms

@Override
public Void visit(IpServiceEdge edge) {
  m_typeSelect.setValue(EdgeType.IP_SERVICE);
  for (IpService ipService : (Collection<IpService>) m_ipServiceComponent.getItemIds()) {
    if (ipService.getId() == edge.getIpService().getId()) {
      m_ipServiceComponent.setValue(ipService);
      break;
    }
  }
  m_friendlyNameField.setValue(edge.getFriendlyName());
  m_ipServiceComponent.setEnabled(false);
  return null;
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void linkField_SetFieldPropagation() throws Exception {
  // GIVEN
  baseNode.setProperty(propertyName, "notChanged");
  setFactory(null);
  Field<String> field = linkFieldFactory.createField();
  assertThat("notChanged", is(((LinkField) field).getTextField().getValue()));
  // WHEN
  ((LinkField) field).getTextField().setValue("Changed");
  // THEN
  assertThat("Changed", is(((LinkField) field).getTextField().getValue()));
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void validationSucceedsIfRequiredFieldIsNotEmpty() throws Exception {
  // GIVEN
  textFieldDefinition.setRequired(true);
  createField();
  TextField textField = getSubFieldWithType(TextField.class);
  textField.setValue("foo");
  // WHEN
  boolean isValid = compositeField.isValid();
  // THEN
  assertTrue(isValid);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void validationSuccedsIfNotRequiredSubFieldIsEmpty() throws Exception {
  // GIVEN
  createField();
  // add new non mandatory text field
  TextField textField = new TextField();
  textField.setValue("");
  addSubField(textField);
  // WHEN
  boolean isValid = multiField.isValid();
  // THEN
  assertTrue(isValid);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void validationSuccedsIfRequiredSubFieldIsNotEmpty() throws Exception {
  // GIVEN
  definition.setRequired(true);
  createField();
  // add new mandatory text field
  TextField textField = new TextField();
  textField.setValue("foo");
  addSubField(textField);
  // WHEN
  boolean isValid = multiField.isValid();
  // THEN
  assertTrue(isValid);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Test
public void validationSuccedsIfSubFieldValidatorPasses() throws Exception {
  // GIVEN
  createField();
  // add text field with valid email text
  TextField textField = new TextField();
  textField.addValidator(EMAIL_VALIDATOR);
  textField.setValue("foo@magnolia-cms.com");
  addSubField(textField);
  // WHEN
  boolean isValid = multiField.isValid();
  // THEN
  assertTrue(isValid);
}

相关文章