protected void encodeScript(FacesContext context, TreeTable tt) throws IOException {
String clientId = tt.getClientId(context);
String selectionMode = tt.getSelectionMode();
WidgetBuilder wb = getWidgetBuilder(context);
wb.initWithDomReady("TreeTable", tt.resolveWidgetVar(), clientId)
.attr("selectionMode", selectionMode, null)
.attr("resizableColumns", tt.isResizableColumns(), false)
.attr("liveResize", tt.isLiveResize(), false)
.attr("scrollable", tt.isScrollable(), false)
.attr("scrollHeight", tt.getScrollHeight(), null)