Do this instead:
BookmarkablePageLink lien_accueil = new BookmarkablePageLink("accueil",
HomePage.class);
Label labelLinkAccueil = new Label ("name",new
ResourceModel("LabelLinkAccueil"));
Regards,
Erik.
Fabien D. wrote:
> Hi everybody,
>
>
> If I use this code :
>
> BookmarkablePageLink lien_accueil = new
> BookmarkablePageLink("accueil",
> HomePage.class);
> Label labelLinkAccueil = new Label
> ("name",getString("LabelLinkAccueil"));
> labelLinkAccueil.setEscapeModelStrings(false);
> lien_accueil.add(labelLinkAccueil);
> lien_accueil.setVisible(true);
> add(lien_accueil);
>
> In my log file, I have this warning :
> (Localizer.java:188) - 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 = panelmenu, page = <No Page>,
> path = panelmenu.PanelMenu]]
>
>
> Wicket doesn't like to use the constructor of a label and getString()....
>
> How cant I resolve this warning and use getString with new Label
>
>
> Thank you in advance
>
--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]