posts - 66,  comments - 40,  trackbacks - 0

public ActionErrors validate(ActionMapping mapping,    //Form
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
        if ((buddyEmail == null) || (buddyEmail.length() < 1) || (buddyEmail.indexOf("@") == -1))
            errors.add("buddyEmail",
                new ActionError("buddyEmail","error.buddyEmail.required"));       
        return errors;

    }

//resource file
error.buddyEmail.required = Error;

//JSP file
<html:errors proprity = "buddyEmail" />

posted on 2006-01-10 20:43 happytian 阅读(86) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Welcome here, my friend!

常用链接

留言簿(12)

随笔档案(66)

文章分类

文章档案(63)

web

最新随笔

搜索

  •  

积分与排名

  • 积分 - 88616
  • 排名 - 646

最新评论

阅读排行榜

评论排行榜