ioc和依赖注入之间的区别.解释春天的依赖注入.什么是差异b/w JSF依赖注入和spring依赖注入..
spring如何在内部管理这些对象?
什么时候创建和销毁单例对象?
Primefaces 5.0 selectCheckboxMenu组件问题,无法在jQuery中获取复选框的id以获取已选中复选框的计数.
我想用selectCheckboxMenu组件中选中的复选框的计数更新标签文本.我尝试了两种方式
下面是我在.xhtml文件中的代码.在ajax调用之后,我发现了一个类似于this.closer的错误在primefaces.js第22行中未定义.
<p:selectCheckboxMenu id="pioDocType"
value="#{pioReportActionBean.selectedOutPutData}"
label="#{pioReportActionBean.lbl_docType}" filter="true"
filterMatchMode="startsWith" panelStyle="width:250px" styleClass="rep_checkbox" widgetVar="myCheckbox" >
<f:selectItems value="#{pioReportActionBean.inPutData}"
var="outPutData" itemLabel="#{outPutData.displayName}"
itemValue="#{outPutData.displayId}" />
<p:ajax event="change" listener="#{pioReportActionBean.populateLabelDocType}"
update="pioDocType" />
</p:selectCheckboxMenu>
Run Code Online (Sandbox Code Playgroud)
jQuery代码..
var count = $("#pioDocType input:checked").length;
alert(count);
count = $("#myCheckbox:checked").length;
alert(count);
count = $("input.rep_checkbox .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox-box:checked").length;
alert(count);
Run Code Online (Sandbox Code Playgroud)
我使用的是spring 3,Primefaces 5.0,JDk 7.