📄 office_gqxxfbform.java
字号:
/* * * @author 郑文金 * * 这个form用于在"网上办公室"中发布供求信息 * */package struts.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.upload.FormFile;import javabean.*;public class Office_gqxxfbForm extends ActionForm { // --------------------------------------------------------- Instance Variables /** AREA property */ private String AREA; /** EDATE property */ private String EDATE; /** KIND property */ private String KIND; /** PRICE property */ private String PRICE; /** DESCRIBE property */ private String DESCRIBE; /** STYPE property */ private String STYPE; /** QUANTITY property */ private int QUANTITY; /** PHOTO property */ private FormFile PHOTO; /** SPEC property */ private String SPEC; /** NAME property */ private String NAME; // --------------------------------------------------------- Methods /** * Method validate * @param ActionMapping mapping * @param HttpServletRequest request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors=new ActionErrors(); Check numbercheck=new Check(); if(NAME.equals("")) errors.add("name.error",new ActionError("office_name.error")); if(SPEC.equals("")) errors.add("spec.error",new ActionError("office_spec.error")); if(KIND.equals("N")) errors.add("kind.error",new ActionError("office_kind.error")); if(PRICE.equals("")) errors.add("price.error",new ActionError("office_price.error")); if(DESCRIBE.length()>1000) errors.add("des.error",new ActionError("office_des.error")); return errors; } /** * Method reset * @param ActionMapping mapping * @param HttpServletRequest request */ public void reset(ActionMapping mapping, HttpServletRequest request) { AREA = ""; EDATE = ""; KIND = ""; PRICE = ""; DESCRIBE = ""; STYPE = ""; QUANTITY = 0; SPEC = ""; NAME = ""; } /** * Returns the AREA. * @return String */ public String getAREA() { return AREA; } /** * Set the AREA. * @param AREA The AREA to set */ public void setAREA(String AREA) { this.AREA = AREA; } /** * Returns the EDATE. * @return String */ public String getEDATE() { return EDATE; } /** * Set the EDATE. * @param EDATE The EDATE to set */ public void setEDATE(String EDATE) { this.EDATE = EDATE; } /** * Returns the KIND. * @return String */ public String getKIND() { return KIND; } /** * Set the KIND. * @param KIND The KIND to set */ public void setKIND(String KIND) { this.KIND = KIND; } /** * Returns the PRICE. * @return String */ public String getPRICE() { return PRICE; } /** * Set the PRICE. * @param PRICE The PRICE to set */ public void setPRICE(String PRICE) { this.PRICE = PRICE; } /** * Returns the DESCRIBE. * @return String */ public String getDESCRIBE() { return DESCRIBE; } /** * Set the DESCRIBE. * @param DESCRIBE The DESCRIBE to set */ public void setDESCRIBE(String DESCRIBE) { this.DESCRIBE = DESCRIBE; } /** * Returns the STYPE. * @return String */ public String getSTYPE() { return STYPE; } /** * Set the STYPE. * @param STYPE The STYPE to set */ public void setSTYPE(String STYPE) { this.STYPE = STYPE; } /** * Returns the QUANTITY. * @return String */ public int getQUANTITY() { return QUANTITY; } /** * Set the QUANTITY. * @param QUANTITY The QUANTITY to set */ public void setQUANTITY(int QUANTITY) { this.QUANTITY = QUANTITY; } /** * Returns the PHOTO. * @return String */ public void setPHOTO(FormFile PHOTO) { this.PHOTO=PHOTO; } public FormFile getPHOTO() { return this.PHOTO; } /** * Returns the SPEC. * @return String */ public String getSPEC() { return SPEC; } /** * Set the SPEC. * @param SPEC The SPEC to set */ public void setSPEC(String SPEC) { this.SPEC = SPEC; } /** * Returns the NAME. * @return String */ public String getNAME() { return NAME; } /** * Set the 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 + -