<h:selectBooleanCheckbox id="includeTax" value="#{price.includeTax}" oncomplete="javascript:selectOneElement(this);">
<a:support event="onclick" data="#{price}" actionListener="#{standardUnitPriceBean.validationTax}"/>
</h:selectBooleanCheckbox>
以上代码放在xhtml不可用,是因为selectBooleanCheckbox标签中使用了调用js方法的属性oncomplete(相关还有onclick、onchange.....),使用这个属性会影响support执行,所以按照以下代码书写,可以解决support不执行的问题。
<h:selectBooleanCheckbox id="includeTax" value="#{price.includeTax}" >
<a:support event="onclick" data="#{price}" oncomplete="javascript:selectOneElement(this);" actionListener="#{standardUnitPriceBean.validationTax}"/>
</h:selectBooleanCheckbox>
//格式化日期
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");// 小写hh是12小时制,大写HH是24小时制。
//格式化数据
待续。。。