You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcel Sammut <su...@rogers.com> on 2010/01/01 23:48:40 UTC

[T5] Iterate Through Page Messages (Localization File)

Greetings,
Is it possible to iterate through the collection of keys in a pages property
file?

For example:

import tapestry....Messages;
public class MyPage {
&nbsp;&nbsp;    @Inject
&nbsp;&nbsp;    private Messages pageMessages
    
&nbsp;&nbsp;    private void onActivate() {
&nbsp;&nbsp;&nbsp;&nbsp;        for (int i=0;i&lt;pageMessages.length; i++)    
// -->.length doesn't exist
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;             ...
&nbsp;&nbsp;&nbsp;&nbsp;        }
&nbsp;&nbsp;}
}


Of course there is a MyPages.propertiesfile that contains key=value pairs.


Are the accessors the the Messages interface collection private and can not
be accessed?  Is there a way to translate an instance o Messages to a Map so
that I can traverse through the list of key pairs?

Thanks,
Marcel
-- 
View this message in context: http://old.nabble.com/-T5--Iterate-Through-Page-Messages-%28Localization-File%29-tp26988936p26988936.html
Sent from the Tapestry - User mailing list archive at Nabble.com.