Example usage for org.apache.wicket.markup.html.form AbstractChoice getChoiceRenderer

List of usage examples for org.apache.wicket.markup.html.form AbstractChoice getChoiceRenderer

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.form AbstractChoice getChoiceRenderer.

Prototype

public final IChoiceRenderer<? super E> getChoiceRenderer() 

Source Link

Usage

From source file:org.opensingular.form.wicket.helpers.SingularFormBaseTest.java

License:Apache License

public List<String> getkeysFromSelection(AbstractChoice choice) {
    final List<String> list = new ArrayList<>();
    for (Object c : choice.getChoices()) {
        list.add(choice.getChoiceRenderer().getIdValue(c, choice.getChoices().indexOf(c)));
    }/*from w  ww . j a v  a  2  s .c o  m*/
    return list;
}

From source file:org.opensingular.form.wicket.helpers.SingularFormBaseTest.java

License:Apache License

public List<String> getDisplaysFromSelection(AbstractChoice choice) {
    final List<String> list = new ArrayList<>();
    for (Object c : choice.getChoices()) {
        list.add(String.valueOf(choice.getChoiceRenderer().getDisplayValue(c)));
    }//from  w  ww  .ja v  a  2 s . c  om
    return list;
}