We are adding some new pages to our application that we'd like to style differently from existing ones. We also want to reuse Panels we've built, so we're employing the Style mechanism outlined in https://cwiki.apache.org/confluence/display/WICKET/Localization+and+Skinning+of+Applications.
We have two different base pages for the separate styles, and in each base page constructor, we set the proper Session.style. This works fine, but doesn't seem like the best approach, and now we've discovered a problem with it. Say a user lands on page A with style A (the default style), then opens page B with style B in a new tab. After looking at page B for a bit, the user goes back to the tab with page A. The user clicks an AjaxLink that should display an InfoPanel. InfoPanel can be used with both styles, so it has two markup files: InfoPanel.html, and InfoPanel_B.html. Unfortunately, because page B was the last page to set Session.style, InfoPanel_B.html is loaded, even though the user is on page A. Any suggestions on how to solve this problem? The first thing that came to my mind was to create an AbstractRequestCycleListener subclass that could properly set Session.style for each request, but I'm not sure if that's a good idea. Thanks for your help! -Allen --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
