Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
TextFormattingRules
WhatIsWiki




JSPWiki v2.2.33

[RSS]


Hide Menu

SandBox


Difference between version 45 and version 44:

At line 30 changed 5 lines.
protected void initBinder(HttpServletRequest request,
ServletRequestDataBinder binder) {
NumberFormat nf = NumberFormat.getNumberInstance();
binder.registerCustomEditor(Long.class, null,
new CustomNumberEditor(Long.class, nf, true));
import org.appfuse.model.User;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
public class UserValidator implements Validator {
public boolean supports(Class clazz) {
return clazz.equals(User.class);
At line 39 added 10 lines.
public void validate(Object obj, Errors errors) {
User user = (User) obj;
if ("".equals(user.getLastName())) {
errors.rejectValue("lastName", "errors.required",
new Object[] { "Last Name" }, "Value required.");
}
}
}

Back to SandBox, or to the Page History.