📄 addform.java
字号:
// Created by Xslt generator for Eclipse.// XSL : not found (java.io.FileNotFoundException: (Bad file descriptor))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage net.javafan.guestbook.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;/** * AddForm.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 08-29-2004 * * XDoclet definition: * @struts:form name="addForm" */public class AddForm extends ActionForm { // --------------------------------------------------------- Instance Variables /** content property */ private String content; /** homepage property */ private String homepage; /** username property */ private String username; /** email property */ private String email; /** oicq property */ private String oicq; /** face property */ private String face; // --------------------------------------------------------- Methods /** * Method validate * @param ActionMapping mapping * @param HttpServletRequest request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (username == null || username.trim().equals("")) { errors.add("username", new ActionError("error.noUsername")); } if (email !=null && email.length()>0 && email.indexOf("@")==-1) { errors.add("email", new ActionError("error.wrongEmail")); } if (content == null || content.trim().equals("")) { errors.add("content", new ActionError("error.noContent")); } return errors; } /** * Method reset * @param ActionMapping mapping * @param HttpServletRequest request */ public void reset(ActionMapping mapping, HttpServletRequest request) { content = ""; homepage = ""; username = ""; email = ""; oicq = ""; face = ""; } /** * Returns the content. * @return String */ public String getContent() { return content; } /** * Set the content. * @param content The content to set */ public void setContent(String content) { this.content = content; } /** * Returns the homepage. * @return String */ public String getHomepage() { return homepage; } /** * Set the homepage. * @param homepage The homepage to set */ public void setHomepage(String homepage) { this.homepage = homepage; } /** * Returns the username. * @return String */ public String getUsername() { return username; } /** * Set the username. * @param username The username to set */ public void setUsername(String username) { this.username = username; } /** * Returns the email. * @return String */ public String getEmail() { return email; } /** * Set the email. * @param email The email to set */ public void setEmail(String email) { this.email = email; } /** * Returns the oicq. * @return String */ public String getOicq() { return oicq; } /** * Set the oicq. * @param oicq The oicq to set */ public void setOicq(String oicq) { this.oicq = oicq; } /** * Returns the face. * @return String */ public String getFace() { return face; } /** * Set the face. * @param face The face to set */ public void setFace(String face) { this.face = face; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -