Posted on 2007-01-06 09:55
Fisher 閱讀(1064)
評論(0) 編輯 收藏 所屬分類:
Struts
struts標簽logic
<!--#################################################################-->
<!--?<logic:equal>和<logic:notEqual>判斷變量的值與指定常量是否相等?-->
<logic:equal
??name="request,page,response,session中存在的以此名稱命名的變量"
??property="此變量中的成員變量"
??parameter="將要取得的變量的標識符,此變量存在于request|page|response|session中"
??scope="取得變量的范圍?request|page|response|session"
??value="?參加比對的值?">
??若判斷成立,則輸出此處的內容!
??</logic:equal>
<!--=====================================================================-->
<logic:notEqual
??name="request,page,response,session中存在的以此名稱命名的變量"
??property="此變量中的成員變量"
??parameter="將要取得的變量的標識符,此變量存在于request|page|response|session中"
??scope="取得變量的范圍?request|page|response|session"
??value="?參加比對的值?">
??若判斷成立,則輸出此處的內容!
??</logic:notEqual>
<!--#################################################################-->
<logic:iterate
??id="唯一標識符"
??name="在request|response|session|page中的標識符"
??property="若是自定義類對象,此處用語表示此對象中的屬性名"
??type="取得的對象的權限定類名"
??indexId="indexid"
??offset="起始位置"
??length="循環的長度">
??<li><em><bean:write?name="與logic:iterate的屬性id的內容一致"?/></em> [<bean:write?name="index"/>]</li>
</logic:iterate>
<!--#################################################################-->
<!--<logic:empty>與<logic:notEmpty>用于判斷指定參數的屬性值是否是null值或是空字符串""-->
<!--判斷scope中存在的指定參數名的變量值是否是null值或是空字符串,若是null或空字符串則輸出標簽之間的內容-->
<logic:empty
??name="對象的唯一標識符"
??scope="page|request|response|session"
??property="對象中存在的成員變量">
empty
</logic:empty>
<!--判斷scope中存在的指定參數名的變量值是否不是null值或是空字符串,若不是null或空字符串則輸出標簽之間的內容-->
<logic:notEmpty
??name="對象的唯一標識符"
??scope="page|request|response|session"
??property="對象中存在的成員變量">
notEmpty
</logic:notEmpty>
<!--#################################################################-->
<!--<logic:?present>與<logic:notPresent>用于判斷指定參數的屬性是否存在-->
<!--判斷cookie中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:?present
??cookie="cookie中存在的變量名">
??此處是輸出內容!
??</logic:?present>
<!--判斷header中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:?present
??header="取得頭部元素中存在的變量">
??此處是輸出內容!
??</logic:?present>
<!--判斷scope中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:?present
??name="屬性名"
??property="對象中存在的成員變量"
??scope="page|request|response|session">
??此處是輸出內容!
??</logic:?present>
<!--=================================================================-->
<!--判斷cookie中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:notPresent
??cookie="cookie中可能存在的變量名">
??此處是輸出內容!
??</logic:notPresent>
<!--判斷header中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:notPresent
??header="頭部元素中存在的變量">
??此處是輸出內容!
??</logic:notPresent>
<!--判斷scope中是否存在指定參數名的變量若存在則輸出標簽之間的內容-->
<logic:notPresent
??name="屬性名"
??property="對象中可能存在的成員變量"
??scope="page|request|response|session">
??此處是輸出內容!
??</logic:notPresent>
<!--#################################################################-->
<!--<logic:match>與<logic:notMatch>用于判斷指定參數的字符串是否區配某個給定標準-->
<!--判斷cookie中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:match
??cookie="cookie中可能存在的變量名"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:match>
<!--判斷header中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:match
??header="header中可能存在的變量名"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:match>
<!--判斷scope中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:match
??name="存在的屬性名"
??property="屬性對象中的成員變量"
??scope="page|request|response|session"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:match>
<!--===================================================================-->
<!--判斷cookie中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:notMatch
??cookie="cookie中可能存在的變量名"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:notMatch>
<!--判斷header中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:notMatch
??header="header中可能存在的變量名"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:notMatch>
<!--判斷scope中存在指定參數名的變量的值,是否與指定的字符格式區配若區配則輸出此內容-->
<logic:notMatch
??name="存在的屬性名"
??property="屬性對象中的成員變量"
??scope="page|request|response|session"
??location="contains|start|end"
??value="要區配的字符格式">
</logic:notMatch>
<!--#################################################################-->
<!--<logic:forward>用于地址轉向到指定位置-->
<logic:forward?name="與系統配置文件中的<global-forward>元素中的子元素<forward>區配"/>
<!--#################################################################-->
<!--?<logic:redirect>用于地址重定向到指定位置?-->
<logic:redirect
??anchor=""
??forward=""
??href=""
??name=""
??page=""
??paramId=""
??paramName=""
??paramProperty=""
??paramScope=""
??property=""
??scope=""
??transaction="">連接內容</logic:redirect>