wb.initWithDomReady("Layout", layout.resolveWidgetVar(), clientId, "layout")
.attr("full", layout.isFullPage(), false)
.attr("useStateCookie", layout.isStateful(), false);
if(layout.isNested()) {
wb.attr("parent", layout.getParent().getClientId(context));
}
wb.callback("onToggle", "function(e)", layout.getOnToggle())
.callback("onClose", "function(e)", layout.getOnClose())
.callback("onResize", "function(e)", layout.getOnResize());