Dojo: Can I add two or more widgets to the same BorderContainer region?
http://stackoverflow.com/questions/11042631/dojo-can-i-add-two-or-more-widgets-to-the-same-bordercontainer-region
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dijit/themes/claro/claro.css">
<style type="text/css">
body, html, #appLayout {
height: 100%;
width: 100%;
}
</style>
<div id="appLayout">
</div>
JavaScript
require(["dijit/registry", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/form/Button", "dojo/query", "dojo/dom-construct", "dijit/_Widget", "dijit/_Templated", "dojo/domReady!"], function(registry, BorderContainer, ContentPane, Button, query, domConstruct){
var appLayout = new BorderContainer({
design: "sidebar"
}, "appLayout");
appLayout.addChild(new ContentPane({
region: "top",
content: 'top 1'
}));
appLayout.addChild(new ContentPane({
region: "top",
content: 'top 2'
}));
appLayout.addChild(new ContentPane({
region: "left",
content: 'left 1'
}));
appLayout.addChild(new ContentPane({
region: "left",
content: 'left 1.5'
}));
appLayout.addChild(new ContentPane({
region: "left",
content: 'left 2'
}));
appLayout.addChild(new ContentPane({
region: "center",
content: 'center 1'
}));
appLayout.addChild(new ContentPane({
region: "right",
content: 'right 1'
}));
appLayout.addChild(new ContentPane({
region: "right",
content: 'right 2'
}));
var b1 = new ContentPane({
region: "bottom"
});
appLayout.addChild(b1);
var div1 = domConstruct.create('div', {}, b1.containerNode);
// build more html using domConstruct, like a table etc
var btn = new Button({ label: 'My Action 1'},
domConstruct.create('div', {}, div1));
dojo.declare("MyFormLayout", [dijit._Widget, dijit._Templated], {
//put better html layout in the template
templateString: '<div><div dojoAttachPoint="btnNode"></div></div>',
postCreate: function() {
this.inherited(arguments);
this.button = new Button({ label: 'My Action 2'}, this.btnNode);
}
});
appLayout.addChild(new ContentPane({
region:...