Search in sources :

Example 1 with InlineRadio

use of org.gwtbootstrap3.client.ui.InlineRadio in project kie-wb-common by kiegroup.

the class RadioGroupFieldRendererBase method refreshInput.

protected void refreshInput(Map<TYPE, String> optionsValues, TYPE selectedValue) {
    input.clear();
    for (TYPE key : optionsValues.keySet()) {
        Radio radio;
        SafeHtml text = getOptionLabel(optionsValues.get(key));
        if (field.getInline()) {
            radio = new InlineRadio(field.getId(), text);
        } else {
            radio = new Radio(field.getId(), text);
        }
        radio.setFormValue(key.toString());
        radio.setEnabled(!field.getReadOnly());
        input.add(radio);
    }
    if (optionsValues.containsKey(selectedValue)) {
        input.setValue(selectedValue, true);
    }
}
Also used : InlineRadio(org.gwtbootstrap3.client.ui.InlineRadio) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) InlineRadio(org.gwtbootstrap3.client.ui.InlineRadio) Radio(org.gwtbootstrap3.client.ui.Radio)

Aggregations

SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 InlineRadio (org.gwtbootstrap3.client.ui.InlineRadio)1 Radio (org.gwtbootstrap3.client.ui.Radio)1