萧秋水的博客


带着淡淡的倦意,轻轻的忧惺,宛若远山含笑迷蒙,但又如闪电惊雷般震人心魄……

关于struts里中的集合里的javaBean里有集合和javaBean的显示问题

具体的代码如下:
cargoExport为一个存放在request的ArrayList。
 
  < logic:present name = " cargoExport " >
 
< logic:iterate id = " cargo "  name = " cargoExport "  type = " ywsoftware.ship.businessTable.TCtcargo " >
  
< logic:present name = " cargo " >
  
    
< bean:write name = " cargo "  property = " shipper "   />
  
// 下边为显示javaBean里某个属性也是javaBean的显示格式
    < bean:define id = " tctcg "  name = " cargo "  property = " ctcg "  type = " ywsoftware.ship.businessTable.TCtcg " />
   
< bean:write name = " tctcg "  property = " marks "   />
// 下边为显示javaBean里某个属性是集合的显示格式   
    < logic:iterate id = " loadct "  name = " cargo "  property = " loadCTs "  type = " ywsoftware.ship.businessTable.TLoadct " >
          
< logic:present name = " loadct " >
           
< bean:write name = " loadct "  property = " cntrNo "   />
          
</ logic:present >
      
</ logic:iterate >
     
  
</ logic:present >
 
</ logic:iterate >
</ logic:present >


--------------------------------------------------
//下边为显示集和里存放的是数组 
<logic:iterate id="element" indexId="ind" name="catalog">
  
<bean:write name="ind"/><bean:write name="element" property="key"/><BR>
  
<logic:iterate id="elementValue" name="element" property="value" length="23" offset="0">
      
-----<bean:write name="elementValue"/><BR>
  
</logic:iterate>
</logic:iterate>

posted on 2006-08-15 16:05 萧秋水 阅读(263) 评论(0)  编辑  收藏 所属分类: STRUTS


只有注册用户登录后才能发表评论。


网站导航: