Oct 18, 2008, 8:36 AM
Renaming to
The next public build (v0.7) is shaping up to be another monster release. The <ext:TreePanel>, <ext:Menu> and new AjaxEvent features will be included.
But... I come to you now looking for your opinion.
Ever since the first release, the "Content" region of the any Panel type Control (Panel, Window, Tab, etc) has been called <Content>. I was never really 100% happy with the name "Content", but couldn't think of a better label. That is until yesterday when I had a head-slap moment (doah!) and realized it should have been called <Body>.
I'm proposing a change from <Content> to <Body>.</p>
Example (Existing)
<ext:Panel ID="Panel1" runat="server" Title="Title">
*** <Content>
******* Add Controls Here...
*** </Content>
</ext:Panel>
</p>Example (New)
<ext:Panel ID="Panel1" runat="server" Title="Title">
*** <Body>
******* Add Controls Here...
*** </Body>
</ext:Panel>
</p>With existing functionality, on the client/browser, if you want to get an instance of the Panel's "body" element using JavaScript, you call the .getBody() function. The following example demonstrates how to get the body of a Panel during an <ext:Button> <Click> Listener and update the text. </p>
Example
<ext:Button ID="Button1" runat="server" Text="Update Panel Body">
*** <Listeners>
******* <Click Handler="Panel1.getBody().update('I just updated the Panel Body!')" />
*** </Listeners>
</ext:Button>
</p>I was also always bothered by the symantics of adding "Layout" controls to the "Content" area. Adding "Layout" controls to the "Body" makes for a better paradigm and just reads better.
The renaming would create a breaking change if upgrading from v0.6 (or earlier), although the functionality and logic of the <Content>/<Body> would remain unchanged.
I think for most (if not all projects) just a simple search-and-replace would be required to upgrade. The change would affect the following properties.</p>
In Markup
1. <Content> changed to <Body>
In CodeBehind
1. .Content changed to .Body
2. .ContentControls changed to .BodyControls
3. .ContentContainer change to .BodyContainer
I ran a couple tests and was able to update all our Coolite Toolkit projects (including Examples Explorer) took only a couple minutes using the four simple search-and-replace routines as outlined above. Everything recompiled and ran perfectly.
Please let me know what you think.
</p>