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. go基础语法-函数

    1.基础定义 golang的函数很'纯粹',只有可变参数列表的概念,没有默认参数.可选参数.函数重载.操作符重载这些难以把控的概念 语法:'func'声明,而后函数名在前,中间的括号内定义参数,返回值 ...

  2. 解决ssh连接中断程序终止的问题——tmux

    参考:http://www.cnblogs.com/kevingrace/p/6496899.html ssh连接有时候会异常中断,重连后原本运行的程序会中断,要解决这个问题,我们可以使用Linux终 ...

  3. 杭州优步uber司机第二组奖励政策

    -8月9日更新- 优步杭州第二组: 定义为激活时间在2015/6/8之后2015/8/3之前的车主(以优步后台数据显示为准) 滴滴快车单单2.5倍,注册地址:http://www.udache.com ...

  4. Java String 字符串类细节探秘

    一. 字符串基本知识要点 字符串类型String是Java中最常用的引用类型.我们在使用Java字符串的时候,通常会采用两种初始化的方式:1. String str = "Hello Wor ...

  5. iOS SSL Pinning 保护你的 API

    随着互联网的发展,网站全面 https 化已经越来越被重视,做为 App 开发人员,从一开始就让 API 都走 SSL 也是十分必要的.但是光这样就足够了吗? SSL 可以保护线上 API 数据不被篡 ...

  6. mongdb数据迁移导出与导入

    导出: mongoexport --host localhost --port --username un1 --password pwd1 --db db1 --collection col1 -- ...

  7. 在ubuntu trusty下安装python的rasterio库

    就这些吧.. apt-get update -y apt-get install -y software-properties-common add-apt-repository ppa:ubuntu ...

  8. hdu5698瞬间移动(杨辉三角+快速幂+逆元)

    瞬间移动 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submis ...

  9. python——一些常用的方法类

    测试的时候经常需要使用一些方法都整理放在一起,方便调用 首先一些基本的配置引入 localReadConfig = readConfig.ReadConfig() proDir = readConfi ...

  10. VMware实现控制台功能(VMware Remote Console)

    说明: 刚开始一脸懵逼,google了一些资料,发现基本没有能快速落地的,自己做完后梳理了一下发上来供大家参考. 如果帮到你了,请点赞评论关注,以资鼓励,多谢~ 实现VMware控制台功能主要有两种方 ...