⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pollform.java

📁 近几年来
💻 JAVA
字号:
package tarena.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;public class PollForm extends ActionForm {	private String q21;	private String q22;	private String q23;	private String q11;	private String q12;	private String q13;	private Integer c5;	private Integer c2;	private Integer c4;	private Integer c3;	private Integer c1;	private Integer c6;	private Integer c7;	private Integer c8;	private Integer c9;	private Integer c10;	private Integer c11;	private Integer c12;	private Integer c13;	private Integer c14;	public Integer getC10() {		return c10;	}	public void setC10(Integer c10) {		this.c10 = c10;	}	public Integer getC11() {		return c11;	}	public void setC11(Integer c11) {		this.c11 = c11;	}	public Integer getC12() {		return c12;	}	public void setC12(Integer c12) {		this.c12 = c12;	}	public Integer getC13() {		return c13;	}	public void setC13(Integer c13) {		this.c13 = c13;	}	public Integer getC14() {		return c14;	}	public void setC14(Integer c14) {		this.c14 = c14;	}	public Integer getC7() {		return c7;	}	public void setC7(Integer c7) {		this.c7 = c7;	}	public Integer getC8() {		return c8;	}	public void setC8(Integer c8) {		this.c8 = c8;	}	public Integer getC9() {		return c9;	}	public void setC9(Integer c9) {		this.c9 = c9;	}	public ActionErrors validate(ActionMapping mapping,			HttpServletRequest request) {		ActionErrors errors = new ActionErrors();		if (c1 == null)			errors.add("info.c1", new ActionMessage("info.c1"));		if (c2 == null)			errors.add("info.c2", new ActionMessage("info.c2"));		if (c3 == null)			errors.add("info.c3", new ActionMessage("info.c3"));		if (c4 == null)			errors.add("info.c4", new ActionMessage("info.c4"));		if (c5 == null)			errors.add("info.c5", new ActionMessage("info.c5"));		if (c6 == null)			errors.add("info.c6", new ActionMessage("info.c6"));		if (c7 == null)			errors.add("info.c7", new ActionMessage("info.c7"));		if (c8 == null)			errors.add("info.c8", new ActionMessage("info.c8"));		if (c9 == null)			errors.add("info.c9", new ActionMessage("info.c9"));		if (c10 == null)			errors.add("info.c10", new ActionMessage("info.c10"));		if (c11 == null)			errors.add("info.c11", new ActionMessage("info.c11"));		if (c12 == null)			errors.add("info.c12", new ActionMessage("info.c12"));		if (c13 == null)			errors.add("info.c13", new ActionMessage("info.c13"));		if (c14 == null)			errors.add("info.c14", new ActionMessage("info.c14"));		if ((q11 == null || q11.trim().length() < 1)				&& (q12 == null || q12.trim().length() < 1)				&& (q13 == null || q13.trim().length() < 1))			errors.add("info.q1", new ActionMessage("info.q1"));		/*if (q21 == null || q21.trim().length() < 1 || q22 == null				|| q22.trim().length() < 1 || q23 == null				|| q23.trim().length() < 1)			errors.add("info.q2", new ActionMessage("info.q2"));*/		return errors;	}	public void reset(ActionMapping mapping, HttpServletRequest request) {	}	public String getQ11() {		return q11;	}	public void setQ11(String q11) {		this.q11 = q11;	}	public String getQ12() {		return q12;	}	public void setQ12(String q12) {		this.q12 = q12;	}	public String getQ13() {		return q13;	}	public void setQ13(String q13) {		this.q13 = q13;	}	public String getQ21() {		return q21;	}	public void setQ21(String q21) {		this.q21 = q21;	}	public String getQ22() {		return q22;	}	public void setQ22(String q22) {		this.q22 = q22;	}	public String getQ23() {		return q23;	}	public void setQ23(String q23) {		this.q23 = q23;	}	public Integer getC5() {		return c5;	}	public void setC5(Integer c5) {		this.c5 = c5;	}	public Integer getC2() {		return c2;	}	/**	 * Set the c2.	 * 	 * @param c2	 *            The c2 to set	 */	public void setC2(Integer c2) {		this.c2 = c2;	}	/**	 * Returns the c4.	 * 	 * @return Integer	 */	public Integer getC4() {		return c4;	}	/**	 * Set the c4.	 * 	 * @param c4	 *            The c4 to set	 */	public void setC4(Integer c4) {		this.c4 = c4;	}	/**	 * Returns the c3.	 * 	 * @return Integer	 */	public Integer getC3() {		return c3;	}	/**	 * Set the c3.	 * 	 * @param c3	 *            The c3 to set	 */	public void setC3(Integer c3) {		this.c3 = c3;	}	/**	 * Returns the c6.	 * 	 * @return Integer	 */	public Integer getC6() {		return c6;	}	/**	 * Set the c6.	 * 	 * @param c6	 *            The c6 to set	 */	public void setC6(Integer c6) {		this.c6 = c6;	}	/**	 * Returns the c1.	 * 	 * @return Integer	 */	public Integer getC1() {		return c1;	}	/**	 * Set the c1.	 * 	 * @param c1	 *            The c1 to set	 */	public void setC1(Integer c1) {		this.c1 = c1;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -