public Object parse(HttpServletRequest request, String key) throws ParseException {
ListModel listModel = getListModel(request);
if (!listModel.containsKey(key)) {
if (key == null || key.length() == 0) {
if (listModel.getKey(null) != null) {
throw new ParseException("Cannot parse empty/null input", 0);
}
return null;
}
throw new ParseException("Unknown list model key", 0);
}
return listModel.getValue(key);
}