📄 meetingform.java
字号:
package com.oa.struts.forms;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
public class MeetingForm extends ActionForm {
private static final long serialVersionUID = -7819458651912123880L;
protected String id = null;
protected String sender = null;
protected String starttime = null;
protected String endtime = null;
protected String address = null;
protected String title = null;
protected String content = null;
protected String isread = null;
public String getIsread() {
return isread;
}
public void setIsread(String isread) {
this.isread = isread;
}
public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) {
ActionErrors errors = new ActionErrors();
String queryString = arg1.getQueryString();
if (queryString.equalsIgnoreCase("method=insert")
|| queryString.equalsIgnoreCase("method=update")) {
if (starttime == null || starttime.equals("")) {
errors.add("starttime", new ActionMessage("meeting.error.starttime"));
}
if (endtime == null || endtime.equals("")) {
errors.add("endtime", new ActionMessage("meeting.error.endtime"));
}
if (address == null || address.equals("")) {
errors.add("address", new ActionMessage("meeting.error.address"));
}
if (title == null || title.equals("")) {
errors.add("title", new ActionMessage("meeting.error.title"));
}
if (content == null || content.equals("")) {
errors.add("content", new ActionMessage("meeting.error.content"));
}
}
arg1.setAttribute("meetingFormBean", this);
return errors;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getEndtime() {
return endtime;
}
public void setEndtime(String endtime) {
this.endtime = endtime;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSender() {
return sender;
}
public void setSender(String sender) {
this.sender = sender;
}
public String getStarttime() {
return starttime;
}
public void setStarttime(String starttime) {
this.starttime = starttime;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -