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

📄 topicform.java

📁 struts+hibernate BBS mysql数据库 功能基本齐全
💻 JAVA
字号:
package com.elan.forum.forms;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.elan.forum.util.ElCheckString;

public class TopicForm extends ActionForm {

	private String title;
	private String author;
	private String text;
	private String topicType;
	private Integer pieceId;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getTopicType() {
		return topicType;
	}

	public void setTopicType(String actrileType) {
		this.topicType = actrileType;
	}

	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = null;
		if (ElCheckString.isEmptyString(title)
				|| ElCheckString.isEmptyString(author)
				|| ElCheckString.isEmptyString(text)
				|| ElCheckString.isEmptyString(topicType)
				|| pieceId.intValue() < 1) {
			errors = new ActionErrors();
			errors.add("error", new ActionError("post.topic.validate.err"));
		}
		System.out.println(title);
		System.out.println(author);
		System.out.println(text);
		System.out.println(topicType);
		return errors;
	}

	public Integer getPieceId() {
		return pieceId;
	}

	public void setPieceId(Integer pieceId) {
		this.pieceId = pieceId;
	}
}

⌨️ 快捷键说明

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