📄 clientform.java
字号:
package com.qrsx.appcam.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
*
*/
public class ClientForm extends ActionForm {
private String id;// 编号 主键
private String name;// 工厂名称
private String address;// 联系地址
private String linkman;// 联系人
private String telephone;// 联系电话
private String description;// 工厂描述
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest requeset) {
ActionErrors errors = new ActionErrors();
//公司名称、地址、联系人 必须填写
if (name == null || name.length() < 1) {
errors.add("name", new ActionMessage("error.name.required"));
}
if (address == null || address.length() < 1) {
errors.add("address", new ActionMessage("error.address.required"));
}
if (linkman == null || linkman.length() < 1) {
errors.add("linkman", new ActionMessage("error.linkman.required"));
}
return errors;
}
/**
* @return the telephone
*/
public String getTelephone() {
return telephone;
}
/**
* @param telephone
* the telephone to set
*/
public void setTelephone(String telephone) {
this.telephone = telephone;
}
/**
* @return the address
*/
public String getAddress() {
return address;
}
/**
* @param address
* the address to set
*/
public void setAddress(String address) {
this.address = address;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the linkman
*/
public String getLinkman() {
return linkman;
}
/**
* @param linkman
* the linkman to set
*/
public void setLinkman(String linkman) {
this.linkman = linkman;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -