Hello everybody,

I have a datable which contain multiple lines gotten from database, in the header of the datable i have a checkbox

<ice:dataTable rows="10" id="inventoryList" 
value="#{Bordereau.listFiche}" var="item" 
binding="#{ModifierDM.inventoryList}">

.....I have many columns and the last one contains

<ice:column> 
<f:facet name="header"> 
<ice:selectBooleanCheckbox id="selectAll" binding="#{ModifierDM.selectAllCheckbox}" valueChangeListener="#{ModifierDM.selectAll}" partialSubmit="true"/> 
</f:facet> 
<ice:selectBooleanCheckbox id="select" binding="#{ModifierDM.selectCheckbox}" /> 
</ice:column>

</ice:dataTable>

The purpose is to be able to check all checkboxes if i check the header's one.

But nothing happen  !

Here is my class

package com.atos.him.beanManager;

import java.util.List;

import javax.faces.component.UISelectBoolean
import javax.faces.event.PhaseId
import javax.faces.event.ValueChangeEvent;

import org.springframework.context.ApplicationContext; 
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.atos.him.entity.DossierMedical; 
import com.atos.him.entity.Fiche; 
import com.atos.him.services.DossierMedicalService; 
import com.atos.him.services.FicheService; 
import com.icesoft.faces.component.ext.HtmlDataTable; 
import com.icesoft.faces.component.ext.HtmlSelectBooleanCheckbox;

public class ModifierDMBean {

private DossierMedicalService dossierMedicalService; 
private FicheService ficheService; 
private HtmlDataTable inventoryList; 
private Fiche ficheSelectione; 
private UISelectBoolean selectAllCheckbox; 
private UISelectBoolean selectCheckbox;

private boolean selected;

public boolean isSelected() { 
return selected; 
}

public void setSelected(boolean selected) { 
this.selected = selected; 
}

public UISelectBoolean getSelectAllCheckbox() { 
return selectAllCheckbox; 
}

public void setSelectAllCheckbox(UISelectBoolean selectAllCheckbox) { 
this.selectAllCheckbox = selectAllCheckbox; 
}

public UISelectBoolean getSelectCheckbox() { 
return selectCheckbox; 
}

public void setSelectCheckbox(UISelectBoolean selectCheckbox) { 
this.selectCheckbox = selectCheckbox; 
}

public Fiche getFicheSelectione() { 
return ficheSelectione; 
}

public void setFicheSelectione(Fiche ficheSelectione) { 
this.ficheSelectione = ficheSelectione; 
}

@SuppressWarnings("unused") 
private List<Fiche> listFiche;

@SuppressWarnings("unused") 
private List<DossierMedical> listDossier;

public ModifierDMBean() { 
ApplicationContext appc = new ClassPathXmlApplicationContext( 
"applicationContext.xml"); 
setDossierMedicalService((DossierMedicalService) appc 
.getBean("dossierMedicalService")); 
setFicheService((FicheService) appc.getBean("ficheService")); 
}

public DossierMedicalService getDossierMedicalService() { 
return dossierMedicalService; 
}

public void setDossierMedicalService( 
DossierMedicalService dossierMedicalService) { 
this.dossierMedicalService = dossierMedicalService; 
}

public FicheService getFicheService() { 
return ficheService; 
}

public void setFicheService(FicheService ficheService) { 
this.ficheService = ficheService; 
}

public List<Fiche> getListFiche() { 
return ficheService.getListfiche(); 
}

public void setListFiche(List<Fiche> listFiche) { 
this.listFiche = listFiche; 
}

public HtmlDataTable getInventoryList() { 
return inventoryList; 
}

public void setInventoryList(HtmlDataTable inventoryList) { 
this.inventoryList = inventoryList; 
}

public List<DossierMedical> getListDossier() { 
return dossierMedicalService.getListDossierMedical(); 
}

public void setListDossier(List<DossierMedical> listDossier) { 
this.listDossier = listDossier; 
}

public String actTable() { 
return "success"; 
}

public String updateDossier() { 
ficheService.update(ficheSelectione); 
return "success";

}

public void deleteDossier() { 
ficheService.delete(ficheSelectione);

}

public void selectAll(ValueChangeEvent e) {

if (!e.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) { 
e.setPhaseId(PhaseId.INVOKE_APPLICATION); 
e.queue(); 
return; 
}

selectCheckbox.setValue(true);

selected = true;


}

am waiting your answers 

https://coderanch.com/t/538212/java/checkAll-Multiple-checkbox-datatable-IceFaces

ICE checkbox 用法的更多相关文章

  1. JQuery select,checkbox用法 文本框只能输入数字

    记录一下,方便查找 a.文本框只能输入数字 onkeyup='this.value=this.value.replace(/\D/gi,"")' eg: <input typ ...

  2. jquery checkbox用法汇总

    来源:http://www.jb51.net/article/75717.htm 1.全选 ? 1 2 3 $("#btn1").click(function(){ $(" ...

  3. checkbox在vue中的用法小结

    关于checkbox多选框是再常见不过的了,几乎很多地方都会用到,这两天在使用vue框架时需要用到checkbox多选功能,实在着实让我头疼,vue和原生checkbox用法不太一样,之前对于vue插 ...

  4. checkbox在vue中的用法总结

    前言 关于checkbox多选框是再常见不过的了,几乎很多地方都会用到,这两天在使用vue框架时需要用到checkbox多选功能,实在着实让我头疼,vue和原生checkbox用法不太一样, 之前对于 ...

  5. vue项目使用element ui的Checkbox

    最近使用到element ui的下拉多选框Checkbox Checkbox用法可参考与于 http://element.eleme.io/#/zh-CN/component/checkbox Che ...

  6. 流行的JavaScript库 ——jQuery

    1.为了简化 JavaScript 的开发, 一些 JavsScript 库诞生了. JavaScript 库封装了很多预定义的对象和实用函数.能帮助使用者建立有高难度交互的 Web2.0 特性的富客 ...

  7. [转载]JavaEE学习篇之——JQuery技术详解

    原文链接:http://blog.csdn.net/jiangwei0910410003/article/details/32102187 1.简介2.工具3.jQuery对象 1.DOM对象转化成j ...

  8. Python 中的 TK编程

    可爱的 Python:Python 中的 TK编程 http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-12/ python che ...

  9. EXTJS 常用控件的使用

    重要按钮配置项 handler: renderTo: 取得控件及其值 var memo = form.findById('memo');//取得输入控件 alert(memo.getValue()); ...

随机推荐

  1. C指针(3)——指向指针的指针(程序讲解)

    int **q可以分成两部分,即int* 和 (*q),后面的 “q” 中的* 表示q是一个指针变量,前面的int*表示指针变量q只能存放int*型变量的地址.int** q表示为指针变量q只能存放i ...

  2. 全国Uber优步司机奖励政策 (1月25日-1月31日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  3. 8、Java并发编程:同步容器

    Java并发编程:同步容器 为了方便编写出线程安全的程序,Java里面提供了一些线程安全类和并发工具,比如:同步容器.并发容器.阻塞队列.Synchronizer(比如CountDownLatch). ...

  4. 只需两步,rails支持CSV格式导出

    一.Controller最上方添加 require 'csv' 二.方法里面添加 format.csv do csv_string = CSV.generate do |csv| csv <&l ...

  5. hdu1789 Doing Homework again(贪心+排序)

    Doing Homework again Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Oth ...

  6. 6.2 element和elements

    为什么这个要单独拿出来说,因为我在很多群里面看见很多人不能区分这个! 因为之前的包有点问题,另外后续还会更换app,因为部分app可能没有符合的案例场景,我需要找到那个场景给大家做个实例..便于大家跟 ...

  7. JAVA基础学习之路(十)this关键字

    class Book { String name; int price; int num;//构造方法之间的互相调用解决了代码的重复问题,但是一定要留出口 public Book() { ,); } ...

  8. Java学习 · 初识 面向对象基础一

    面向对象基础 1.1面向过程与面向对象的区别 面向过程和面向对象二者都是思考问题的方式,再简单的事物时,可以线性思考时使用面向过程,但当事物较为复杂时,只能使用面向对象设计.但二者并不是对立的,在解决 ...

  9. 大理石在哪儿 (Where is the Marble?,UVa 10474)

    题目描述:算法竞赛入门经典例题5-1 #include <iostream> #include <algorithm> using namespace std; ; int m ...

  10. 小程序解析html和富文本编辑内容【亲测有效】

    首先去 https://github.com/icindy/wxParse 下载wxParse,只拷贝wxParse文件夹即可. 1.引入wxss @import "../../util/w ...