api/extjs/browser-part/e-br-content.js
function getTree(table, options) {

      if (table.isPanel) {
        table = table.getView();
      }

      function getDefOpts() {
        return {
          throwIfInvisible: false,
          allFields: false
        };
      }

      var isVisible = table.isVisible(true);
      options = tiaEJ.ctMisc.checkVisibilityAndFillOptions(isVisible, options, getDefOpts);
      var panel = tiaEJ.search.parentPanel(table);
      var root = panel.getRootNode();
      var res = [];

      function traverseSubTree(node, indent) {

        var fieldsToPrint = ['text', 'checked', 'id'];

        if (tia.debugMode) {
          fieldsToPrint = [
            'text',
            'checked',
            'id',
            'visible',
            'expanded',
            'leaf',
            'expandable',
            'index',
            'depth',
            'qtip',
            'qtitle',
            'cls'
          ];
        }

        if (options.allFields) {
          res.push(indent + tiaEJ.ctMisc.stringifyAllRecord(node, fieldsToPrint, true));
        } else {
          res.push(indent + tiaEJ.ctMisc.stringifyRecord(node, fieldsToPrint, true));
        }

        if (node.hasChildNodes()) {
          indent += tia.cC.content.indent;
          node.eachChild(function (curNode) {
            traverseSubTree(curNode, indent);
          });
        }
      }

      traverseSubTree(root, '');

      return tia.cC.content.wrap('Tree content: \n' + res.join('\n') + '\n');

    }
function getTree(table, options) {

      if (table.isPanel) {
        table = table.getView();
      }

      function getDefOpts() {
        return {
          throwIfInvisible: false,
          allFields: false
        };
      }

      var isVisible = table.isVisible(true);
      options = tiaEJ.ctMisc.checkVisibilityAndFillOptions(isVisible, options, getDefOpts);
      var panel = tiaEJ.search.parentPanel(table);
      var root = panel.getRootNode();
      var res = [];

      function traverseSubTree(node, indent) {

        var fieldsToPrint = ['text', 'checked', 'id'];

        if (tia.debugMode) {
          fieldsToPrint = [
            'text',
            'checked',
            'id',
            'visible',
            'expanded',
            'leaf',
            'expandable',
            'index',
            'depth',
            'qtip',
            'qtitle',
            'cls'
          ];
        }

        if (options.allFields) {
          res.push(indent + tiaEJ.ctMisc.stringifyAllRecord(node, fieldsToPrint, true));
        } else {
          res.push(indent + tiaEJ.ctMisc.stringifyRecord(node, fieldsToPrint, true));
        }

        if (node.hasChildNodes()) {
          indent += tia.cC.content.indent;
          node.eachChild(function (curNode) {
            traverseSubTree(curNode, indent);
          });
        }
      }

      traverseSubTree(root, '');

      return tia.cC.content.wrap('Tree content: \n' + res.join('\n') + '\n');

    }
function getTree ( table , options ) { if ( table . isPanel ) { table = table . getView ( ) ; } function getDefOpts ( ) { return { throwIfInvisible : false , allFields : false } ; } var isVisible = table . isVisible ( true ) ; options = tiaEJ . ctMisc . checkVisibilityAndFillOptions ( isVisible , options , getDefOpts ) ; var panel = tiaEJ . search . parentPanel ( table ) ; var root = panel . getRootNode ( ) ; var res = [ ] ; function traverseSubTree ( node , indent ) { var fieldsToPrint = [ 'text' , 'checked' , 'id' ] ; if ( tia . debugMode ) { fieldsToPrint = [ 'text' , 'checked' , 'id' , 'visible' , 'expanded' , 'leaf' , 'expandable' , 'index' , 'depth' , 'qtip' , 'qtitle' , 'cls' ] ; } if ( options . allFields ) { res . push ( indent + tiaEJ . ctMisc . stringifyAllRecord ( node , fieldsToPrint , true ) ) ; } else { res . push ( indent + tiaEJ . ctMisc . stringifyRecord ( node , fieldsToPrint , true ) ) ; } if ( node . hasChildNodes ( ) ) { indent += tia . cC . content . indent ; node . eachChild ( function ( curNode ) { traverseSubTree ( curNode , indent ) ; } ) ; } } traverseSubTree ( root , '' ) ; return tia . cC . content . wrap ( 'Tree content: \n' + res . join ( '\n' ) + '\n' ) ; }
Gets entire tree content.
Collapsed nodes are also included in results.

@param table
@param options
@returns {string}
Gets entire tree content . Collapsed nodes are also included in results .