在myeclipse中的写了Actionform,在Actionform中的
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors = new ActionErrors();
if((message==null)||(message.length()<1))
{
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.message.required"));}
return errors;
}
其中add() 函数被在中间用黑线划掉,请问这是原因引起的
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors = new ActionErrors();
if((message==null)||(message.length()<1))
{
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.message.required"));}
return errors;
}
其中add() 函数被在中间用黑线划掉,请问这是原因引起的
errors.add(ActionErrors.GLOBAL_ERROR, new ActionMessage("error.message.required"))
errors.add(ActionErrors.GLOBAL_ERROR, new ActionMessage("error.message.required"));
怎么还是add函数中间被划了黑线
errors.add(ActionErrors.GLOBAL_ERROR, new ActionMessage("error.message.required"));
应该就是这样
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionMessage("error.message.required"));
为什么我的没有出现黑线啊
add(String arg0,ActionError arg1)的这个方法是不推荐使用的
现在都用add(String arg0,ActionMessage arg1)