thememodifyform.java
来自「J2EE电子商务系统开发从入门到精通---基于Struts和Hibernate技」· Java 代码 · 共 63 行
JAVA
63 行
/*
* ThemeModifyForm.java
*
* Created on 2006年10月14日, 下午1:05
*/
package form.vote;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
/**
*
* @author chens
* @version
*/
public class ThemeModifyForm extends org.apache.struts.action.ActionForm {
private String name;
private String content;
private String remarks;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (name == null && name.equals("")) {
errors.add("name", new ActionMessage("errors.vote.theme.name.required"));
}
if (content == null) {
errors.add("content", new ActionMessage("errors.vote.theme.content.required"));
}
if (remarks == null) {
errors.add("remark", new ActionMessage("errors.vote.theme.remarks.required"));
}
return errors;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?