今天在做一个数据导出JSF的时候,发现新的myfaces1.1.5的数据默认转换写法有点不一样了。 mllm © 2004-2008, allblue <f:view> <h:form> <h:selectOneMenu id="exptype" value="#{exp.type_no}"> <f:selectItem itemLabel="业务1" itemValue="#{1}"/> </h:selectOneMenu> <h:commandButton value="导出指定用户"/> <h:messages showDetail="true"/> </h:form> </f:view> Parsed in 0.001 seconds 并且默认对应的数值转换类型为Long,对应上面的itemValue,Java的Bean的写法为 mllm © 2004-2008, allblue public void setType_no(Long type_no) { //... } public Long getType_no() { return type_no; } Parsed in 0 seconds |
|||
最新评论
2 周 4 天 前
18 周 7 小时 前
19 周 22 小时 前
37 周 1 天 前
37 周 1 天 前
48 周 1 天 前
1 年 6 周 前
1 年 8 周 前
1 年 11 周 前
1 年 12 周 前