一个struts的bean write问题,请教!

wutongjoe 2008-04-12 05:04:09
dataList是一个arraylist 里面有些Object(估计是spring或者hibernate自己生成的,里面是几个Entity作为member),
Object里面有member 叫Someentity,Someentity他的里面有somevalue,

也就是这样的一个关系dataList[???].Object.Someentity.somevalue
我要怎么才能把somevalue用bean:write 写出来呢?
或者大家有什么好的建议?
环境是JDK1.4 WEB2.3,weblogic 8.1

<logic:iterate id="haha" indexId="index" name="PAGE" property="dataList">
<bean:write …… />
</logic:iterate>


谢谢大家了!
...全文
73 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
minbing 2008-04-13
  • 打赏
  • 举报
回复
<logic:iterate id="haha" indexId="index" name="PAGE" property="dataList">
<logic:iterate id="dataInfo" name="dataList" property="">
<bean:write name="dataInfo" property="Someentity.somevalue "/>
</logic:iterate>
</logic:iterate>
i_saw_you 2008-04-13
  • 打赏
  • 举报
回复
<logic:iterate id="dataInfo" name="dataList" property="">
<bean:write name="dataInfo" property="Someentity.somevalue "/>
</logic:iterate> 为什么不是这样的?
yibunengjing 2008-04-13
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 minbing 的回复:]
<logic:iterate id="haha" indexId="index" name="PAGE" property="dataList">
<logic:iterate id="dataInfo" name="dataList" property="">
<bean:write name="dataInfo" property="Someentity.somevalue "/>
</logic:iterate>
</logic:iterate>
[/Quote]

定一个!

这里的Someentity.somevalue应该是写成someentity.somevalue
注意这里大小写
panxuan 2008-04-13
  • 打赏
  • 举报
回复
书写如下:

<logic:iterate id="haha" indexId="index" name="dataList">
<bean:write name="haha" property="Someentity.somevalue "/>
</logic:iterate>
cangbai217 2008-04-12
  • 打赏
  • 举报
回复
<bean:write name="haha" property="Someentity"/>

67,538

社区成员

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

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