Alex Schroeder wrote on Thu, 03 October 2013 15:20
The problem is that for this single call of reloadPage, I need to add the method getTablePage to every instance of my new menu.
I do not see how you can do it in an other way... Because your template (AbstractNewMenu) is not aware that it will be included in a TablePage... I could be used everywhere.
In my templates, when I need something like that, I named the accessing method (getTablePage in your case) provideXxxxx() and I declare it abstract. This way I am sure that the developer using my template will pass the required Xxxxx instance.