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. 基于FDC2214的手势识别

    基于FDC2214的手势识别 1.本次题目来源于2018年全国电子设计大赛D题,要求实现对石头.剪刀.布以及数字12345的识别:同时在上述基础上实现对手势的学习. 2.硬件实现: 硬件主要采用STM ...

  2. PHP.52-TP框架商城应用实例-前台4-商品详情页-面包屑导航、AJAX浏览历史

    面包屑导航  思路:根据商品的主分类向上取出所有上级分类即可 1.在分类模型中增加取出所有上级分类的方法 /********** [面包屑导航]取出一个分类所有上级分类 **********/ pub ...

  3. treetable--.net webform中树形table表管理的应用

    好记性不如烂笔头. treetable 官网:http://ludo.cubicphuse.nl/jquery-treetable/#api 今天要做一个关于table的树节点展示,还有编辑,删除功能 ...

  4. java 编码二进制写法、十六进制用源代码表示

    二进制: int a = 0b10; a其实=2 八进制: int a = 01; a其实=8 十六进制: int a = 0x1; a其实=16

  5. C 计算员工工资

    #include <stdio.h> int main(int argc, char **argv) { //定义四个变量 g每小时固定的工资 40 固定工作时间 pay工资 hours员 ...

  6. python 打包

    一.下载 pip install Pyinstaller 二.使用Pyinstaller 1.使用下载安装的方式安装的Pyinstaller打包方式 将需要打包的文件放在解压得到的Pyinstalle ...

  7. ssh连接失败, 记下来原因和解决方案

    mac下使用secureCRT发现连接不了虚拟机上的linux 运行 ps -e | grep ssh,查看是否有sshd进程 如果没有,说明server没启动,通过 /etc/init.d/sshd ...

  8. Linux下安装paramiko

    paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接. 由于使用的是python这样的能够跨平台运行的语言,所以所有python支持的平台, ...

  9. ZOJ 3686 A Simple Tree Problem(线段树)

    Description Given a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the ...

  10. node包管理相关

    切换npm数据源 镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在): 1.通过config命令 npm config set registry https ...