📄 update.java
字号:
/*
* Update.java
*
* Created on 2007年3月18日, 下午1:36
*/
package News.Struts.Action;
import News.Struts.ActionForm.SiteSettingActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.actions.DispatchAction;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import News.ProcessData.UpdateModel;
import News.Struts.ActionForm.MapActionForm;
/**
*
* @author Owner
* @version
*/
public class Update extends DispatchAction {
public ActionForward UpdateLink(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateLink((String)maf.getMapBack("Name"),(String)maf.getMapBack("URL"),(String)maf.getMapBack("Logo"),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateNotice(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateNotice(maf.getContent(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateCatalog(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateCatalog(maf.getContent(),maf.getLogoURL(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateNews(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateNews(maf.getTitle(),maf.getAuthor(),maf.getContent(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -