Thank you!
That both solved the problem and made my code cleaner :)
-- Edvin
Matej Knopp wrote:
You should use ResourceModel for this, it does the localization/message
lookup for you.
-Matej
On 8/28/07, Edvin Syse <[EMAIL PROTECTED]> wrote:
Hi,
When I instantiate a Panel that does getLocalizer().getString() in the
constructor, I obviously get the errormessage:
WARN [Localizer] Tried to retrieve a localized string for a component
that has not yet been added to the page. This can sometimes lead to an
invalid or no localized resource returned. Make sure you are not calling
Component#getString() inside your Component's constructor. Offending
component: [MarkupContainer [Component id = <idHere>, page = <No Page>,
path = <path-here>]]
This is understandable, since I haven't added the component to a page
before the constructor is run.
In the constructor, I do things like:
add(new Label("articleTitle", new
Model(getLocalizer().getString("articleTitle", this))));
and:
deleteLink.add(new
ConfirmBehaviour(getLocalizer().getString("confirmDelete", this)));
Is there a way to create the panel and give it a page-instance directly,
or how should I get around this the wicket way?
I use 1.3-SNAPSHOT, btw.
-- Edvin
---------------------------------------------------------------------
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]