W


V

validate( ) method, 51–53, 94

Validator, 9

adding messages to the MessageResources.properties file, 124, 129

adding new validation definitions, 123–124

adding new validation rules, 121–123

adding to the Mini HR application, 126–129

byte validation, 103–104

byteLocale validation, 104

configurable validations, 98–99

configuring the application resource bundle file, 95–97

configuring validation.xml, 97–101

configuring validator-rules.xml, 94–95

creating Form Beans, 91–94

creating validation methods, 119–121

creating validations for indexed properties, 100

creditCard validation, 104

custom validations, 119–124

date validation, 104–105

double validation, 105–106

doubleRange validation, 106

email validation, 106–107

enabling, 90–91, 430–431

enabling client-side validations, 116–119

extending a set of validations, 99–100

float validation, 107

floatLocale validation, 107

floatRange validation, 108

included validations, 102–116

integer validation, 108

integerLocale validation, 109

internationalizing validations, 124–126

intRange validation, 109–110

long validation, 110

longLocale validation, 110

longRange validation, 110–111

mask validation, 111–112

maxlength validation, 112

minlength validation, 112–113

overview, 89–90

required validation, 113

short validation, 113–114

shortLocale validation, 114

url validation, 114–115

using with modules, 177

using with the Form Bean's reset( ) and validate( ) methods, 94

validations spanning multiple pages, 100–101

validwhen validation, 115–116

Validator configuration files

arg tag, 432–433

constant tag, 433–434

constant-name tag, 434

constant-value tag, 434

editing with Struts Console, 443–444

field tag, 434–435

form tag, 435–436

formset tag, 436–437

form-validation tag, 436

global tag, 438

javascript tag, 438–439

msg tag, 439–440

overview, 429–430

tags, 431–432

validation.xml, 430

validator tag, 440–441

validator-rules.xml, 429–430

var tag, 441–442

var-jstype tag, 442

var-name tag, 442–443

var-value tag, 443

XML DTDs, 430

validator tag, 440–441

validwhen validation, 115–116

var tag, 441–442

variables, 251–252, 311–312, 333–334

var-jstype tag, 442

var-name tag, 442–443

var-value tag, 443

View layer

alternative technologies, 64

Form Beans, 48–57

JSP pages, 48

JSP tag libraries, 57–58

of the Mini HR sample application, 60–64

resource bundles, 58–59

Struts and, 47–48



Struts. The Complete Reference
Struts: The Complete Reference, 2nd Edition
ISBN: 0072263865
EAN: 2147483647
Year: 2004
Pages: 165
Authors: James Holmes

Similar book on Amazon
Struts 2 in Action
Struts 2 in Action
Murach's Java Servlets and JSP, 2nd Edition
Murach's Java Servlets and JSP, 2nd Edition
Jakarta Struts For Dummies
Jakarta Struts For Dummies
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net