Ticket #5169 (new enhancement)
dojox.layout.ContentPane with LayoutContainer abilities
| Reported by: | guest | Owned by: | peller |
|---|---|---|---|
| Priority: | normal | Milestone: | future |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | layouting contentpan |
| Cc: |
Description (last modified by peller) (diff)
I'm in need for a ContentPane? that loads its content remotely and acts as a LayoutContainer? for all its loaded widgets. I didn't find a solution with the standard widget set, so I created one on my own. Perhaps there's a chance to get this abilities into dojox.layout.ContentPane? directly. Here is my snippet of code for the widget.
dojo.provide("tas.LayoutContentPane")
dojo.require("dijit.layout.LayoutContainer");
dojo.require("dojox.layout.ContentPane");
dojo.declare("tas.LayoutContentPane",
[dojox.layout.ContentPane,dijit.layout.LayoutContainer],
{
postCreate : function() {
dojox.layout.ContentPane.prototype.postCreate.apply(this, arguments);
dijit.layout.LayoutContainer.prototype.postCreate.apply(this, arguments);
}
,startup : function(){
dojox.layout.ContentPane.prototype.startup.apply(this, arguments);
dojo.connect(this,"onLoad",this,"startupChildren")
}
,layout : function() {
tas.LayoutContentPane.superclass.layout.call(this,arguments)
}
,startupChildren : function() {
if(this.getChildren){
dojo.forEach(this.getChildren(), function(child){ child.startup(); });
}
this.layout()
}
}
)
I'm not sure whether or not that code is optimized for dojo. It simply works for me. Perhaps one could have a look onto it. I will repost this at the dojox developer forum for better code highlighting.
Change History
Note: See
TracTickets for help on using
tickets.