📄 storeoutform.java
字号:
/*
* StoreoutInsertForm.java
*
* Created on 2006年5月21日, 下午9:33
*/
package form.store;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
/**
*
* @author Administrator
* @version
*/
public class StoreoutForm extends org.apache.struts.action.ActionForm {
private String name;
private String roomId;
private String productId;
private String clientId;
private String outYear, outMonth, outDay;
private String remarks;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getOutYear() {
return outYear;
}
public void setOutYear(String outYear) {
this.outYear = outYear;
}
public String getOutMonth() {
return outMonth;
}
public void setOutMonth(String outMonth) {
this.outMonth = outMonth;
}
public String getOutDay() {
return outDay;
}
public void setOutDay(String outDay) {
this.outDay = outDay;
}
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 (getName() == null || getName().equals("")) {
errors.add("name", new ActionMessage("errors.storeout.name.required"));
}
if (getRoomId() == null || getRoomId().equals("")) {
errors.add("roomid", new ActionMessage("errors.storeout.roomid.required"));
}
if (getProductId() == null || getProductId().equals("")) {
errors.add("productid", new ActionMessage("errors.storeout.productid.required"));
}
if (getClientId() == null || getClientId().equals("")) {
errors.add("clientid", new ActionMessage("errors.storeout.clientid.required"));
}
if (getOutYear() == null || getOutYear().equals("") ||
getOutMonth() == null || getOutMonth().equals("") ||
getOutDay() == null || getOutDay().equals("")) {
errors.add("outtime", new ActionMessage("errors.storeout.outtime.required"));
}
if (getRemarks() == null) {
errors.add("remarks", new ActionMessage("errors.storeout.remarks.required"));
}
return errors;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -