commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [Validator] How to create messages with more than one placeho lder
Date Mon, 29 Mar 2004 09:46:25 GMT
Ok, after deleting the name attribute, this works now - thanks a lot!


-----Original Message-----
From: David Graham []
Sent: Sonntag, 28. März 2004 23:50
To: Jakarta Commons Users List
Subject: Re: [Validator] How to create messages with more than one

How are you getting the Arg objects?  My guess is you're doing something

The first call returns the correct Arg object because you didn't specify a
name attribute in the xml.  The second call returns null because the xml
is <arg1 name="maxlength"...  To properly retrieve the second Arg you need
to call Field.getArg("maxlength", 1).

Note that if you don't specify a name attribute, calling
Field.getArg("maxlength", 1) will still work because it looks for the
default arg when it can't find one with the name "maxlength".

Look at Struts' Resources.getArgs() method for examples.


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

View raw message