posts - 431,  comments - 344,  trackbacks - 0
          jsx3.app.Model.getDescendantsOfType

          method getDescendantsOfType(strType, bShallow)

          Finds all descendants of the given type.

          Parameters:

          strType {String | Function | jsx3.lang.Class}the fully-qualified class name, class constructor function, or jsx3.Class instance.
          bShallow {boolean}if true, only search direct children, not all descendants.

          Returns:

          {Array<jsx3.app.Model>}an array of matching descendants

          for example:

          /**
          * Bind change events of the specified control and its all children to the specified callback function.
          * exceptedControlNames don't bind change event
          */
          Eric.bindChangeEvents = function(rootNode, callback, exceptedControlNames) {
               if (exceptedControlNames == undefined) {
                    exceptedControlNames = [];
               }
              // bind change events for TextBox
              var children = rootNode.getDescendantsOfType("jsx3.gui.TextBox");
              for (var i = 0; i < children.length; i++) {
                  if (exceptedControlNames.indexOf(children[i].getName()) == -1) {
                      children[i].subscribe(jsx3.gui.Interactive.JSXCHANGE, callback);
                  }
              }
          }

          posted on 2007-06-26 10:02 周銳 閱讀(281) 評論(0)  編輯  收藏 所屬分類: TIBCO
          主站蜘蛛池模板: 麻江县| 来凤县| 昌邑市| 天台县| 浦江县| 孟村| 白银市| 杭锦旗| 榕江县| 军事| 利津县| 思茅市| 陈巴尔虎旗| 荥阳市| 东安县| 康马县| 宿州市| 色达县| 班戈县| 江华| 阿瓦提县| 沁源县| 文成县| 平阳县| 湄潭县| 奎屯市| 乌兰浩特市| 襄汾县| 观塘区| 印江| 自贡市| 呼和浩特市| 三江| 河南省| 红原县| 本溪市| 翁源县| 筠连县| 库伦旗| 双鸭山市| 湖北省|