function(type, walk) {
    var ctl = this.createCtl(type + 'Group');
    ctl.items = [];
    // Tweak selector to use the generated id
    this.selector.id = ctl.id;
    // Append a class
    if (!Array.isArray(this.selector.classes))
      this.selector.classes = [];
    this.selector.classes.push(ctl.type);
    // Emit root element
    this.out.push('<fieldset');
    this.emitSelector();
    this.out.push('>');
    // Emit each item
    var startIdx = walk.position;
    while(walk.hasCurrent()) {
      walk.scrollToEol().skipWhitespaces();
      if (this.atGroupMarker(type, walk)) {
        this.emitGroupItem(ctl, new SubWalker(walk, startIdx, walk.position));
        startIdx = walk.position;
      }
    }
    // Emit the last one
    this.emitGroupItem(ctl, new SubWalker(walk, startIdx, walk.position));
    this.out.push('</fieldset>');
  }
function(type, walk) {
    var ctl = this.createCtl(type + 'Group');
    ctl.items = [];
    
    this.selector.id = ctl.id;
    
    if (!Array.isArray(this.selector.classes))
      this.selector.classes = [];
    this.selector.classes.push(ctl.type);
    
    this.out.push('<fieldset');
    this.emitSelector();
    this.out.push('>');
    
    var startIdx = walk.position;
    while(walk.hasCurrent()) {
      walk.scrollToEol().skipWhitespaces();
      if (this.atGroupMarker(type, walk)) {
        this.emitGroupItem(ctl, new SubWalker(walk, startIdx, walk.position));
        startIdx = walk.position;
      }
    }
    
    this.emitGroupItem(ctl, new SubWalker(walk, startIdx, walk.position));
    this.out.push('</fieldset>');
  }
function ( type , walk ) { var ctl = this . createCtl ( type + 'Group' ) ; ctl . items = [ ] ; // Tweak selector to use the generated id this . selector . id = ctl . id ; // Append a class if ( ! Array . isArray ( this . selector . classes ) ) this . selector . classes = [ ] ; this . selector . classes . push ( ctl . type ) ; // Emit root element this . out . push ( '<fieldset' ) ; this . emitSelector ( ) ; this . out . push ( '>' ) ; // Emit each item var startIdx = walk . position ; while ( walk . hasCurrent ( ) ) { walk . scrollToEol ( ) . skipWhitespaces ( ) ; if ( this . atGroupMarker ( type , walk ) ) { this . emitGroupItem ( ctl , new SubWalker ( walk , startIdx , walk . position ) ) ; startIdx = walk . position ; } } // Emit the last one this . emitGroupItem ( ctl , new SubWalker ( walk , startIdx , walk . position ) ) ; this . out . push ( '</fieldset>' ) ; }
Emits a control group, e.g.:

```
<fieldset id="{ctl.id}" class="checkboxGroup">
<div id="item-{item.id}" class="item">
<input id="{item.id}"
name="{ctl.id}"
type="checkbox"
value="{item.id}"/>
<label for="{item.id}">{item.label}</label>
</div>
...
</fieldset>
```
Emits a control group e . g . :