ActionForm的ArrayList和HashSet有和区别

Arong0512 2005-08-01 11:55:59
我的ActionForm有个集合属性private Collection orderItems = new ArrayList();在JSP页面构造form input没问题:
<nested:iterate property="orderItems" indexId="index">
<nested:nest property="product"><nested:text property="productId"/></nested:nest>
<nested:text property="quantity"/>
<nested:text property="unitprice"/>
</nested:iterate>
可是为了与Hibernate结合,改为
private Collection items = new HashSet();却报错:
Invalid argument looking up property orderItems[0].product.productId of bean orderForm

不知为什么?
...全文
116 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
congliu 2005-08-01
  • 打赏
  • 举报
回复
用ArrayList
gaoan 2005-08-01
  • 打赏
  • 举报
回复
Hibernate推荐HashSet


HashSet是JDK1.5里面的吧?
Arong0512 2005-08-01
  • 打赏
  • 举报
回复
Hibernate推荐HashSet
不知Strutst为什么不支持HashSet
EANFS 2005-08-01
  • 打赏
  • 举报
回复
ArrayList implements Collection
Arong0512 2005-08-01
  • 打赏
  • 举报
回复
那么Hibernate的Persistent Object该用HashSet Or ArrayList?

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧