/** * Converts submitted choice id string back to choice object. * * @param id * string id of one of the choice objects in the choices list. can be null. * @return choice object. null if none match the specified id. */ protected T convertChoiceIdToChoice(String id) { final IModel<? extends List<? extends T>> choices = getChoicesModel(); final IChoiceRenderer<? super T> renderer = getChoiceRenderer(); T object = (T) renderer.getObject(id, choices); return object; }
/** * Converts submitted choice id string back to choice object. * * @param id * string id of one of the choice objects in the choices list. can be null. * @return choice object. null if none match the specified id. */ protected T convertChoiceIdToChoice(String id) { final IModel<? extends List<? extends T>> choices = getChoicesModel(); final IChoiceRenderer<? super T> renderer = getChoiceRenderer(); T object = (T) renderer.getObject(id, choices); return object; }