Vinod
Vinod

Reputation: 2311

How to create dropdown list in OpenXava?

how can we create the dropdown list type question in OpenXava? Let's say Gender is the question with (Male, Female, Other) with respective answers.

How can I declare the variable in the POJO class. Or do we have any hibernate annotations for the same.

Please suggest.

Upvotes: 0

Views: 1539

Answers (1)

javierpaniza
javierpaniza

Reputation: 702

Define your property as an enum, thus:

private Sex sex;
public enum Sex { MALE, FEMALE, OTHER }

OpenXava will generate a combo for that.

Upvotes: 1

Related Questions