2008/6/6 James Carman <[EMAIL PROTECTED]>:
> Show some code. What is "this" at the point you're instantiating SRM?
>
The following codes are written in MyPanel's constructor:
collapseExpandText = new Label("collapseExpandText");
collapseExpandText.setOutputMarkupPlaceholderTag(true);
if (checkGroup.isVisible())
collapseExpandText.setModel(new StringResourceModel("collapse" , this ,
null));
else
collapseExpandText.setModel(new StringResourceModel("expand" , this ,
null));
Both my panel and it containing WebPage have "collapse" and "expand" key
(but with different values).
But it only shows WebPage's values , not its own values.
I tried to change "collapse"/"expand" to another key , ex : "collapseX" ,
"expandX" ,
and edit the corresponding MyPanel's properties keys ,
it then shows MyPanel's values , not WebPage.
So , I am sure , StringResourceModel honors its container's key , not its
own.
Is it intentional ?
On Thu, Jun 5, 2008 at 4:29 PM, smallufo <[EMAIL PROTECTED]> wrote:
> I have a Web Page , containing a Panel , both components have the same key
> in each property files (but with different values).
> I found in the Panel , when calling
> new StringResourceModel("key" , this , null) ,
> it will return Page's key value , not its own value .
> Is it intentional ? or a bug ?
>
> Wicket 1.3.3
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>