小编Par*_*rag的帖子

ioc和依赖注入之间的区别

ioc和依赖注入之间的区别.解释春天的依赖注入.什么是差异b/w JSF依赖注入和spring依赖注入..

dependency-injection terminology

2
推荐指数
1
解决办法
5866
查看次数

spring 依赖注入会创建单例对象吗?

spring如何在内部管理这些对象?

什么时候创建和销毁单例对象?

java spring dependency-injection

2
推荐指数
1
解决办法
6417
查看次数

selectCheckboxMenu无法获取已选中复选框的计数

Primefaces 5.0 selectCheckboxMenu组件问题,无法在jQuery中获取复选框的id以获取已选中复选框的计数.

我想用selectCheckboxMenu组件中选中的复选框的计数更新标签文本.我尝试了两种方式

  1. 阿贾克斯
  2. 获取复选框ID的jQuery.

下面是我在.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.

jquery primefaces

2
推荐指数
1
解决办法
1730
查看次数