67,538
社区成员
发帖
与我相关
我的任务
分享
<TABLE class=table cellSpacing=0 cellPadding=0 width=585 border=0>
<TR>
<TH width=179>问卷添加</TH>
<TH width=422><input name="username" type="hidden" id="username" value="${sessionScope.username}"></TH>
<TH width=374><SPAN class=R>*</SPAN> 为必填项目 </TH></TR>
<TR>
<TD width=179>问卷名称:</TD>
<TD width=422><INPUT name="Survey_name" id="Survey_name" type="text"></TD>
<TR>
<TD width=179>问卷发起人(单位):</TD>
<TD width=422><INPUT name="Survey_author" id="Survey_author" type="text"></TD>
<TD width=374><SPAN class=R>*</SPAN> 问卷发起人,此问卷的所有单位</TD></TR>
<TR>
<TD width=179>问卷描述:</TD>
<TD width=422><textarea onpropertychange=this.style.posHeight=this.scrollHeight name="Survey_description" id="Survey_description" cols=30></textarea></TD>
<TD width=374> 对此问卷的简单描述 </TD></TR>
<TR>
<TD width=179>问卷结束日期:</TD>
<TD width=422><INPUT onclick=setDay(this); readOnly value=2009-1-3
name="Survey_dateOver" id="Survey_dateOver" type="text"></TD>
<TD width=374><SPAN class=R>*</SPAN> 问卷结束日期</TD></TR></table>
public class insertQuestionForm extends ActionForm {
private String Survey_name;
private String Survey_author;
private String Survey_description;
private String Survey_dateOver;
private String Survey_ipRepeat;
private String Survey_isOpen;
private String Survey_isImg;
private String Survey_isPassword;
private String Survry_IPLimit;
private String username;
public void reset(ActionMapping mapping, HttpServletRequest request) {
//super.reset( mapping, request);
this.Survey_author=null;
this.Survey_dateOver=null;
this.Survey_description=null;
this.Survey_ipRepeat=null;
this.Survey_isImg=null;
this.Survey_isOpen=null;
this.Survey_isPassword=null;
this.Survey_name=null;
this.Survry_IPLimit=null;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
return super.validate( mapping, request);
/* ActionErrors errors=new ActionErrors();
//问卷名称
if(Survey_name==null||Survey_name.trim().length()<1)
errors.add("Survey_namenull",new ActionError("Survey.Survey_namenull"));
//问卷发起人
if(Survey_author==null||Survey_author.trim().length()<1)
errors.add("Survey_authornull",new ActionError("Survey.Survey_authornull"));
//问卷回收时间
if(Survey_dateOver==null||Survey_dateOver.trim().length()<1)
errors.add("Survey_dateovernull",new ActionError("Survey.Survey_dateovernull"));
return errors;*/
}
public void setSurvey_name(String survey_name) {
this.Survey_name = survey_name;
}
public String getSurvey_name() {
return Survey_name;
}
public void setSurvey_author(String survey_author) {
this.Survey_author = survey_author;
}
public String getSurvey_author() {
return Survey_author;
}
public void setSurvey_description(String survey_description) {
this.Survey_description = survey_description;
}
public String getSurvey_description() {
return Survey_description;
}
public void setSurvey_dateOver(String survey_dateOver) {
this.Survey_dateOver = survey_dateOver;
}
public String getSurvey_dateOver() {
return Survey_dateOver;
}
public void setSurvey_ipRepeat(String survey_ipRepeat) {
this.Survey_ipRepeat = survey_ipRepeat;
}
public String getSurvey_ipRepeat() {
return Survey_ipRepeat;
}
public void setSurvey_isOpen(String survey_isOpen) {
this.Survey_isOpen = survey_isOpen;
}
public String getSurvey_isOpen() {
return Survey_isOpen;
}
public void setSurvey_isImg(String survey_isImg) {
this.Survey_isImg = survey_isImg;
}
public String getSurvey_isImg() {
return Survey_isImg;
}
public void setSurvey_isPassword(String survey_isPassword) {
this.Survey_isPassword = survey_isPassword;
}
public String getSurvey_isPassword() {
return Survey_isPassword;
}
public void setSurvry_IPLimit(String survry_IPLimit) {
this.Survry_IPLimit = survry_IPLimit;
}
public String getSurvry_IPLimit() {
return Survry_IPLimit;
}
public void setUsername(String username) {
this.username = username;
}
public String getUsername() {
return username;
}
}
<?xml version="1.0" encoding="GBK" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="regForm" type="form.regForm"/>
<form-bean name="insertQuestionForm" type="form.insertQuestionForm"/>
</form-beans>
<action-mappings>
<action path="/regAction" name="regForm"
type="action.regAction" scope="request"
validate="true" input="/reg/reg.jsp">
<forward name="success" path="/reg/reg.jsp"/>
<forward name="fail" path="/reg/reg.jsp"/>
</action>
<action path="/InsertQuestionAction" name="insertQuestionForm"
type="action.InsertQuestionAction" scope="request"
validate="false" input="/manager/block/SurveyAdd.jsp">
<forward name="insertQuestion" path="/manager/block/SurveyAdd.jsp"/>
<forward name="failinsertQuestion" path="/manager/block/SurveyAdd.jsp"/>
</action>
</action-mappings>
<message-resources parameter="questionnaire.reg"/>
</struts-config>