Ticket #2528232 (checkedin enhancement)
Reporter Nate Cavanaugh |
Opened: 09/7/09 Last modified: 02/8/10 Status: checkedin Type: enhancement Resolution: fixed |
Owner Satyen Desai |
Target Release: 3.1.0 Priority: P3 (normal) |
|---|---|---|---|
| Summary: | StdMod sections of a widget are not added until after the render phase is over | ||
| Description: | When using the WidgetStdMod extension for widgets, a widget developer doesn't have access to any of those sections during the render phase. The only reason I can see for this is if those areas are explicitly hands off for developers, and are strictly for content. If they are areas designated for this, then they should probably be rendered |
||
| Type: | enhancement | Observed in Version: | 3.0.0 Beta1 |
| Component: | Widget | Severity: | S3 (normal) |
| Assigned To: | Satyen Desai | Target Release: | 3.1.0 |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 09/8/09
|
|
Posted: 09/8/09
|
|
Posted: 09/8/09
Hi Satyen, Heres some psuedo-code I am using: Which feels a little clunkier than it has to be, if I could just do: closeButton.render(this.getStdModNode('header')) However, during renderUI, this.getStdModNode('header') will return null, and hence render the button to the body) I suppose I could do an afterRender listener, but since the stdmod is also done after render, my worry is in the order integrity. Maybe it's psychological, but I don't feel like there is a way to guarantee that my after Render call will fire at the appropriate time, or at least that there is no way to guarantee it. I theoretically could modify it to do this work after it has rendered, but I've tried to avoid putting lifecycle specific actions outside of the lifecycle. This one just seemed like a defect just because the stdmod plugin explicitly states that it won't add in it's modules until after the widget has been rendered. I'm open to being wrong on it, but if so, then I think it would be helpful to have some clarity on what core widget elements are available to access during the render phase. Thanks for looking at this Satyen, |
|
Posted: 10/14/09
I came across the same situation. I was extending a customize Widget (with WidgetStdMod extension added) and tried to insert a textbox and a couple of buttons to the header. In the renderUI, this.getStdModNode('header") returns null. I traced the code down to this(see below code excerpt from widget-stdmod.js). _renderUIStdmod only add a class to the contentBox <div> and the reset of the rendering is done in _synUIStdMod(). That is why there is no access to header, body or footer. { { { |
|
Posted: 11/12/09
One additional side effect of this is that when Overlay is getting centered, it is centered before content is set for HEADER,BODY,FOOTER. |
|
Posted: 02/8/10
Pulling into 3.1. About to checkin fix for it. |
|
Posted: 02/8/10
|
|
Posted: 02/8/10
Honor renderUI as the phase which lays down DOM elements for header/body/footer. Fixes #2528232 |


Can you give me an example/share the code of the custom component you're creating? I wanted to understand why doing this in an "after" render listener, or by chaining renderUI (depending on the use case), is not appropriate.
Thanks.