I defined the following window:
qx.Class.define('my.Window', {
...
construct: function(caption, icon) {
this.base(arguments, caption, icon);
this.setLayout(new qx.ui.layout.VBox(10));
this.add(new qx.ui.form.renderer.Single(this.getForm('some')));
this.add(new qx.ui.form.renderer.Single(this.getForm('other')));
this.add(this.getToolbar('test')); // This is shown
this.add(this.getToolbar('some')); // This is not shown
this.add(this.getToolbar('other')); // This is not shown
},
members: {
_forms: {},
_toolbars: {},
getForm: function(id) {
if(this._forms[id]) return this._forms[id];
if(id = 'some') this._forms[id] = new Form();
else if(id == 'other') this._forms[id] = new OtherForm();
return this._forms[id];
},
getToolbar: function(id) {
if(id == 'test') {
if(this._tb) return this._tb;
this._tb = new TestToolbar();
return this._tb;
}
else if(id == 'some') this._toolbars[id] = new SomeToolbar();
else if(id == 'other') this._toolbars[id] = new OtherToolbar();
return this._toolbars[id];
}
}
});
When I show the window, the forms ('some' and 'other') are shown. Other items, such as TestToolbar and a List, are also shown. However, the other Toolbars ('test', 'some', and 'other') are not shown..
I tried to change _toolbars
from an object to an array, but I got the same behavior.