Skip to content

Instantly share code, notes, and snippets.

@m-yamamo0417
Created July 28, 2012 21:59
How to use enum with DropDownChoice
# for RockPaperScissors
RockPaperScissors.ROCK=\u30b0\u30fc
RockPaperScissors.PAPER=\u30d1\u30fc
RockPaperScissors.SCISSORS=\u30c1\u30e7\u30ad
public enum RockPaperScissors {
ROCK,PAPER,SCISSORS;
}
public class RockPaperScissorsDropDownChoice
extends DropDownChoice<RockPaperScissors> {
public RockPaperScissorsDropDownChoice(String id) {
super(id,
Arrays.asList(RockPaperScissors.values()),
new EnumChoiceRenderer<RockPaperScissors>());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment