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

📄 noticenewsdetailaction.java

📁 学习dwr+struts2+spring进行开发的好例子
💻 JAVA
字号:
package com.szhelper.lotteryWeb.webapp.action;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.extremecomponents.table.limit.Limit;

import com.szhelper.lotteryWeb.Constants;
import com.szhelper.lotteryWeb.model.NoticeNewsDetail;
import com.szhelper.lotteryWeb.service.INoticeNewsDetailService;
import com.szhelper.lotteryWeb.util.DateUtil;
import com.szhelper.lotteryWeb.util.ExtremeTablePage;
import com.szhelper.lotteryWeb.util.PageBean;

public class NoticeNewsDetailAction extends LotteryUploadAction {
	private NoticeNewsDetail noticeNewsDetail;
	private Collection<NoticeNewsDetail> noticeNewsDetails;
	private INoticeNewsDetailService noticeNewsDetailService;

	private Integer parameter_categoryId;
	private String parameter_author, parameter_title;
	private Date parameter_fromPostDate, parameter_toPostDate;

	public String save() throws Exception {
		freshUpdateDate();
		noticeNewsDetail.setUpdateDate(updateDate);

		//copyToDst();

		if (getNoticeNewsDetailService().saveNoticeNewsDetail(noticeNewsDetail)) {
			return SUCCESS;
		}
		return ERROR;
	}

	public String update() throws Exception {
		freshUpdateDate();
		noticeNewsDetail.setUpdateDate(updateDate);
		
		//copyToDst();
		
		if (getNoticeNewsDetailService().updateNoticeNewsDetail(
				noticeNewsDetail)) {
			return SUCCESS;
		}
		return ERROR;
	}

	public String delete() throws Exception {
		if (null != id) {
			if (getNoticeNewsDetailService().deleteNoticeNewsDetail(
					id.intValue()))
				return SUCCESS;
		} /*
			 * else { if
			 * (getNoticeNewsDetailService().deleteNoticeNewsDetail(id.intValue()))
			 * return SUCCESS; }
			 */
		return ERROR;
	}

	public String load() {
		noticeNewsDetail = getNoticeNewsDetailService()
				.getNoticeNewsDetailByKey(id);
		return SUCCESS;
	}

	public String list() {
		try {
			Limit limit = ExtremeTablePage.getLimit(request, defaultPageSize);
			PageBean page = new PageBean();
			page.setPageSize(limit.getCurrentRowsDisplayed()); // ecͨ��limit���

⌨️ 快捷键说明

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