Tabnine Logo
SelectionModel.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
com.manydesigns.elements.options.SelectionModel

Best Java code snippets using com.manydesigns.elements.options.SelectionModel.getValue (Showing top 20 results out of 315)

origin: com.manydesigns/elements

public Object[] getValues() {
  Object object = selectionModel.getValue(selectionModelIndex);
  if(object instanceof Object[]) {
    return (Object[]) object;
  } else if(object != null) {
    return new Object[] { object };
  } else {
    return null;
  }
}
origin: ManyDesigns/Portofino

public Object[] getValues() {
  Object object = selectionModel.getValue(selectionModelIndex);
  if(object instanceof Object[]) {
    return (Object[]) object;
  } else if(object != null) {
    return new Object[] { object };
  } else {
    return null;
  }
}
origin: ManyDesigns/Portofino

public Object getValue() {
  return selectionModel.getValue(selectionModelIndex);
}
origin: com.manydesigns/elements

public Object getValue() {
  return selectionModel.getValue(selectionModelIndex);
}
origin: com.manydesigns/elements

public void writeToObject(Object obj) {
  Object value = selectionModel.getValue(selectionModelIndex);
  writeToObject(obj, value);
}
origin: ManyDesigns/Portofino

public void writeToObject(Object obj) {
  Object value = selectionModel.getValue(selectionModelIndex);
  writeToObject(obj, value);
}
origin: ManyDesigns/Portofino

public void valueToXhtmlHidden(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(inputName, stringValue);
}
origin: com.manydesigns/elements

public void valueToXhtmlHidden(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(inputName, stringValue);
}
origin: ManyDesigns/Portofino

public String getStringValue() {
  Object value = selectionModel.getValue(selectionModelIndex);
  String result = selectionModel.getOption(selectionModelIndex, value, true);
  logger.trace("getStringValue() - name: {} - value: {} - result: {}", new Object[] {getPropertyAccessor().getName(), value, result});
  return result;
}
origin: com.manydesigns/elements

public String getStringValue() {
  Object value = selectionModel.getValue(selectionModelIndex);
  String result = selectionModel.getOption(selectionModelIndex, value, true);
  logger.trace("getStringValue() - name: {} - value: {} - result: {}", new Object[] {getPropertyAccessor().getName(), value, result});
  return result;
}
origin: com.manydesigns/elements

public boolean validate() {
  if (mode.isView(insertable, updatable)
      || (mode.isBulk() && !bulkChecked)) {
    return true;
  }
  Object value = selectionModel.getValue(selectionModelIndex);
  if (required && value == null) {
    errors.add(getText("elements.error.field.required"));
    return false;
  }
  if(value == null && !StringUtils.isBlank(autocompleteInputValue)) {
    errors.add(getText("elements.error.field.invalid", autocompleteInputValue));
    return false;
  }
  return true;
}
origin: ManyDesigns/Portofino

public boolean validate() {
  if (mode.isView(insertable, updatable)
      || (mode.isBulk() && !bulkChecked)) {
    return true;
  }
  Object value = selectionModel.getValue(selectionModelIndex);
  if (required && value == null) {
    errors.add(getText("elements.error.field.required"));
    return false;
  }
  if(value == null && !StringUtils.isBlank(autocompleteInputValue)) {
    errors.add(getText("elements.error.field.invalid", autocompleteInputValue));
    return false;
  }
  return true;
}
origin: com.manydesigns/elements

public void valueToXhtmlEditRadio(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  Map<Object, SelectionModel.Option> options =
      selectionModel.getOptions(selectionModelIndex);
  int counter = 0;
  
  if (!required) {
    String radioId = id + "_" + counter;
    boolean checked = (value == null);
    writeRadioWithLabel(xb, radioId,
        getText("elements.field.select.none"), "", checked);
    counter++;
  }
  for (Map.Entry<Object,SelectionModel.Option> option :
      options.entrySet()) {
    if(!option.getValue().active) {
      continue;
    }
    Object optionValue = option.getKey();
    String optionStringValue =
        (String) OgnlUtils.convertValue(optionValue, String.class);
    String optionLabel = option.getValue().label;
    String radioId = id + "_" + counter;
    boolean checked =  optionValue.equals(value);
    writeRadioWithLabel(xb, radioId, optionLabel,
        optionStringValue, checked);
    counter++;
  }
  // TODO: gestire radio in cascata
}
origin: ManyDesigns/Portofino

public void valueToXhtmlEditRadio(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  Map<Object, SelectionModel.Option> options =
      selectionModel.getOptions(selectionModelIndex);
  int counter = 0;
  
  if (!required) {
    String radioId = id + "_" + counter;
    boolean checked = (value == null);
    writeRadioWithLabel(xb, radioId,
        getText("elements.field.select.none"), "", checked);
    counter++;
  }
  for (Map.Entry<Object,SelectionModel.Option> option :
      options.entrySet()) {
    if(!option.getValue().active) {
      continue;
    }
    Object optionValue = option.getKey();
    String optionStringValue =
        (String) OgnlUtils.convertValue(optionValue, String.class);
    String optionLabel = option.getValue().label;
    String radioId = id + "_" + counter;
    boolean checked =  optionValue.equals(value);
    writeRadioWithLabel(xb, radioId, optionLabel,
        optionStringValue, checked);
    counter++;
  }
  // TODO: gestire radio in cascata
}
origin: com.manydesigns/elements

public void valueToXhtmlEditDropDown(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  Map<Object, SelectionModel.Option> options =
      selectionModel.getOptions(selectionModelIndex);
origin: ManyDesigns/Portofino

public void valueToXhtmlEditDropDown(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  Map<Object, SelectionModel.Option> options =
      selectionModel.getOptions(selectionModelIndex);
origin: com.manydesigns/elements

public void valueToXhtmlAutocomplete(XhtmlBuffer xb) {
  xb.writeLabel(StringUtils.capitalize(label), id, ATTR_NAME_HTML_CLASS);
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(id, inputName, stringValue);
  String label = selectionModel.getOption(selectionModelIndex, value, true);
  xb.openElement("input");
  xb.addAttribute("id", autocompleteId);
  xb.addAttribute("type", "text");
  xb.addAttribute("name", autocompleteInputName);
  xb.addAttribute("value", label);
  xb.addAttribute("class", FORM_CONTROL_CSS_CLASS);
  xb.addAttribute("size", null);
  xb.closeElement("input");
  String js = composeAutocompleteJs();
  xb.writeJavaScript(js);
}
origin: ManyDesigns/Portofino

public void valueToXhtmlAutocomplete(XhtmlBuffer xb) {
  xb.writeLabel(StringUtils.capitalize(label), id, ATTR_NAME_HTML_CLASS);
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(id, inputName, stringValue);
  String label = selectionModel.getOption(selectionModelIndex, value, true);
  xb.openElement("input");
  xb.addAttribute("id", autocompleteId);
  xb.addAttribute("type", "text");
  xb.addAttribute("name", autocompleteInputName);
  xb.addAttribute("value", label);
  xb.addAttribute("class", FORM_CONTROL_CSS_CLASS);
  xb.addAttribute("size", null);
  xb.closeElement("input");
  String js = composeAutocompleteJs();
  xb.writeJavaScript(js);
}
origin: com.manydesigns/elements

public void valueToXhtmlEditAutocomplete(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(id, inputName, stringValue);
  xb.openElement("input");
  xb.addAttribute("id", autocompleteId);
  xb.addAttribute("type", "text");
  xb.addAttribute("name", autocompleteInputName);
  xb.addAttribute("autocomplete", "off");
  xb.addAttribute("value", getStringValue());
  xb.addAttribute("class", EDITABLE_FIELD_CSS_CLASS);
  xb.closeElement("input");
  String js = composeAutocompleteJs();
  xb.writeJavaScript(js);
}
origin: ManyDesigns/Portofino

public void valueToXhtmlEditAutocomplete(XhtmlBuffer xb) {
  Object value = selectionModel.getValue(selectionModelIndex);
  String stringValue = OgnlUtils.convertValueToString(value);
  xb.writeInputHidden(id, inputName, stringValue);
  xb.openElement("input");
  xb.addAttribute("id", autocompleteId);
  xb.addAttribute("type", "text");
  xb.addAttribute("name", autocompleteInputName);
  xb.addAttribute("autocomplete", "off");
  xb.addAttribute("value", getStringValue());
  xb.addAttribute("class", EDITABLE_FIELD_CSS_CLASS);
  xb.closeElement("input");
  String js = composeAutocompleteJs();
  xb.writeJavaScript(js);
}
com.manydesigns.elements.optionsSelectionModelgetValue

Popular methods of SelectionModel

  • setValue
  • getLabelSearch
  • getName
  • getOption
  • getOptions
  • setLabelSearch

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now