ICE checkbox 用法
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 用法的更多相关文章
- JQuery select,checkbox用法 文本框只能输入数字
记录一下,方便查找 a.文本框只能输入数字 onkeyup='this.value=this.value.replace(/\D/gi,"")' eg: <input typ ...
- jquery checkbox用法汇总
来源:http://www.jb51.net/article/75717.htm 1.全选 ? 1 2 3 $("#btn1").click(function(){ $(" ...
- checkbox在vue中的用法小结
关于checkbox多选框是再常见不过的了,几乎很多地方都会用到,这两天在使用vue框架时需要用到checkbox多选功能,实在着实让我头疼,vue和原生checkbox用法不太一样,之前对于vue插 ...
- checkbox在vue中的用法总结
前言 关于checkbox多选框是再常见不过的了,几乎很多地方都会用到,这两天在使用vue框架时需要用到checkbox多选功能,实在着实让我头疼,vue和原生checkbox用法不太一样, 之前对于 ...
- vue项目使用element ui的Checkbox
最近使用到element ui的下拉多选框Checkbox Checkbox用法可参考与于 http://element.eleme.io/#/zh-CN/component/checkbox Che ...
- 流行的JavaScript库 ——jQuery
1.为了简化 JavaScript 的开发, 一些 JavsScript 库诞生了. JavaScript 库封装了很多预定义的对象和实用函数.能帮助使用者建立有高难度交互的 Web2.0 特性的富客 ...
- [转载]JavaEE学习篇之——JQuery技术详解
原文链接:http://blog.csdn.net/jiangwei0910410003/article/details/32102187 1.简介2.工具3.jQuery对象 1.DOM对象转化成j ...
- Python 中的 TK编程
可爱的 Python:Python 中的 TK编程 http://www.ibm.com/developerworks/cn/linux/sdk/python/charm-12/ python che ...
- EXTJS 常用控件的使用
重要按钮配置项 handler: renderTo: 取得控件及其值 var memo = form.findById('memo');//取得输入控件 alert(memo.getValue()); ...
随机推荐
- ajax重定向登录页
/** * ajax默认设置 * 包括默认提交方式为POST, * 判断后台是否是重定向 */ $.ajaxSetup( { //设置ajax请求结束后的执行动作 complete : functio ...
- verilog中参数传递与参数定义中#的作用(二)
一.module内部有效的定义 用parameter来定义一个标志符代表一个常量,称作符号常量,他可以提高程序的可读性和可维护性.parameter是参数型数据的关键字,在每一个赋值语句的右边都必须是 ...
- 【blockly教程】第三章Blockly顺序程序设计
3.1 什么是Blockly语言 2012年6月,Google发布了完全可视化的编程语言Google Blockly,整个界面清晰明了, 你可以如同在玩拼图一样用一块块图形对象构建出应用程序.每个图 ...
- MongoDB入门---文档查询操作之条件查询&and查询&or查询
经过前几天的学习之路,今天终于到了重头戏了.那就是文档查询操作.话不多说哈,直接看下语法: db.collection.find(query, projection) query :可选,使用查询操作 ...
- DATA 转 16 进制
// 转 16进制 编码 NSData *data = [NSData dataWithBytes:(const void *)dataOut length:(NSUInteger)dataOutMo ...
- SDWebImage的原理 和 实现机制 --- tableView 滑动卡的问题
一.原理 1)当我门需要获取网络图片的时候,我们首先需要的便是URl没有URl什么都没有,获得URL后我们SDWebImage实现的并不是直接去请求网路,而是检查图片缓存中有没有和URl相关的图片,如 ...
- spring源码-BeanPostProcessor-3.3
一.BeanPostProcessor这个是spring容器的拓展之一,是用于获取bean的时候处理对应的对象: 二.常用场景,在获取bean的时候,重新初始化bean的属性等. 三.实现方式(加入容 ...
- 「LeetCode」0003-Add Two Numbers(Typescript)
分析 代码 /** * @param {ListNode} l1 * @param {ListNode} l2 * @return {ListNode} */ var addTwoNumbers=fu ...
- 阿里云服务器Linux系统安装配置ElasticSearch搜索引擎
近几篇ElasticSearch系列: 1.阿里云服务器Linux系统安装配置ElasticSearch搜索引擎 2.Linux系统中ElasticSearch搜索引擎安装配置Head插件 3.Ela ...
- python3基础盲点
数值类型 Python支持四种不同的数值类型,包括int(整数)long(长整数)float(浮点数)complex (复数) python3对整数的大小不做限制 算数运算符 优先级: 逻辑运算符 优 ...