?? info_editform.java
字號:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.8.4/xslt/JavaClass.xslpackage com.infosys.struts.form;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 org.infosys.logic.ClassList;import org.infosys.security.UserData;import org.infosys.util.ParamUtil;/** * MyEclipse Struts * Creation date: 08-28-2005 * * XDoclet definition: * @struts:form name="info_editForm" */public class Info_editForm extends ActionForm { // --------------------------------------------------------- Instance Variables /** pubdate property */ private String pubdate; /** title property */ private String title; /** vieworder property */ private Integer vieworder; /** pubuser property */ private String pubuser; /** content property */ private String content; /** infofrom property */ private String infofrom; /** status property */ private Integer status; /** infoclass property */ private String[] infoclass; /** action property */ private String action; /** id property */ private String id; // --------------------------------------------------------- Methods /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { if(action!=null && action.equalsIgnoreCase("save")){ ActionErrors errors=new ActionErrors(); if((title==null)||(title.length()<1)){ errors.add("title",new ActionError("tips.this.isNull")); } if((content==null)||(content.length()<1)){ errors.add("content",new ActionError("tips.this.isNull")); } if((infoclass==null)||(infoclass.length<1)){ errors.add("infoclass",new ActionError("tips.this.isNull")); } if(vieworder==null){ errors.add("vieworder",new ActionError("tips.this.isNull")); } if(status==null){ status=new Integer(1); } request.setAttribute("ClassList",new ClassList()); return errors; }else{ return null; } } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { this.content=null; this.infoclass=null; this.infofrom=null; this.pubdate=ParamUtil.getDate("yyyy-MM-dd"); this.pubuser=UserData.userInfo(request).get("name").toString(); this.status=new Integer(1); this.title=null; this.vieworder=new Integer(0); } /** * Returns the pubdate. * @return Date */ public String getPubdate() { return pubdate; } /** * Set the pubdate. * @param pubdate The pubdate to set */ public void setPubdate(String pubdate) { this.pubdate = pubdate; } /** * Returns the title. * @return String */ public String getTitle() { return title; } /** * Set the title. * @param title The title to set */ public void setTitle(String title) { this.title = title; } /** * Returns the vieworder. * @return Integer */ public Integer getVieworder() { return vieworder; } /** * Set the vieworder. * @param vieworder The vieworder to set */ public void setVieworder(Integer vieworder) { this.vieworder = vieworder; } /** * Returns the pubuser. * @return String */ public String getPubuser() { return pubuser; } /** * Set the pubuser. * @param pubuser The pubuser to set */ public void setPubuser(String pubuser) { this.pubuser = pubuser; } /** * Returns the content. * @return String */ public String getContent() { return content; } /** * Set the content. * @param content The content to set */ public void setContent(String content) { this.content = content; } /** * Returns the infofrom. * @return String */ public String getInfofrom() { return infofrom; } /** * Set the infofrom. * @param infofrom The infofrom to set */ public void setInfofrom(String infofrom) { this.infofrom = infofrom; } /** * Returns the status. * @return Integer */ public Integer getStatus() { return status; } /** * Set the status. * @param status The status to set */ public void setStatus(Integer status) { this.status = status; } /** * Returns the infoclass. * @return String[] */ public String[] getInfoclass() { return infoclass; } /** * Set the infoclass. * @param infoclass The infoclass to set */ public void setInfoclass(String[] infoclass) { this.infoclass = infoclass; } /** * @return 返回 action。 */ public String getAction() { return action; } /** * @param action 要設置的 action。 */ public void setAction(String action) { this.action = action; } /** * @return 返回 id。 */ public String getId() { return id; } /** * @param id 要設置的 id。 */ public void setId(String id) { this.id = id; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -