⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manganceform.java

📁 目前系统具有功能如下: 用户注册 修改信息 自定义图像 用户升级 锁定用户 用户发帖 论坛好友 论坛版主 用户列表 建立用户组 用户等级定义 在线用户查看 论坛财富分配 用
💻 JAVA
字号:
package com.yhbbs.bbs.form;

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;
/**
 * <p>Title:论坛公告管理的Form</p>
 * <br><b>WebSite: www.yyhweb.com</b>
 * <br><b>CopyRight: yyhweb[由由华网]</b>
 * @author stephen
 * @version YHBBS-2.0
 */
public class MangAnceForm extends ActionForm{
	
	private static final long serialVersionUID = 1L;
	private String title = "";
	private String content = "";
	private String action = "";
	private int anId = 0;
	private int forumId = 0;
	
	/**
	 * @return 公告内容
	 */
	public String getContent() {
		return content;
	}
	/**
	 * @param content 公告内容
	 */
	public void setContent(String content) {
		this.content = content.trim();
	/**
	 * @return 公告标题
	 */
	}
	/**
	 * @return 公告标题
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * @param title 公告标题
	 */
	public void setTitle(String title) {
		this.title = title.trim();
	}
	/** 
	 * @return 操作标示
	 */
	public String getAction() {
		return action;
	}
	/**
	 * @param action 操作标示
	 */
	public void setAction(String action) {
		this.action = action;
	}
	/**
	 * @return 公告Id
	 */
	public int getAnId() {
		return anId;
	}
	/**
	 * @param anId 公告Id
	 */
	public void setAnId(int anId) {
		this.anId = anId;
	}
	/**
	 * @return 论坛Id
	 */
	public int getForumId() {
		return forumId;
	}
	/**
	 * @param forumId 论坛Id
	 */
	public void setForumId(int forumId) {
		this.forumId = forumId;
	}
	public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest request){	
		ActionErrors errors = new ActionErrors();
		if(title=="" || title.length()<1){
			errors.add("announce.title.empty",new ActionMessage("announce.title.empty"));
		}
		if(content=="" || content.length()<1){
			errors.add("announce.content.empty",new ActionMessage("announce.content.empty"));
		}
		return errors;
        		
    }
	public void reset(ActionMapping actionMapping, HttpServletRequest request){
		action = "";
		title = "";
		content = "";
		anId = 0;
		forumId = 0;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -