You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "smallufo (JIRA)" <ji...@apache.org> on 2008/06/10 08:47:45 UTC

[jira] Created: (WICKET-1691) StringResourceModel honors container's key (rather than its own)

StringResourceModel honors container's key (rather than its own)
----------------------------------------------------------------

                 Key: WICKET-1691
                 URL: https://issues.apache.org/jira/browse/WICKET-1691
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.3
         Environment: Wicket 1.3.3 , resin-3.0.25 , Linux
            Reporter: smallufo


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 .

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 ? or a bug ? 
If it is intentional , it seems not reasonable.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1691) StringResourceModel honors container's key (rather than its own)

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-1691.
----------------------------------------

       Resolution: Invalid
    Fix Version/s: 1.4-RC2
         Assignee: Juergen Donnerstag

@see ComponentStringResourceLoader for additional information especially on the component search  order

> StringResourceModel honors container's key (rather than its own)
> ----------------------------------------------------------------
>
>                 Key: WICKET-1691
>                 URL: https://issues.apache.org/jira/browse/WICKET-1691
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>         Environment: Wicket 1.3.3 , resin-3.0.25 , Linux
>            Reporter: smallufo
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC2
>
>
> 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 .
> 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 ? or a bug ? 
> If it is intentional , it seems not reasonable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.