昨日使用full calendar套件時,在每日均加上checkbox做假日檔的設定,

並加上週六日直接預設為假日,在正常操作下均無誤,

但因為設定的假日檔有多種類型,當切換不同類型時設定週六日為假日竟然失效,

試了2、3小時找到原因,因為我在切換checked時是用

$(_cell).attr(‘checked’, true);

調為

$(_cell).prop(‘checked’, true);

就一切正常了!

jquery checkbox checked切換

請參考以下範例

1.enum宣告

package com.test.constants;
public enum PlatForm {
    PRIVADM {
          public String toString() {
              return "PRIVADM";
          }
      },
      WARRANTADM {
          public String toString() {
              return "WARRANTADM";
          }
      }
}

2.jsp struts2 tag使用

<struts:set name="MYPLATFORMID" value="@com.test.constants.PlatForm@PRIVADM"/>

Java enum如何於struts2 tag使用