org.jboss.errai.common.client.dom.Option.setValue()方法的使用及代码示例

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

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

Option.setValue介绍

暂无

代码示例

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client

private Option newOption(final String text,
             final String value) {
  final Option option = (Option) Window.getDocument().createElement("option");
  option.setTextContent(text);
  option.setValue(value);
  return option;
}

代码示例来源:origin: org.kie.workbench/kie-wb-common-ala-ui-client

private Option newOption(final String text,
             final String value) {
  final Option option = (Option) Window.getDocument().createElement("option");
  option.setTextContent(text);
  option.setValue(value);
  return option;
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

private static Option newOption(final String text,
                  final String value) {
    final Option option = (Option) Window.getDocument().createElement("option");
    option.setTextContent(text);
    option.setValue(value);
    return option;
  }
}

代码示例来源:origin: org.guvnor/guvnor-ala-ui-client

private Option newOption(final String text,
             final String value) {
  final Option option = (Option) Window.getDocument().createElement("option");
  option.setTextContent(text);
  option.setValue(value);
  return option;
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-client

private Option newOption(final String text,
             final String value) {
  final Option option = (Option) Window.getDocument().createElement("option");
  option.setTextContent(text);
  option.setValue(value);
  return option;
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-bpmn-client

private Option newOption(final String text,
             final String value) {
  final Option option = (Option) Window.getDocument().createElement("option");
  option.setTextContent(text);
  option.setValue(value);
  return option;
}

代码示例来源:origin: org.kie.workbench.forms/kie-wb-common-forms-editor-client

@Override
public void addModelField(String property,
             boolean selected) {
  Option option = (Option) document.createElement("option");
  option.setText(property);
  option.setValue(property);
  option.setSelected(selected);
  bindings.add(option);
}

代码示例来源:origin: org.optaplanner/optaplanner-wb-solver-editor-client

private Option createOption(final Pair<String, String> optionPair) {
  Option option = (Option) document.createElement("option");
  option.setText(optionPair.getK1());
  option.setValue(optionPair.getK2());
  return option;
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

public void addOption(final String text,
           final String subText,
           final String value,
           final Boolean selected) {
  final Option option = (Option) document.createElement("option");
  option.setText(text);
  option.setValue(value);
  option.setSelected(selected);
  if (isNullOrEmpty(subText) == false) {
    option.setAttribute("data-subtext",
              subText);
  }
  select.add(option);
}

代码示例来源:origin: org.optaplanner/optaplanner-wb-solver-editor-client

private Option createOption(final Pair<String, String> optionPair) {
  Option option = (Option) document.createElement("option");
  option.setText(optionPair.getK1());
  option.setValue(optionPair.getK2());
  return option;
}

代码示例来源:origin: org.jbpm/jbpm-console-ng-case-mgmt-client

public void addOption(final String text, final String value, final Boolean selected) {
  final Option option = (Option) document.createElement("option");
  option.setText(text);
  option.setValue(value);
  option.setSelected(selected);
  select.add(option);
}

代码示例来源:origin: kiegroup/appformer

public void addOption(final String text,
           final String subText,
           final String value,
           final Boolean selected) {
  final Option option = (Option) document.createElement("option");
  option.setText(text);
  option.setValue(value);
  option.setSelected(selected);
  if (isNullOrEmpty(subText) == false) {
    option.setAttribute("data-subtext",
              subText);
  }
  select.add(option);
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Test
public void testAddOption() {
  final Option option = mock(Option.class);
  when(document.createElement("option")).thenReturn(option);
  select.addOption("text",
           "subText",
           "value",
           true);
  verify(option).setText("text");
  verify(option).setValue("value");
  verify(option).setSelected(true);
  option.setAttribute("data-subtext",
            "subText");
  verify(selectMock).add(option);
}

代码示例来源:origin: kiegroup/appformer

@Test
public void testAddOption() {
  final Option option = mock(Option.class);
  when(document.createElement("option")).thenReturn(option);
  select.addOption("text",
           "subText",
           "value",
           true);
  verify(option).setText("text");
  verify(option).setValue("value");
  verify(option).setSelected(true);
  option.setAttribute("data-subtext",
            "subText");
  verify(selectMock).add(option);
}

相关文章