struts:J2EE学习笔记(3) Struts Logic Tags-j2ee来源: 发布时间:星期三, 2008年9月10日 浏览:19次 评论:0
c Tags
语法应用是 -- <someComparisonTag value="someUserNameValue" cookie="userName"> (cookie specifies the name of the cookie to compare with value) <someComparisonTag value="en_US" header="Accept-Language"> (header specifies the name of the HTTP header to compare with value) <someComparisonTag value="someUserNameValue" parameter="username"> (parameter specifies the name of the request parameter to compare with value) <someComparisonTag name="testBean" property="propNameInTestBean" value="someValue"> (典型) name指定了bean的名字而property指定了该bean的某个property以便于与value比较, 通常我们还可以加一个scope来限制bean property is used in conjunction with name to specify a property in the bean specified by name. The property reference can be simple, nested, and/or indexed. For the type of syntax used for property, see the users guide _disibledevent="#0.00"/> </logic:iterate> 如果property给定,name代表了一个bean的实例,而这个bean的getThatProperty()将返回此tag需要的collection实例, 如果没有给定property, name本身就指定了将被iterate的collection的实例, id给出了每一次循环的collection的当前object的名字,用于在内部使用 offset和length指定了从collection的哪个位置开始,到哪里结束,其他请参见Struts Documentation,这里不详述 0
相关文章
读者评论
发表评论 |