📄 comebackarchiveform.java
字号:
package com.stsc.archive.backup;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
/*
<b>ActionForm</b>
*/
public class ComebackArchiveForm extends ActionForm
{
private String filename = "";
public void setFilename(String filename)
{
this.filename = (filename==null)?"":filename;
}
public String getFilename()
{
return this.filename;
}
/**
* Reset all properties to their default values.
*
* @param mapping The mapping used to select this instance
* @param request The servlet request we are processing
*/
public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.filename = "";
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
{
ActionErrors errors = new ActionErrors();
if((filename == null) || (filename.length() < 1))
{
errors.add("filename", new ActionError("error.comeback.filename"));
}
//简单验证,没考虑大小写问题
if(filename.indexOf(".xml") == -1)
{
filename += ".xml";
}
return errors;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -