Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.cdlflex.ui.ajax.markup.html.form;
 
 import java.util.List;
 
An AjaxButtonRadioChoice that renders a specific enum type.

Parameters:
<T> The Enum Type
public abstract class AjaxEnumRadioChoice<T extends Enum<T>> extends AjaxButtonRadioChoice<T> {
    private static final long serialVersionUID = 1L;
    public AjaxEnumRadioChoice(String idClass<T> enumType) {
        this(idenumTypenew EnumChoiceRenderer<T>());
    }
    public AjaxEnumRadioChoice(String idClass<T> enumTypeComponent resourceProvider) {
        this(idenumTypenew EnumChoiceRenderer<T>(resourceProvider));
    }
    public AjaxEnumRadioChoice(String idClass<T> enumTypeIChoiceRenderer<T> renderer) {
        super(idenumValues(enumType), renderer);
    }
    private static <E extends Enum<E>> List<E> enumValues(Class<E> type) {
        return Arrays.asList(type.getEnumConstants());
    }
New to GrepCode? Check out our FAQ X