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

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

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

    隨筆 - 6, 文章 - 1, 評論 - 13, 引用 - 0
    數據加載中……

    SmartClient中Criteria 和 AdvancedCriteria的理解

    時間不早了,就少寫一些了。

    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.

    格式相當簡單。注意前面字段field1,是不需要將引號的.

    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版都老貴老貴的,企業版的都有按CPU賣的了,暈倒。

    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 風清揚 閱讀(385) 評論(0)  編輯  收藏 所屬分類: SmartClient


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


    網站導航:
     
    主站蜘蛛池模板: 亚洲国产精品yw在线观看| 国产亚洲精品xxx| 四虎亚洲精品高清在线观看| 久久精品国产这里是免费| 亚洲国产精品一区二区第一页 | 青草草在线视频永久免费| 国产精品亚洲四区在线观看| 最近免费字幕中文大全视频| 久久精品国产精品亚洲毛片| 222www免费视频| 亚洲国产精品日韩在线| 台湾一级毛片永久免费| 国产精品亚洲专区在线观看| 久久久久免费看黄A片APP| 亚洲免费综合色在线视频| 国产一级淫片免费播放| 在线播放免费人成视频网站| 自拍偷自拍亚洲精品第1页| 国产在线观看免费视频软件 | 久久精品国产亚洲av天美18| 国产又长又粗又爽免费视频| 大片免费观看92在线视频线视频| 精品国产亚洲男女在线线电影| 在线免费观看伊人三级电影| 久久精品国产亚洲AV大全| 午夜精品在线免费观看| 男男gay做爽爽的视频免费| 亚洲人成无码网站| 91香蕉成人免费网站| 色婷婷六月亚洲综合香蕉| 丁香五月亚洲综合深深爱| 亚欧免费无码aⅴ在线观看| 亚洲娇小性色xxxx| 一本久久综合亚洲鲁鲁五月天| 在线观看免费视频一区| 激情亚洲一区国产精品| 亚洲AV成人潮喷综合网| 久久国产精品免费视频| 亚洲中文字幕一二三四区| 亚洲精品在线视频| 免费在线观看h片|