// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   MessageBoardAction.java

package com.keyshop.shop.content.controller;

import com.keyshop.pub.controller.PubAction;
import com.keyshop.pub.controller.PubForm;
import com.keyshop.pub.util.Pager;
import com.keyshop.pub.util.StringUtil;
import com.keyshop.shop.content.bo.MessageBoardBO;
import com.keyshop.shop.content.model.MessageBoard;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.*;

// Referenced classes of package com.keyshop.shop.content.controller:
//            MessageBoardForm

public class MessageBoardAction extends PubAction
{

    public MessageBoardAction()
    {
    }

    public String getSelectSQL()
    {
        String sql = "";
        return sql;
    }

    public void initClassName()
    {
        boClass = "com.keyshop.shop.content.bo.MessageBoardBO";
        beanClass = "com.keyshop.shop.content.model.MessageBoard";
        formBeanClass = "com.keyshop.shop.content.controllerMessageBoardForm";
    }

    public ActionForward performAdd(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        try
        {
            MessageBoardForm messageForm = (MessageBoardForm)form;
            messageForm.clear();
            Pager page = new Pager(messageForm.getCurrentPageNo());
            request.setAttribute("pager", page);
            MessageBoardBO messagerBoardBO = new MessageBoardBO();
            java.util.List list = messagerBoardBO.list(page, getSelectSQL());
            messageForm.setMessageList(list);
            PubForm _tmp = (PubForm)form;
            ((PubForm)form).setPageType("add");
        }
        catch(Exception e)
        {
            generalError(request, e);
            return mapping.findForward("fail");
        }
        return mapping.findForward("add");
    }

    public ActionForward performSave(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        try
        {
           
        }
        catch(Exception e)
        {
            generalError(request, e);
            return mapping.findForward("fail");
        }
        return performAdd(mapping, form, request, response);
    }

    public ActionForward performRe(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        try
        {
           
        }
        catch(Exception e)
        {
            generalError(request, e);
            return mapping.findForward("fail");
        }
        return performList(mapping, form, request, response);
    }

    public ActionForward performResave(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    {
        try
        {
            MessageBoardBO bo = new MessageBoardBO();
            String parentId = request.getParameter("reparentId");
            MessageBoard parentBean = null;
            if(!StringUtil.isEmpty(parentId))
                parentBean = (MessageBoard)bo.get(parentId);
            if(parentBean != null)
                
        }
        catch(Exception e)
        {
            generalError(request, e);
            return mapping.findForward("fail");
        }
        return performList(mapping, form, request, response);
    }
}
