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

📄 columnaction.java

📁 Chinaxp 论坛源代码
💻 JAVA
字号:
/* * XP Forum * * Copyright (c) 2002-2003 RedSoft Group.  All rights reserved. * */package org.redsoft.forum.web;import org.apache.struts.action.Action;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;import org.redsoft.forum.ForumConstants;import org.redsoft.forum.dao.AccountDAO;import org.redsoft.forum.dao.DAOFactory;import org.redsoft.forum.dao.ThreadDAO;import org.redsoft.forum.exception.DAOException;import org.redsoft.forum.exception.AccountNotFoundException;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import java.io.IOException;import java.util.Collection;import java.util.Vector;/** * Column Action * list columnWriter on the left, and list thread of a columnWriter * * @author cinc * @version 1.0 */public class ColumnAction extends Action{    public ActionForward execute(ActionMapping mapping,				 ActionForm form,				 HttpServletRequest request,				 HttpServletResponse response)	throws IOException, ServletException, DAOException, AccountNotFoundException {        AccountDAO accountDAO = DAOFactory.getInstance().getAccountDAO();        Collection accountList = accountDAO.findColumnWriters();        request.setAttribute( ForumConstants.ACCOUNT_LIST, accountList );        String userName = request.getParameter( ForumConstants.ACCOUNT );        if ( userName == null ) {            request.setAttribute( "threads", new Vector() );        } else {            request.setAttribute( ForumConstants.USERNAME,  userName );            ThreadDAO threadDAO = DAOFactory.getInstance().getThreadDAO();            request.setAttribute( "threads", threadDAO.findColumnThreadsByAccountId( userName ) );        }        return (mapping.findForward("success"));    }}

⌨️ 快捷键说明

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