title: Formatting checkBoxGroup on an XPage
body: <p>I've got a checkBoxGroup that can expand to 20 items or so, as users pick which fields from a view that they want to export to a spreadsheet. I'm curious how I might control the display of those 20 checkboxes (dynamically determined) to be in more than one row or even to display in a column instead.</p>
  
  <pre><code>&lt;xp:checkBoxGroup id="fieldChoicesBox"&gt;
      &lt;xp:eventHandler event="onclick" submit="false" id="eventHandler2"&gt;
         &lt;xp:this.script&gt;
         &lt;![CDATA[var x= '#{javascript:getClientId("fieldChoicesBox")}';
                  var y= '#{javascript:getClientId("fieldChoicesBoxList")}';
                  copyRadioChoices(x,y)]]&gt;
         &lt;/xp:this.script&gt;
      &lt;/xp:eventHandler&gt;
      &lt;xp:selectItems&gt;
         &lt;xp:this.value&gt;
            &lt;![CDATA[#{javascript: var viewName=@UpperCase(getComponent("viewChoice").getValue());
                       var tmp = @DbLookup(@DbName(),"dbprofile",viewName,"Value");
                       @If(@IsError(tmp),"None",tmp)}]]&gt;
         &lt;/xp:this.value&gt;
      &lt;/xp:selectItems&gt;
  &lt;/xp:checkBoxGroup&gt;
  </code></pre>
  
  <p>This is all built off code I originally got from Russ Maher (see <a href="http://xpagetips.blogspot.com/2012/06/extending-your-xpages-applications-with.html" rel="nofollow">http://xpagetips.blogspot.com/2012/06/extending-your-xpages-applications-with.html</a>) so any brilliance is attributable to him, while all mistakes are mine.</p>
  
  <p>Alternatively, if you have an idea for how to pick fields or columns to display in  the export that works more easily or elegantly, I'd be thrilled to hear it.</p>