Hello, I have the following code in FilterToolbar for my DefaultDatatable: LoadableDetachableModel<List<? extends String>> choices = new LoadableDetachableModel<List<? extends String>>() { private static final long serialVersionUID = 1L; @Override protected List<String> load() { List<String> choices = new ArrayList<String>(); choices.add(t("yes")); choices.add(t("no")); return choices; } }; columns.add(new ChoiceFilteredPropertyColumn<User, String>(new Model<String>(t("Locked")), "isLocked", choices));
Now I have a problem. As the property "isLocked" is integer, It gives me decimal conversion error when I filter (and thats correct). The real issue is that I have to convert these yes/no-s to a 1 or 0. Ideally, I would like to use map or something. Maybe somebody knows a reasonable solution here?