Emi Lu wrote:
Good morning,
With struts2.1.6, In package.properties:
empty.error={0} cannot be empty.
Setup field error as:
this.addFieldError("username.empty", getText("empty.error"));
But is there a way, I can replace {0} with "username"?
Answering specifically: use one of the other getText(...) methods, like
getText(String, String[]) or getText(String, List).
More generically, you may not need to do this if the field name is what
you want to replace the text with:
empty.error=${getText(fieldName)} cannot be empty.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org