Each validator makes different properties available but it's a little bit of detective work to figure out which ones are available. I often find myself browsing thru the source to figure this out.
If you look at the doc for RequiredStringValidator [1] you will see is has a parameter fieldName. [1] http://struts.apache.org/2.x/docs/requiredstringvalidator-annotation.html On Fri, Oct 23, 2009 at 7:30 AM, Jiunn Haur Lim <codex.is.poe...@gmail.com>wrote: > Hi! I am new to Struts 2 and would appreciate a little help here. > > From the Struts2 tutorial > (http://struts.apache.org/2.1.8/docs/localizing-output.html), I learnt > that if I have the following messages in my resource bundle: > > requiredstring = ${getText(fieldName)} is required. > password = Password > username = User Name > > in package.properties, the validation messages will output "Password > is required" or "User Name is required" depending on the validation > outcome. However, when and where is the 'fieldName' variable > populated? Are there other variables that are populated this way? > > Thank you for your attention and time. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >