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 周銳 閱讀(280) 評論(0)  編輯  收藏 所屬分類: TIBCO
          主站蜘蛛池模板: 太原市| 上饶市| 邓州市| 华亭县| 石门县| 富源县| 金山区| 方城县| 确山县| 卢龙县| 汽车| 崇文区| 建瓯市| 永康市| 泽州县| 新竹市| 特克斯县| 武定县| 商水县| 东海县| 莎车县| 察雅县| 珲春市| 永登县| 钦州市| 星座| 平阳县| 岐山县| 岳阳县| 化德县| 平舆县| 开远市| 格尔木市| 金坛市| 九龙坡区| 双柏县| 鹤庆县| 凤庆县| 海南省| 独山县| 郸城县|