例一:<logic:iterate id="cl" name="Ids"> //循环取得id //比较beanname中的id是否和cl中的id相同,如果相同就显示cl中的name <logic:equal name="beanname" property="id" value="<bean:write name="cl" property="id"/>"> <bean:write name="cl" property="name"/> </logic:equal> </logic:iterate> 紅色文字區就是錯誤的嵌套了,這樣是得不到想要的結果的,可改爲<logic:iterate id="cl" name="Ids"> //循环取得id <bean:define id="temId" name="cl" property="id" type="java.lang.String"/> //比较beanname中的id是否和cl中的id相同,如果相同就显示cl中的name <logic:equal name="beanname" property="id" value="<%=temId%>"> <bean:write name="cl" property="name"/> </logic:equal> </logic:iterate> 這樣先定義,后使用,就ok了。注意:temId必须是个String,如果不是就需要转换成String
相关资源:敏捷开发V1.0.pptx