commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <>
Subject Re: [RESOURCES] Messages vs. regular properties
Date Thu, 01 Dec 2005 22:55:04 GMT
On 11/30/05, Niall Pemberton <> wrote:
> On 12/1/05, Michael Jouravlev <> wrote:
> > Do I miss something or messages and resources are incompatible? From
> > my point of view they are basically the same thing. Differences are:
> >
> >  * resources can be anything, messages can be only strings
> >  * messages take parameters to stick into placeholders
> If were talking in Commons Resources terms then Resources and Message
> are different things - a Message is the representation of the key to a
> resource - Resources are what resolve those keys into the resource
> object.

Umm... So you are saying that I should use Message(s) for both error
messages and regular localised strings. Makes sense. How about
Messages to implement List? I know it sucks to implement all List
methods, but JSTL calls get("bla") for lists if I use something like
${list["bla"]} in my JSP page. I think it would really simplify
things, because now I have to write
  <%= ((Messages)session.getAttribute("MSGS")).getMessage("label.user") %>
which is OK, but too long. Or maybe you can suggest a better way to
display messages?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message