1. jsp中,<script></script>之间增加下面代码:
<%
StringBuffer stringBuffer = (StringBuffer)request.getSession().getAttribute("stringDateBuffer");
if(stringBuffer!=null&&stringBuffer.length() > 0){
String[] strings = stringBuffer.toString().split(",");
String newDate = null;
for(int i=0; i<strings.length; i++){
newDate = strings[i];
%>
new CalendarCtrl("<%= newDate%>",null,null,false);
<%
}
}
%>
2. jsp中有stringBuffer中提及的所有控件<html:text
3. action中,把这些控件名称保存到stringBuffer中,并保存到session中。