// 添加
function addItem() {
var s = itemTemplate.replace(/#itemIndex#/g, itemIndex);
$("#divFormFields").append(s);
itemIndex ++;
counter ++;
}
// 刪除
function delItem(index) {
$("#item_" + index).remove();
counter = counter - 1;
}
public class FlowFormConfigActionForm extends ActionForm {
private int id;
private String name;
private String processName;
private String formFillTemplatePath;
private String formShowTemplatePath;
private Map
/** 表單復雜屬性 */
public FlowformFieldConfig getFlowFormFieldCfgElement(String key){
if(!flowFormFieldCfgMap.containsKey(key)){
flowFormFieldCfgMap.put(key, new FlowformFieldConfig());
}
return flowFormFieldCfgMap.get(key);
}
*U*****
public class FlowformFieldConfig {
private int id;
private String name;
private Class> valueType;
主要要原理是:struts1.*在jsp顯示的時候,會先從formbean里通過get***方法拿出屬性的值!!
flowFormFieldCfgElement(#itemIndex#).name 這是核心,如果flowFormFieldCfgElement(#itemIndex#)為空的話,就會出錯,所以在/** 表單復雜屬性 */
public FlowformFieldConfig getFlowFormFieldCfgElement(String key){
if(!flowFormFieldCfgMap.containsKey(key)){
flowFormFieldCfgMap.put(key, new FlowformFieldConfig());
}
return flowFormFieldCfgMap.get(key);
}
做了判斷!!
如果還有不懂的人可以給我留言!!
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com