Is there a good reason why the following Zen page will create two javascript alerts stating "Some specific rendering code"? It seems that invokeSuper ends up calling the renderContents() method twice. There are three classes in the below example:
1) extending dynaGrid
Class ZENTest.defaultGrid Extends %ZEN.Component.dynaGrid
{
/// Client-side method to render this component.
ClientMethod renderContents() [ Language = javascript ]
{
//Call to super!
this.invokeSuper('renderContents',arguments)
//Do specific code here
alert('Some specific rendering code')
}
}
2)extending defaultGrid
Class ZENTest.customerGrid Extends ZENTest.defaultGrid
{
}
3)ZEN page:
/// Created using the page template: Default
{
{
<customerGrid id="cgTest" />
</page>
}
}
When I call this zen page I get identical two javascript alerts while I expect only one.
If I add a renderContents method with a invokeSuper into the customerGrid class, the page acts as expected and only one alert appears. However, I wouldn't think the additional invokeSuper is necessary. Any thoughts?