mappings, where each action mapping may depend on only certain form fields to be validated and the others to be left alone. The fieldelement contains several child elements: The msgchild element allows you to specify an alternate message for a field element. The validation rule can use this value instead of the default message declared with the rule. The value for the msg element must be a key from the application resource bundle. For example: mask ${phone} The msgelement supports three attributes: The nameattribute specifies the rule with which the msg should be used. The value should be one of the rules specified in the validation-rules.xml file or in the global section. The keyattribute specifies a key from the resource bundle that should be added to the ActionError if validation fails. If you want to specify a literal message, rather than using the resource bundle, you can set the resource attribute to false. In this case, the key attribute is taken as a literal string. The fieldelement allows up to four additional elements to be included. These elements, named arg0, arg1, arg2, and arg3, are used to pass additional values to the message, either from the resource bundle or from the varor constant elements. The arg0 element defines the first replacement value, arg1defines the second replacement value, and so on. Each arg element supports three attributes, name, key, and resource, which are the same as the attributes of the msg element described earlier. Example 11-1 included elements for arg0and arg1 like this:
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.
This entry was posted
on Thursday, August 23rd, 2007 at 6:10 pm and is filed under Domain.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.