<ec:table>添加复选框
<ec:table
title="操作查询"
items="testVOList"
var="testVO"
action="${ctx}/ghl/test.do?method=test"
imagePath="${ctx}/ghl/common/components/extremetable/images/*.gif"
width="100%"
locale="zh_CN"
retrieveRowsCallback="limit"
filterRowsCallback="limit"
sortRowsCallback="limit"
view="com.ghl.core.web.xtable.CustomToolbarPageFooterView"
filterable="false"
autoIncludeParameters="false"
state="persist"
form="viewForm">
<ec:row>
[color=red]<!--此处以下为复选框代码-->[/color] <ec:column
alias="checkbox"
title=" "
filterable="false"
sortable="false"
cell="com.ghl.core.web.xtable.cell.SelectedCheckPresidentCell"
headerCell="com.ghl.core.web.xtable.cell.CheckBoxHeaderCell"
style="width:5px"
property="typeCode" />
[color=red]<!--此处以下为复选框代码-->[/color][color=brown][/color] <ec:column sortable="false" title="title" property="property" >
</ec:column>
<ec:column sortable="true" title="title" property="property">
</ec:column>
<ec:column sortable="true" title="title" property="property">
</ec:column>
<ec:column sortable="false" title="title" property="property">
</ec:column>
<ec:column sortable="false" title="title" property="property">
</ec:column>
<ec:column sortable="false" title="title" property="property">
</ec:column>
<ec:column sortable="false" title="title" property="property">
</ec:column>
<ec:column sortable="false" title="title" property="property">
</ec:column>
</ec:row>
</ec:table>
public String getHtmlDisplay(TableModel model, Column column) {
ColumnBuilder columnBuilder = new ColumnBuilder(column);
columnBuilder.tdStart();
String id = column.getValueAsString();
try {
Collection selectedPresidentsIds = (Collection) model.getContext().getSessionAttribute(
SelectedPresidentsConstants.SELECTED_PRESIDENTS);
if (selectedPresidentsIds != null && selectedPresidentsIds.contains(id)) {
columnBuilder.getHtmlBuilder().input("hidden").name("chkbx_" + id).value(
SelectedPresidentsConstants.SELECTED).xclose();
columnBuilder.getHtmlBuilder().input("checkbox").name("primaryID").value(id);
columnBuilder.getHtmlBuilder().onclick("setPresidentState(this)");
columnBuilder.getHtmlBuilder().checked();
columnBuilder.getHtmlBuilder().xclose();
} else {
columnBuilder.getHtmlBuilder().input("hidden").name("chkbx_" + id).value(
SelectedPresidentsConstants.UNSELECTED).xclose();
columnBuilder.getHtmlBuilder().input("checkbox").name("primaryID").value(id).id(id);
columnBuilder.getHtmlBuilder().onclick("setPresidentState(this)");
columnBuilder.getHtmlBuilder().xclose();
}
} catch (Exception e) {
}
columnBuilder.tdEnd();
return columnBuilder.toString();
}
if (!hasModChecked(document.forms[1].primaryID)) {
alert('请选择一个类别进行修改!');
return false;
}
这个是判断选中没有
分享到:
相关推荐
ec属性 ec:table ec:column
出现MySQL数据库-错误1166 Incorrect column name 字段名,这个是字段中有空格了,这个只要利用alert或phpmyadmin进入修改即可解决. 今天在用Navicat for MySQL给MySQL数据库修改表的字段时报如下的错误 SQL 查询: ...
Cause: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x8C\xB7' for column 'nickname' at row 1 解决方案 修改nickname的编码格式,没必要修改整个表。这种方式也不需要重启数据库,修改完即生效 ...
0.什么是Check约束?...CREATE TABLE table_name ( column1 datatype null/not null, column2 datatype null/not null, ... CONSTRAINT constraint_name CHECK (column_name condition) [DISABLE] ); 其中,D
最近在工作中遇到一个问题,需要在表格中实现数据可编辑状态,具体情况是需要在单元格里加入下拉框;并且每个下拉框的数组数据是不一样的,具体是根据当前行前面数据的id查询而来,前面的是数据是动态生成的,后面的...
这个时候插入的是中文,系统会报告错误:Incorrect string value: ‘\xB1\xB1\xBE\xA9’ for column ‘b’ at; 这个不能插入中文。如果该语句写在了一个文本文件中进行批处理操作,保存的编码是默认的话也会出现...
目录 序 1. 入门 1.1. 介绍 1.2. 快速开始 2. 配置 2.1. Java 2.2. 操作系统 ...5.1. Table webtable 5.2. ColumnFamily anchor 5.3. ColumnFamily contents 8.1. Operation To Permission Mapping
最近,业务方反馈有个别用户信息插入...CREATE TABLE `t1` ( `id` int(10) NOT NULL AUTO_INCREMENT, `real_name` varchar(255) CHARACTER SET utf8 DEFAULT '' COMMENT '姓名', `nick` varchar(100) COLLATE utf8mb
前面介绍过vSQLAlchemy中的 Engine 和 Connection,这两个对象用在row SQL (原生的sql语句)上操作,而 ORM(Object Relational ...from sqlalchemy import Table, MetaData, Column, Integer, String, from sqlalchemy
交换表的行 TableID.moveRow(2,1) 替换CSS document.all.csss.href = "a.css"; 并排显示 display:inline 隐藏焦点 hidefocus=true 根据宽度换行 style="word-break:break-all" 自动刷新 ;URL=...
–把LikeSql变量赋值,可以赋值成’%xxxxxxxxxxxx%’ declare @SelectSql nvarchar(128)–定义Sql语句,开始拼Sql set @SelectSql = ‘select * from Table where [Column] like @LikePar’;—使用@LikePar变量进行...