[
https://issues.apache.org/jira/browse/WICKET-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg resolved WICKET-1729.
-----------------------------------
Resolution: Duplicate
Assignee: Igor Vaynberg
> Key creation in Localizer should still, somewhere, use the page
> ----------------------------------------------------------------
>
> Key: WICKET-1729
> URL: https://issues.apache.org/jira/browse/WICKET-1729
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.4-M2
> Reporter: Frédéric Donckels
> Assignee: Igor Vaynberg
> Original Estimate: 0.33h
> Remaining Estimate: 0.33h
>
> In response to bug:WICKET-1667, some changes were made in
> org.apache.wicket.Localizer.
> This fixed the memory leak.
> Still, this introduced a bug as the creation of the keys for translation
> doesn't use the information from the Page instance itself to create the key.
> This means that, if the same key is used in 2 different pages, at root level,
> they will end up with the translation of the first page that was loaded.
> Example:
> Page A, displays a message with <wicket:message key="title"> (with
> title=First page in PageA.properties)
> Page B, displays a message with <wicket:message key="title"> (with
> title=Second page in PageB.properties)
> If you access PageA before PageB, PageB will display the title from PageA, as
> the translation is cached.
> This is because of the following code:
> [code]
> if (cursor instanceof Page)
> break;
> }[/code]
> The correct code should probably be:
> [code]
> if (cursor instanceof Page)
>
> buffer.append("-").append(cursor.getClass().getName());
> break;
> }[/code]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.