You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jan Riehn (JIRA)" <ji...@apache.org> on 2012/05/31 16:36:24 UTC

[jira] [Created] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Jan Riehn created WICKET-4579:
---------------------------------

             Summary: PackageTextTemplate misses locale, style and variation
                 Key: WICKET-4579
                 URL: https://issues.apache.org/jira/browse/WICKET-4579
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.7, 6.0.0-beta2
            Reporter: Jan Riehn


Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Jan Riehn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293516#comment-13293516 ] 

Jan Riehn commented on WICKET-4579:
-----------------------------------

yes, for my purposes it is good enough - but it is not in the sense of IResourceStream. The Loaders should set the resolved locale, style and variation.
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288078#comment-13288078 ] 

Martin Grigorov commented on WICKET-4579:
-----------------------------------------

I added an overloaded constructor which accepts the style, the variation and the locale.
It is not as dynamic as you need it but you can use it as a local variable in a method (most of the times in #renderHead()) and this way it will be re-instantiated at every rerender of the component/behavior that needs this template.
Is this good enough ?
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287297#comment-13287297 ] 

Sven Meier commented on WICKET-4579:
------------------------------------

A Patch is welcomed. This won't make it into 1.5.x though,I'm afraid.
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Christian Oldiges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287219#comment-13287219 ] 

Christian Oldiges commented on WICKET-4579:
-------------------------------------------

I would prefer a delayed reading of the stream until it is actually accessed using getString() which would allow to set the values before accessing it.
Obviously any actual change to the locale, style or variation has to clear the buffered string to ensure a proper reloading depending on the new value(s).
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (WICKET-4579) PackageTextTemplate misses locale, style and variation

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

Sven Meier reassigned WICKET-4579:
----------------------------------

    Assignee: Sven Meier
    
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286932#comment-13286932 ] 

Sven Meier commented on WICKET-4579:
------------------------------------

PackageTextTemplate does all the heavy lifting in the constructor, so no chance to set locale, style or variation before hand.

What solution do you suggest?
Is it acceptable to overwrite getLocale() etc.? Or do we have to delay reading the stream until the first access, thus allowing to call setLocale() etc. before the stream is located?
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4579) PackageTextTemplate misses locale, style and variation

Posted by "Jan Riehn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287264#comment-13287264 ] 

Jan Riehn commented on WICKET-4579:
-----------------------------------

I agree with Christian. By using getString() to locate resources,  PackageTextTemplate has also the chance to reload resources after the cache was cleared.

regards,

Jan
                
> PackageTextTemplate misses locale, style and variation
> ------------------------------------------------------
>
>                 Key: WICKET-4579
>                 URL: https://issues.apache.org/jira/browse/WICKET-4579
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2, 1.5.7
>            Reporter: Jan Riehn
>            Assignee: Sven Meier
>
> Because of PackageTextTemplate calls IResourceStream.locate(clazz, path) it is currently not possible to set locale, style and variation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira