Search in sources :

Example 1 with DisplayableValueChoiceRenderer

use of com.evolveum.midpoint.web.component.input.DisplayableValueChoiceRenderer in project midpoint by Evolveum.

the class WebComponentUtil method createEnumPanel.

public static DropDownChoicePanel createEnumPanel(final PrismPropertyDefinition def, String id, final IModel model) {
    final Object o = model.getObject();
    final IModel<List<DisplayableValue>> enumModelValues = (IModel<List<DisplayableValue>>) () -> getDisplayableValues(def.getAllowedValues());
    return new DropDownChoicePanel(id, model, enumModelValues, new DisplayableValueChoiceRenderer(getDisplayableValues(def.getAllowedValues())), true);
}
Also used : IModel(org.apache.wicket.model.IModel) DropDownChoicePanel(com.evolveum.midpoint.web.component.input.DropDownChoicePanel) DisplayableValueChoiceRenderer(com.evolveum.midpoint.web.component.input.DisplayableValueChoiceRenderer)

Aggregations

DisplayableValueChoiceRenderer (com.evolveum.midpoint.web.component.input.DisplayableValueChoiceRenderer)1 DropDownChoicePanel (com.evolveum.midpoint.web.component.input.DropDownChoicePanel)1 IModel (org.apache.wicket.model.IModel)1