📄 modifyprojectform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package edu.neu.sspp.struts.form;
import java.io.IOException;
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;
/**
* MyEclipse Struts
* Creation date: 06-19-2007
*
* XDoclet definition:
* @struts.form name="modifyProjectForm"
*/
public class ModifyProjectForm extends ActionForm {
/*
* Generated fields
*/
/** file property */
private String file;
/** name property */
private String name;
/** intro property */
private String intro;
private String projID;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors error = new ActionErrors();
if(name == null || name.equals("")) {
error.add("name", new ActionMessage("error.project.name.null"));
request.setAttribute("projID", projID);
}
if(intro.length() > 1024) {
error.add("intro", new ActionMessage("error.project.intro.error"));
request.setAttribute("projID", projID);
}
if(false) {
error.add("file", new ActionMessage("error.project.file.xxxx"));
request.setAttribute("projID", projID);
}
try {
convertToUTF();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return error;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* Returns the file.
* @return String
*/
public String getFile() {
return file;
}
/**
* Set the file.
* @param file The file to set
*/
public void setFile(String file) {
this.file = file;
}
/**
* 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;
}
/**
* Returns the intro.
* @return String
*/
public String getIntro() {
return intro;
}
/**
* Set the intro.
* @param intro The intro to set
*/
public void setIntro(String intro) {
this.intro = intro;
}
public String getProjID() {
return projID;
}
public void setProjID(String projID) {
this.projID = projID;
}
private void convertToUTF() throws IOException {
name = new String(name.getBytes("ISO-8859-1"), "UTF-8");
intro = new String(intro.getBytes("ISO-8859-1"), "UTF-8");
file = new String(file.getBytes("ISO-8859-1"), "UTF-8");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -