Make sure you are not calling Component#getString() inside your Component's constructor.

2009-07-25 Thread Martin Makundi
Hi! I get this warning: Make sure you are not calling Component#getString() inside your Component's constructor. Because normally I implement wicket code like this: XYZComponent extends xxx { public XYZComponent(String id) { add(new Label(idxyz, getString(localized_label

Re: Make sure you are not calling Component#getString() inside your Component's constructor.

2009-07-25 Thread Per Newgro
Martin Makundi schrieb: Or what is the best-practice to avoid these warnings: Make sure you are not calling Component#getString() inside your Component's constructor. I would use a StringResourceModel. Then the value for getString will be used in rendering not at construction time

Re: Make sure you are not calling Component#getString() inside your Component's constructor.

2009-07-25 Thread Martin Makundi
Ah.. ok. It [StringResourceModel] just feels so much like a waste I have forgotten about it ;) Tnx. ** Martin 2009/7/25 Per Newgro per.new...@gmx.ch: Martin Makundi schrieb: Or what is the best-practice to avoid these warnings: Make sure you are not calling Component#getString() inside your