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. 理解golang中的channel

    channel是goroutine之间的通信机制.可以类比线程间的通信,线程间的通信有多种方式,比如线程上下文.共享内存.IPC通信.socket实现不同机器间的通信. channel用起来很简单,绑 ...

  2. Go语言的接口与反射

    美女图片没啥用,就是为了好看 本文还在完善中... go总体而言是一门比较好入门的语言,许多特性都很精简易懂,但是接口与反射除外.他们真的让人头疼,不知道是自身资质问题还是怎么着,总是觉得很多书上写的 ...

  3. BAPIを使用のODATA作成

    入力: AIRLINE テーブル: FLIGHT_LIST Step 1: TCode: SEGW ⇒新規作成ボタンを押す Step 2: オブジェクト名など入力 Step 3: オブジェクト作成完了 ...

  4. JavaWeb——库存管理系统(1)jsp部分---18.12.13

    add.jsp <%@ page language="java" contentType="text/html; charset=UTF-8"    pa ...

  5. Hihocoder #1515 : 分数调查

    #1515 : 分数调查 http://hihocoder.com/problemset/problem/1515 分析 带权并查集. 如果把每个人抽象成一个点,之间的关系抽象成边.那么如果询问的两个 ...

  6. Java:break和continue关键字的作用

    二者的作用和区别 1. break:直接跳出当前循环体(while.for.do while)或程序块(switch).其中switch case执行时,一定会先进行匹配,匹配成功返回当前case的值 ...

  7. Rails导出CSV

    版本  ruby 1.9  rails 3.2 完整代码 #引入CSV标准类库 require 'csv' class PeopleController < ApplicationControl ...

  8. onenet基础通信套件加B300移植

    1. 遇到的第一个问题,说是少了文件,但是明明有这个文件的啊? scons: warning: Ignoring missing SConscript 'build_scons\arm\Hi2115\ ...

  9. 【完美解决】Spark-SQL、Hive多 Metastore、多后端、多库

    [完美解决]Spark-SQL.Hive多 Metastore.多后端.多库 [完美解决]Spark-SQL.Hive多 Metastore.多后端.多库 SparkSQL 支持同时连接多种 Meta ...

  10. Visual Studio 智能提示功能消失解决办法

    步骤如下: 开始菜单 -->所有程序-->Visual Studio 2012文件夹 --> Visual Studio Tools --> Developer Command ...