📄 productionform.java
字号:
/**
*
*/
package com.qrsx.qrsxcrm.form;
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;
/**
* @author Administrator
*
*/
@SuppressWarnings("serial")
public class ProductionForm extends ActionForm
{
private String id; // 主键
private String productionName; // 产品名称
private String productionId; // 产品编号
private String createDate; // 创建日期
private String productionTypeId; // 产品类型
private String num; // 库存量
private String price; // 产品单价
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((productionName == null)||(productionName.length()<1)){
errors.add("productionName",new ActionMessage("storeroom.production.productionName"));
}
if((productionId == null)||(productionId.length()<1)){
errors.add("productionId",new ActionMessage("storeroom.production.productionId"));
}
if((createDate == null)||(createDate.length()<1)){
errors.add("createDate",new ActionMessage("storeroom.production.createDate"));
}
if((productionTypeId == null)||(productionTypeId.length()<1)){
errors.add("productionTypeId",new ActionMessage("storeroom.production.productionType"));
}
if((num == null)||(num.length()<1)){
errors.add("num",new ActionMessage("storeroom.production.num"));
}
if((price == null)||(price.length()<1)){
errors.add("price",new ActionMessage("storeroom.production.price"));
}
return errors;
}
/**
* @return the createDate
*/
public String getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the num
*/
public String getNum() {
return num;
}
/**
* @param num the num to set
*/
public void setNum(String num) {
this.num = num;
}
/**
* @return the price
*/
public String getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(String price) {
this.price = price;
}
/**
* @return the productionId
*/
public String getProductionId() {
return productionId;
}
/**
* @param productionId the productionId to set
*/
public void setProductionId(String productionId) {
this.productionId = productionId;
}
/**
* @return the productionName
*/
public String getProductionName() {
return productionName;
}
/**
* @param productionName the productionName to set
*/
public void setProductionName(String productionName) {
this.productionName = productionName;
}
/**
* @return the productionTypeId
*/
public String getProductionTypeId() {
return productionTypeId;
}
/**
* @param productionTypeId the productionTypeId to set
*/
public void setProductionTypeId(String productionTypeId) {
this.productionTypeId = productionTypeId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -