📄 logform.java
字号:
package org.helpsoft.helplog.struts.forms;
import java.math.*;
import java.text.*;
import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;
import org.helpsoft.helplog.dto.*;
public class LogForm extends ActionForm
{
private String logid;
private String logtypecode;
private String title;
private String content;
private String author;
private String date;
private String crudMethod;
/**
* Sets the value of logid
*/
public void setLogid(String logid)
{
this.logid = logid;
}
/**
* Gets the value of logid
*/
public String getLogid()
{
return logid;
}
/**
* Sets the value of logtypecode
*/
public void setLogtypecode(String logtypecode)
{
this.logtypecode = logtypecode;
}
/**
* Gets the value of logtypecode
*/
public String getLogtypecode()
{
return logtypecode;
}
/**
* Sets the value of title
*/
public void setTitle(String title)
{
this.title = title;
}
/**
* Gets the value of title
*/
public String getTitle()
{
return title;
}
/**
* 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 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 crudMethod
*/
public void setCrudMethod(String crudMethod)
{
this.crudMethod = crudMethod;
}
/**
* Gets the value of crudMethod
*/
public String getCrudMethod()
{
return crudMethod;
}
/**
* method'reset'
*
*/
public void reset()
{
logid = "";
logtypecode = "";
title = "";
content = "";
author = "";
}
/**
* method'validate'
*
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors _errors = new ActionErrors();
// attempt to parse date
try {
java.util.Date _parsed_date = date == null ? null : DateFormat.getDateInstance().parse( date);
}
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 + -