Steve Swinsburg wrote:
That throws a
java.util.MissingResourceException: Unable to find resource:
error.empty.file.uploaded for component: .....
Is there a reason why StringResourceModel is not preferred. Its just
as localisable as the other method right?
I'm not saying that StringResourceModel is less preferred. They are both
just as localisable. (Perhaps under the hood both methods boil down to
the same thing?)
I'm just saying that I mostly see examples that use Component's
getString() method :)
Why the MissingResourceException is thrown is a little unclear to me.
Are you sure that the resource is in the correct file? getString()
should load the string from the corresponding .properties file. So, if
the code was in HelloWorld.java, then HelloWorld.properties should
contain a line like error.empty.file.uploaded = You have uploaded an
empty file.
--
With kind regards,
Jurrie Overgoor
2go-mobile b.v.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]