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

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

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

    隨筆 - 6, 文章 - 1, 評(píng)論 - 13, 引用 - 0
    數(shù)據(jù)加載中……

    SmartClient中Criteria 和 AdvancedCriteria的理解

    時(shí)間不早了,就少寫(xiě)一些了。

    Criteria for selecting only a matching set of records from a DataSource. Criteria can be applied on the client and server. Unless configured otherwise, criteria will generally be applied client-side by ResultSets via ResultSet.applyFilter().

    Client- and server-side systems built into SmartClient understand two criteria formats by default: simple key-value pairs (Criteria) or the AdvancedCriteria format.

    Simple key-value Criteria are represented via a JavaScript Object where each property specifies the name and required value for a field. Multiple legal values for a field can be provided as an Array. For example:

     var criteria = {     field1 : "value1",     field2 : ["value2", "value3"]  }  
    Would select all records where field1 has value "value1" and where field2 has either "value2" or "value3". When writing custom client and server-side filtering logic, criteria must be a JavaScript Object but the properties of that Object can contain whatever data you want. When
     sent to the SmartClient server, the Java representation of the criteria is described here. When sent to other servers, the operationBinding.dataProtocol affects the format.

    格式相當(dāng)簡(jiǎn)單。注意前面字段field1,是不需要將引號(hào)的.

    AdvancedCriteria is a format for representing search criteria which may include operators on field values such as "less than", or may include sub-clauses such as several criteria applied to fields joined by an "OR" operator.

    SmartClient DataSources can use AdvancedCriteria to search a list of Records, and the SmartClient Java Server can translate AdvancedCriteria to either SQL or Hibernate queries (Note: The server-side AdvancedCriteria handling feature is only available with the Power and Enterprise Editions of SmartClient; the Pro Edition is limited to ordinary criteria handling on the server side).可惜Power版和Enterprise版都老貴老貴的,企業(yè)版的都有按CPU賣(mài)的了,暈倒。

    If the entire dataset is cached locally, SmartClient can perform AdvancedCriteria filtering on the client, avoiding a server call.

    An AdvancedCriteria is an ordinary JavaScript object which can be created directly with JavaScript literal notation. For example:

    var advancedCriteria = {
    _constructor:"AdvancedCriteria",
    operator:"and",
    criteria:[
    // this is a Criterion
    { fieldName:"salary", operator:"lessThan", value:"80000" },
    { operator:"or", criteria:[
    { fieldName:"title", operator:"iContains", value:"Manager" },
    { fieldName:"reports", operator:"notNull" }
    ]
    }
    ]
    }
    An AdvancedCriteria is in effect a Criterion that has been marked with _constructor:"AdvancedCriteria" to mark it as complete criteria.

    posted on 2011-10-24 23:08 風(fēng)清揚(yáng) 閱讀(385) 評(píng)論(0)  編輯  收藏 所屬分類: SmartClient


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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 婷婷综合缴情亚洲狠狠尤物| 在线免费观看污网站| 亚洲精品中文字幕无码蜜桃| 黄网站在线播放视频免费观看| 日韩视频免费在线| 亚洲欧洲无卡二区视頻| 国产精品无码免费播放| 亚洲一区二区三区不卡在线播放| 国产大片免费网站不卡美女| 亚洲国产美女精品久久久久| 毛片网站免费在线观看| 色婷婷亚洲一区二区三区| 亚洲不卡AV影片在线播放| 黄 色一级 成 人网站免费| 中文字幕亚洲乱码熟女一区二区 | 国产日产亚洲系列| 久久中文字幕免费视频| 亚洲成综合人影院在院播放| 性做久久久久久久免费看| 亚洲日韩AV一区二区三区中文| 国产免费啪嗒啪嗒视频看看| 国产免费A∨在线播放| 亚洲精品私拍国产福利在线| 99久久久精品免费观看国产| 亚洲第一成年网站视频| 国外亚洲成AV人片在线观看| 无码人妻一区二区三区免费n鬼沢| 亚洲中文无码线在线观看| 日本一道在线日本一道高清不卡免费 | 亚洲日韩在线观看免费视频| 久久久久免费精品国产小说| 亚洲愉拍一区二区三区| 亚洲精品国产日韩无码AV永久免费网| 青柠影视在线观看免费高清| 2020久久精品亚洲热综合一本| 亚洲福利视频一区二区| 亚洲免费视频网址| 曰批免费视频播放在线看片二| 久久精品视频亚洲| 又色又污又黄无遮挡的免费视 | 丰满亚洲大尺度无码无码专线|