📄 entriesform.java
字号:
package org.helpsoft.blog.struts.forms;
import java.math.*;
import java.text.*;
import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;
import org.helpsoft.blog.dto.*;
public class EntriesForm extends ActionForm
{
private String entryid;
private String name;
private String author;
private String date;
private String content;
private String crudMethod;
/**
* Sets the value of entryid
*/
public void setEntryid(String entryid)
{
this.entryid = entryid;
}
/**
* Gets the value of entryid
*/
public String getEntryid()
{
return entryid;
}
/**
* Sets the value of name
*/
public void setName(String name)
{
this.name = name;
}
/**
* Gets the value of name
*/
public String getName()
{
return name;
}
/**
* Sets the value of author
*/
public void setAuthor(String author)
{
this.author = author;
}
/**
* Gets the value of author
*/
public String getAuthor()
{
return author;
}
/**
* Sets the value of date
*/
public void setDate(String date)
{
this.date = date;
}
/**
* Gets the value of date
*/
public String getDate()
{
return date;
}
/**
* Sets the value of content
*/
public void setContent(String content)
{
this.content = content;
}
/**
* Gets the value of content
*/
public String getContent()
{
return content;
}
/**
* Sets the value of crudMethod
*/
public void setCrudMethod(String crudMethod)
{
this.crudMethod = crudMethod;
}
/**
* Gets the value of crudMethod
*/
public String getCrudMethod()
{
return crudMethod;
}
/**
* Method 'reset'
*
*/
public void reset()
{
name = "";
author = "";
date = "";
content = "";
}
/**
* Method 'validate'
*
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors _errors = new ActionErrors();
// attempt to parse entryid
try {
int _parsed_entryid = Integer.parseInt( entryid );
}
catch (Exception e) {
_errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("internal.error", e.getMessage()) );
}
return _errors;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -