<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-204  評論-90  文章-8  trackbacks-0
    Logic Tags

    語法應(yīng)用是 --
    <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的某個(gè)property以便于與value比較, 通常我們還可以加一個(gè)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 on the Bean Tags.
    scope specifies the bean scope which can be page, request, session, application, "any scope" (default)

    1) 值比較 Value Comparison: equal, notEqual, greaterEqual, lessEqual, lessThan, greaterThan
    比較邏輯是 -- 先試圖convert成long double,并比較; 如果parse失敗就會(huì)用String.equalTo()來比較

    1) 值比較 Value Comparison: present, notPresent, empty, notEmpty
    present看的是某變量/實(shí)例是否存在于某個(gè)限定范圍,empty看的是該實(shí)例是否為null, "", or collection.isEmpty()==true (only for collection)

    2) 子字符串匹配 Substring Matching: match, notMatch
    match/notMatch 還有一個(gè)可選location來指定該substring必須出現(xiàn)在字符串開始還是結(jié)尾 (location="start/end")

    3) Presentation Location: forward, redirect
    用法尚不清楚

    4) Collection Utilities: iterate (極常用)
    <logic:iterate id="searchResultList" name="<%=WebKeys.SEARCH_RESULT_LIST_TWO%>" scope="session">
    <bean:write name="searchResultList" property="itemName"/></a>
    <bean:write name="searchResultList" property="itemUnitOfMeasure" />
    <bean:write name="searchResultList" property="inventoryDetailSize" format="#0.00"/>
    </logic:iterate>
    如果property給定,name代表了一個(gè)bean的實(shí)例,而這個(gè)bean的getThatProperty()將返回此tag需要的collection實(shí)例,
    如果沒有給定property, name本身就指定了將被iterate的collection的實(shí)例,
    id給出了每一次循環(huán)的collection的當(dāng)前object的名字,用于在內(nèi)部使用
    offset和length指定了從collection的哪個(gè)位置開始,到哪里結(jié)束,其他請參見Struts Documentation,這里不詳述
    posted on 2006-02-23 16:37 一凡 閱讀(286) 評論(0)  編輯  收藏 所屬分類: JAVA FRAMEWORK

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲国产精久久久久久久 | 久久亚洲国产精品| 无码人妻一区二区三区免费n鬼沢| 亚洲黄色免费网站| 日本免费人成视频播放 | a级毛片在线免费| 亚洲精品视频在线免费| 日韩高清免费观看| 国产午夜无码片免费| 亚洲中文字幕在线无码一区二区| 四虎永久在线精品免费观看地址| 免费看黄的成人APP| 久久久亚洲精华液精华液精华液| 国产V亚洲V天堂无码久久久| 免费人成在线视频| 国产va免费精品| wwwxxx亚洲| 亚洲精品乱码久久久久久| 国产精品成人免费视频网站京东| xxxxx做受大片视频免费| 亚洲制服在线观看| 一本色道久久综合亚洲精品| 成人毛片免费在线观看| 中国人免费观看高清在线观看二区| 亚洲人成电影网站| 亚洲午夜久久久久久久久久| 成人免费午夜视频| 久爱免费观看在线网站| 黄色大片免费网站| 亚洲一区二区三区在线网站| 亚洲国产精品无码久久久蜜芽 | 亚洲一级在线观看| 久久精品国产精品亚洲精品| 国产成人免费片在线观看| 永久在线观看www免费视频| 久久久久久久国产免费看 | 色se01短视频永久免费| 99视频免费在线观看| 黄色毛片视频免费| 亚洲AV成人无码网站| 亚洲乱码在线卡一卡二卡新区|