@InitBinder
public void initBinder(WebDataBinder dataBinder) {
dataBinder.registerCustomEditor(ContactTopicType.class, new PropertyEditorSupport() {
@Override
public void setAsText(String value) throws IllegalArgumentException {
setValue(ContactTopicType.valueOf(value));
}
@Override
public String getAsText() {
if(getValue() == null)
return "";
return ((ContactTopicType) getValue()).name();
}
});
}
ContactController.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:podcastpedia-web
作者:
评论列表
文章目录