[ 
https://issues.apache.org/struts/browse/STR-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41947
 ] 

Thomas Hartwig commented on STR-2272:
-------------------------------------

not in patch format, but I think this would do it:

in PropertyMessageResources.java add:

<code>
   /**
    * Returns the defined keys of the current message resources
    *
    * @return a collecton of keys which are accessible in the message resources
    */
   public Collection getKeys() {
      return messages.keySet();
   }
</code>

in  MessagesResources.java add:

<code>
   /**
    * Returns the defined keys of the current message resources
    *
    * @return a collecton of keys which are accessible in the message resources
    */
   public abstract Collection getKeys();
</code>

> keys of MessageResources
> ------------------------
>
>                 Key: STR-2272
>                 URL: https://issues.apache.org/struts/browse/STR-2272
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Extras
>    Affects Versions: 1.2.4
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Thomas Hartwig
>            Assignee: Struts Developers
>            Priority: Minor
>
> I have seen some rare requests to get the keys out of a MessageResources and
> some quirks around it. (for me I read the resource file for my own via
> org.apache.commons.configuration.PropertiesConfiguration at servlet startup, 
> oh
> brother)
> The best would be to have a method like getKeys in PropertyMessageResources.
> PS: I need this for implementing some helper tooltips on a page which should
> dynamic be loaded if available in the properties.

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

Reply via email to