And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic,
Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi <martin.maku...@koodaripalvelut.com>: > It's too late :) Apparently you wanted just the opposite. > > Well.. you could have: > > PageA.html: > PageB.html: > PageC.html: > > Page?.java: > public class CommonPage extends WebPage { > public CommonPage() { > new PageContantHandler(this); > } > } > > ** > Martin > > 2009/10/6 Martin Makundi <martin.maku...@koodaripalvelut.com>: >> Hi! >> >> I did not exactly understand what you are after, but you can always do >> like this: >> >> CommonPage.html: >> .... blabla ... >> >> CommonPage.java: >> public class CommonPage extends WebPage { >> public CommonPage() { >> if (A-mode) { >> new PageVersionAContantHandler(this); >> } else { >> new PageVersionAContantHandler(this); >> } >> } >> } >> >> Maybe you wanted something different? >> >> ** >> Martin >> >> 2009/10/6 Alex Rass <a...@itbsllc.com>: >>> Hi. >>> >>> Spent hours now trying to figure out how to map 2 html files to 1 class. >>> If someone knows the answer - please help. >>> >>> I need to map 10 similar html pages to same class (for same behavior). >>> >>> Doing this: >>> webApplication.mountBookmarkablePage("/page1.html", pageClass); >>> Gets wicket to associate set url with the class. >>> But then when the ResourceStreamLocator is called, it's given >>> A reference to class and a reference to the path. Where class is set >>> correctly (pageClass). >>> But the PATH is set wrong. It is what Wicket THINKS it should try >>> "PageClass_en.html". (class name + locale + default extension) >>> >>> While *I* would like to load my own class. >>> >>> I was thinking about completely rewriting ResourceStreamLocator to know my >>> own paths, BUT it's not aware of what real page is being loaded (as the path >>> is set to "PageClass_en.html"). >>> >>> I could also break down and load my own stuff in beforeRender, but I was >>> hoping there's a better way to handle this. >>> >>> Lastly, I could overwrite onRender() in my PageClass... >>> >>> Any advice would be much appreciated. >>> >>> - Alex. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org