<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

    語法應用是 --
    <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 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失敗就會用String.equalTo()來比較

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

    2) 子字符串匹配 Substring Matching: match, notMatch
    match/notMatch 還有一個可選location來指定該substring必須出現在字符串開始還是結尾 (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代表了一個bean的實例,而這個bean的getThatProperty()將返回此tag需要的collection實例,
    如果沒有給定property, name本身就指定了將被iterate的collection的實例,
    id給出了每一次循環的collection的當前object的名字,用于在內部使用
    offset和length指定了從collection的哪個位置開始,到哪里結束,其他請參見Struts Documentation,這里不詳述
    posted on 2006-02-23 16:37 一凡 閱讀(296) 評論(0)  編輯  收藏 所屬分類: JAVA FRAMEWORK

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


    網站導航:
     
    主站蜘蛛池模板: 亚洲美女aⅴ久久久91| 亚洲国产午夜精品理论片在线播放| 四虎影视免费在线| 色偷偷亚洲第一综合网| 亚洲中文字幕无码不卡电影| 永久黄色免费网站| 大桥未久亚洲无av码在线| 亚洲国产成人一区二区精品区| 国产免费看JIZZ视频| 一级毛片免费视频网站| 亚洲熟妇av一区| 亚洲天堂中文字幕在线| 最近2018中文字幕免费视频| 国产成人亚洲精品电影| 亚洲黄色免费电影| 亚洲国产精品一区二区第四页| 亚洲美女视频免费| 成年大片免费高清在线看黄| 亚洲精品在线播放| 亚洲精品黄色视频在线观看免费资源| 麻豆成人久久精品二区三区免费 | 亚洲男女一区二区三区| 免费人成年激情视频在线观看| 99久久免费看国产精品| 猫咪www免费人成网站| 亚洲成在人线电影天堂色| 久久久久久亚洲精品不卡| 毛片A级毛片免费播放| 国产99视频精品免费专区| 四虎一区二区成人免费影院网址| 亚洲国产精品成人综合色在线婷婷| 亚洲综合色成在线播放| 毛片免费vip会员在线看| 99蜜桃在线观看免费视频网站| 一级一黄在线观看视频免费| 亚洲砖码砖专无区2023| 亚洲黄色中文字幕| 亚洲无删减国产精品一区| 亚洲综合另类小说色区| 亚洲?V无码成人精品区日韩 | 午夜高清免费在线观看|