BlogListForm.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.web.form;
- import javax.servlet.http.*;
- import org.apache.commons.lang.*;
- import org.apache.struts.action.*;
- import org.apache.struts.validator.*;
- public class BlogListForm
- extends ValidatorForm {
- private String action;
- private long blogid;
- private String date;
- private long sortid;
- private String username;
- public String getAction() {
- return action;
- }
- public void setAction(String action) {
- this.action = action;
- }
- public void setSortid(long sortid) {
- this.sortid = sortid;
- }
- public void setDate(String date) {
- this.date = date;
- }
- public void setBlogid(long blogid) {
- this.blogid = blogid;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public long getBlogid() {
- return blogid;
- }
- public String getDate() {
- return date;
- }
- public long getSortid() {
- return sortid;
- }
- public String getUsername() {
- return username;
- }
- public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
- ActionErrors errors = new ActionErrors();
- if (StringUtils.isBlank(this.action)) {
- this.action = "all";
- }
- if (this.blogid == 0) {
- errors.add("error.parametererror", new ActionMessage("error.parametererror"));
- }
- if (this.page == 0) {
- this.page = 1;
- }
- return errors;
- }
- public void reset(ActionMapping actionMapping, HttpServletRequest servletRequest) {
- }
- }