should be fixed in m3 which is coming out any hour

-igor

On Sat, Jul 12, 2008 at 9:07 AM, FakeBoy <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I migrate my app from wicket 1.3 to wicket 1.4.
> Everything works fine, but one thing behaves strange.
> I have BasePage and all others pages in my app extends this page.
> BasePage have some responsibilities and one of them is set correct page
> title.
> Example:
> public class BasePage ext WebPage {
>
>  public BasePage() {
>    add(new Label("title", getTitle()));
>  }
>
>  protected IModel getTitle() {
>    return new ResourceModel("pageTitle");
>  }
> }
> All pages, which extends BasePage need to define properties file with key
> "pageTitle" if want to declare own page title.
>
> In Wicket 1.3 everythigs works correct, but in Wicket 1.4 NOT.
> The problem is in constructing CacheKey for localizer's properties cache.
>
> In Wicket 1.3 CacheKey containts:
> 1. component.getPageRelativePath()
> 2. component.findPage() -> page.getClass().getName()
> There is all suffcient information for correct cashing properties.
>
> But in Wicket 1.4 it changed and page class name missed in constructing
> CacheKey.
> CacheKey containts:
> 1. resourceKey
> 2. component class name
> 3. component id
> 4. locale
> 5. style
>
> Result :
> If page identifier missed, title on my pages are still same, they are
> cached.
> Reason is that CacheKey is same for all my pages, although they contains
> properties file with own declared "pageTitle".
> CacheKey is:
> pageTitle-org.apache.wicket.markup.html.basic.Label:title-en_EN-null
> This CacheKey is same for Page1, Page2, Page3 because it don't care about
> page.
>
> What are you think about it?
> Thanks
>
> --
> View this message in context: 
> http://www.nabble.com/wicket-1.4---Localizer-getCacheKey-BUG-tp18421093p18421093.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to