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. 解决WinScp连接被拒绝的问题

    尝试以下方法: 1) 开启|关闭防火墙(这里需要关闭) sudo ufw enable|disable 2) 开启远程服务 在终端界面输入:service sshd start.结果显示:ssh:un ...

  2. 爬取 StackOverFlow 上有关于 Python 的问题

    给定起始页面以及爬取页数,要求得到每一个问题的标题.票数.回答数.查看数 stackflow <- function(page){ url <- "http://stackove ...

  3. 北京Uber优步司机奖励政策(1月28日)

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

  4. PyYAML学习第一篇

    1. YAML是一种交互式和可读性强的脚本语言.脚本语言都是解释性语言. PyYAML是YAML语言的编辑器和解释器.在python语言里面有PyYAML的安装包. 相关学习文档:http://pyy ...

  5. Docker - vim安装

    在使用docker容器时,有时候里边没有安装vim,敲vim命令时提示说:vim: command not found,这个时候就需要安装vim. apt-get install vim 若提示: R ...

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

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

  7. Spring ApplicationContext 简介

    ApplicationContext是对BeanFactory的扩展,实现BeanFactory的所有功能,并添加了事件传播,国际化,资源文件处理等.   configure locations:(C ...

  8. leetcode-二进制手表

    二进制手表顶部有 4 个 LED 代表小时(0-11),底部的 6 个 LED 代表分钟(0-59). 每个 LED 代表一个 0 或 1,最低位在右侧. 例如,上面的二进制手表读取 “3:25”. ...

  9. 【转】网游服务器中的GUID(唯一标识码)实现-基于snowflake算法

    本文中的算法采用twitter的snowflake算法,具体请搜索介绍,原来是用Scala写的,因我项目需要,改写成C++语言,主要用于高效的生成唯一的ID, 核心算法就是毫秒级时间(41位)+机器I ...

  10. python内建模块Collections

    # -*- coding:utf-8 -*- # OrderedDict可以实现一个FIFO(先进先出)的dict, # 当容量超出限制时,先删除最早添加的Key: from collections ...