Created
July 28, 2012 21:59
How to use enum with DropDownChoice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for RockPaperScissors | |
RockPaperScissors.ROCK=\u30b0\u30fc | |
RockPaperScissors.PAPER=\u30d1\u30fc | |
RockPaperScissors.SCISSORS=\u30c1\u30e7\u30ad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum RockPaperScissors { | |
ROCK,PAPER,SCISSORS; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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