icefaces定制的dojo data grid
页面代码
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:dojo="http://www.icefaces.org/icefaces-ext/dojo/component"
xmlns:yui="http://www.icefaces.org/icefaces-ext/yui/component">
<body>
<ui:composition template="/inc/template.xhtml">
<ui:param name="path"
value="#{facesContext.externalContext.requestContextPath}" />
<ui:define name="content">
<ice:form id="frmCommonSearch">
<div style="display: none"><ice:inputHidden id="manufacturerId"
value="#{commonSearchBean.manufacturerId}" /> <ice:commandLink
id="antiSearchBom"
actionListener="#{commonSearchBean.antiSearchBom}" /> <ice:commandButton
action="#{commonSearchBean.editSetup}" id="editSetup" /></div>
<ice:commandButton value="#{msg['back']}" action="commonSearchInput" />
<ice:commandButton value="#{msg['download']}" partialSubmit="true"
actionListener="#{commonSearchBean.download}" />
<ice:commandButton value="#{msg['saveView']}" action="#{commonSearchBean.saveView}"/>
<dojo:dataGrid pagingConfig="#{commonSearchBean.pagingConfig}"
id="searchModel" selectable="true" identifier="manufacturerId"
canSort="foo" width="100em" height="43.5em"
value="#{commonSearchBean.dataList}">
<dojo:gridView noscroll="true">
<dojo:columnGroup>
<dojo:column field="materialCode" width="15" sortable="true"
value="#{msg['materialCode']}"
rendered="#{queryFieldSelectionBean['materialCode']}" />
<dojo:column field="manufacturerCode" sortable="true"
value="#{msg['manufacturerCode']}" width="12"
rendered="#{queryFieldSelectionBean['manufacturerCode']}" />
<dojo:column field="catName" formatter="true"
value="#{msg['catName']}" />
<dojo:column width="10" formatter="true"
rendered="#{roles['engineer'] or roles['researcher']}" value="#{msg['dataMaintain']}"
field="dataMaintain" />
<dojo:column width="20" formatter="true"
value="#{msg['antiSearch']}" field="antiSearch" />
</dojo:columnGroup>
</dojo:gridView>
<dojo:gridView noscroll="false">
<dojo:columnGroup>
<dojo:column field="manufacturerName" width="30"
value="#{msg['manufacturerName']}"
rendered="#{queryFieldSelectionBean['manufacturerName']}" />
<dojo:column field="qualityStatusLevel"
value="#{msg['qualityStatusLevel']}"
rendered="#{queryFieldSelectionBean['qualityStatusLevel']}" />
<dojo:column field="qualityStatusLevelDesc"
value="#{msg['qualityStatusLevelDesc']}"
rendered="#{queryFieldSelectionBean['qualityStatusLevelDesc']}" />
<!-- material -->
<dojo:column field="description" value="#{msg['description']}"
width="40" rendered="#{queryFieldSelectionBean['description']}" />
<dojo:column field="rohsAuthentication" formatter="true"
rendered="#{queryFieldSelectionBean['rohsAuthentication']}"
value="#{msg['rohsAuthentication']}" />
<dojo:column field="erpStatus" value="#{msg['erpStatus']}"
formatter="true"
rendered="#{queryFieldSelectionBean['erpStatus']}" />
<!-- manufacturer -->
<dojo:column field="annualStock" value="#{msg['annualStock']}"
rendered="#{queryFieldSelectionBean['annualStock']}" />
<dojo:column field="annualReject" value="#{msg['annualReject']}"
rendered="#{queryFieldSelectionBean['annualReject']}" />
<!-- spec -->
<dojo:column field="model" value="#{msg['model']}"
rendered="#{queryFieldSelectionBean['model']}" />
<dojo:column field="functionDesc" value="#{msg['functionDesc']}"
rendered="#{queryFieldSelectionBean['functionDesc']}" />
<dojo:column field="acknowledgmentAuthor"
value="#{msg['acknowledgmentAuthor']}"
rendered="#{queryFieldSelectionBean['acknowledgmentAuthor']}" />
<dojo:column field="acknowledgmentVersion"
value="#{msg['acknowledgmentVersion']}"
rendered="#{queryFieldSelectionBean['acknowledgmentVersion']}" />
<dojo:column field="edeNum" formatter="true" value="#{msg['edeNum']}"
rendered="#{queryFieldSelectionBean['edeNum']}" />
<dojo:column field="firstUsedOccasion"
value="#{msg['firstUsedOccasion']}"
rendered="#{queryFieldSelectionBean['firstUsedOccasion']}" />
<dojo:column field="customVersion" value="#{msg['customVersion']}"
rendered="#{queryFieldSelectionBean['customVersion']}" />
<dojo:column field="softwareVersion"
value="#{msg['softwareVersion']}"
rendered="#{queryFieldSelectionBean['softwareVersion']}" />
<dojo:column field="reliability" value="#{msg['reliability']}"
rendered="#{queryFieldSelectionBean['reliability']}" />
<dojo:column field="maintainReject"
value="#{msg['maintainReject']}"
rendered="#{queryFieldSelectionBean['maintainReject']}" />
<dojo:column field="securityAuthentication"
value="#{msg['securityAuthentication']}"
rendered="#{queryFieldSelectionBean['securityAuthentication']}" />
<dojo:column field="otherAuthentication"
value="#{msg['otherAuthentication']}"
rendered="#{queryFieldSelectionBean['otherAuthentication']}" />
<dojo:column field="jointingDemand"
value="#{msg['jointingDemand']}"
rendered="#{queryFieldSelectionBean['jointingDemand']}" />
<dojo:column field="coat" value="#{msg['coat']}"
rendered="#{queryFieldSelectionBean['coat']}" />
<dojo:column field="cleanDemand" value="#{msg['cleanDemand']}"
rendered="#{queryFieldSelectionBean['cleanDemand']}" />
<dojo:column field="msdLevel" value="#{msg['msdLevel']}"
rendered="#{queryFieldSelectionBean['msdLevel']}" />
<dojo:column field="esdLevel" value="#{msg['esdLevel']}"
rendered="#{queryFieldSelectionBean['lifeEndDay']}" />
<dojo:column field="lifeEndDay" value="#{msg['lifeEndDay']}"
rendered="#{queryFieldSelectionBean['lifeEndDay']}" />
<dojo:column field="stockCycle" value="#{msg['stockCycle']}"
rendered="#{queryFieldSelectionBean['stockCycle']}" />
<dojo:column field="perform" value="#{msg['perform']}"
rendered="#{queryFieldSelectionBean['perform']}" />
<dojo:column field="service" value="#{msg['service']}"
rendered="#{queryFieldSelectionBean['service']}" />
<dojo:column field="remark" value="#{msg['remark']}"
rendered="#{queryFieldSelectionBean['remark']}" />
<!-- <dojo:column field="created" value="#{msg['created']}" /> -->
</dojo:columnGroup>
</dojo:gridView>
</dojo:dataGrid>
</ice:form>
</ui:define>
</ui:composition>
</body>
</html>
##### js代码,reRender formatter="true"的列
// search model data grid
antiSearchBom = function(materialCode, flag) {
var param = '?materialCode=' + materialCode + '&flag=' + flag;
// $('frmCommonSearch:antiSearchBom').click();
Common.open('/ppl/viewBom' + param);
}
paramDetail = function(manufacturerId, catId) {
var param = '?manufacturerId=' + manufacturerId;
// alert(param);
// $('frmCommonSearch:antiSearchBom').click();
Common.open('/ppl/viewParam' + param);
}
searchModel_materialCode = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var manufacturerId = dataItem.manufacturerId;
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"editSetup('"
+ manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "</a>";
}
searchModel_componentAntiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var materialCode = dataItem.materialCode;
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"javascript:antiSearchBom('"
+ materialCode
+ "','component');return false;\" href=\"javascript:;\">"
+ value
+ "</a>";
}
searchModel_dataMaintain = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var manufacturerId = dataItem.manufacturerId;
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"editSetup('"
+ manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "</a>";
}
searchModel_antiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var id = dataItem.id;
var materialCode = dataItem.materialCode;
var component = "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"javascript:antiSearchBom('"
+ materialCode
+ "','component');return false;\" href=\"javascript:;\">"
+ "组件反查</a>";
var deviceType = "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"javascript:antiSearchBom('"
+ materialCode
+ "','deviceType');return false;\" href=\"javascript:;\">"
+ "机型反查</a>";
return component + ' | '
+ deviceType;
}
searchModel_deviceTypeAntiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var materialCode = dataItem.materialCode;
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"javascript:antiSearchBom('"
+ materialCode
+ "','deviceType');return false;\" href=\"javascript:;\">"
+ value
+ "</a>";
}
searchModel_rohsAuthentication = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
// var rohs = dataItem.rohsAuthentication;
if (value == '00' || value == 'R2') {
// 取消冻结
value = '是';
} else if (value == '') {
value = '';
} else {
// 冻结
value = '否';
}
return value;
}
searchModel_erpStatus = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
// var rohs = dataItem.rohsAuthentication;
if (value == '00' || value == 'R2') {
// 取消冻结
value = '可采购';
} else if (value == '') {
value = '';
} else {
// 冻结
value = '不可采购';
}
return value;
}
searchModel_catName = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var materialCode = dataItem.materialCode;
var manufacturerId = dataItem.manufacturerId;
// var catId = dataItem.catId;
// if (catId == '' || catId == 'null') {
// catId == 0;
// }
var catName = dataItem.catName;
// alert(manufacturerId + "--- " + catName);
if (value == undefined) {
value = '';
}
// var target = "/ppl/viewParam?manufacturerId=" + manufacturerId
// + "&catName=" + catName;
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"paramDetail('"
+ manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "</a>";
}
searchModel_edeNum = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var edeNum = dataItem.edeNum;
if(edeNum=='null'||edeNum==undefined){
edeNum='';
}
return "<a class=\"iceCmdLnk iceCmdLnkExt\" onclick=\"edeLink('"
+ edeNum+ "');return false;\" href=\"javascript:;\">"
+ edeNum + "</a>";
}
######
back bean 里的render方法,在render前这个方法会被执行
public void searchModelRender() {
dataList = serviceLocator.getSearchedModelService().getSearchModel(
commonSearchDto.getWhereSql(), pagingConfig);
}
分享到:
相关推荐
ICEfaces 是一个开源的 JavaServer Faces (JSF) 框架,专为构建富互联网应用程序(Rich Internet Applications,RIAs)而设计。它提供了一套全面的组件库,允许开发人员创建高度交互性和响应式的Web应用。ICEfaces ...
2. **实时(Live)组件**:ICEfaces 提供了实时组件,如Live Data Table,可以在数据变化时自动更新,无需用户手动刷新页面。 3. **事件处理**:ICEfaces 使用JSF事件模型,允许开发者自定义组件间的事件传递和处理...
ICEFaces入门学习主要涵盖的是ICEFaces这一JavaServer Faces (JSF)组件库的使用和理解。ICEFaces是一款用于构建富互联网应用程序(Rich Internet Applications, RIA)的框架,它为开发者提供了丰富的用户界面组件和...
ICEfaces 1.8是JavaServer Faces (JSF) 框架的一个杰出实现,专为构建下一代企业级Web应用程序而设计。它引入了Ajax Push技术,极大地提升了用户体验,允许实时的数据更新,使得Web应用更接近桌面应用的交互性。...
ICEFaces 2.0 是一个基于JavaServer Faces (JSF) 技术的 AJAX 框架,专门用于构建富互联网应用程序(Rich Internet Applications, RIA)。它在JSF的基础上扩展,提供了高度交互性和实时用户体验,使开发者能够轻松地...
ICEfaces 是一个开源的 JavaServer Faces (JSF) 框架,专为构建富互联网应用程序(Rich Internet Applications,RIAs)而设计。这个框架提供了一整套组件库,允许开发人员创建高度交互且响应迅速的 Web 应用程序,...
- **nbms**:这可能包含了NetBeans模块系统(NBMS)的文件,用于扩展和定制NetBeans IDE的功能。 - **META-INF**:这是Java标准的元数据目录,通常包含关于软件包的信息,如MANIFEST.MF文件,用于描述包的属性和依赖...
安装完ICEFaces Eclipse 插件后发现少了很多包,在建立icefaces工程的时候,往往需要到网上下载lib。所以本人在这里共享以下ICEFaces1.8的官方包。用意是省得大家在eclipse建立工程的时候专门去Icefaces官方网去下载...
**IceFaces标签API详解** IceFaces是一个开源的JavaServer Faces(JSF)组件库,它提供了丰富的用户界面组件和先进的富互联网应用(RIA)功能。这个API主要关注的是IceFaces的自定义组件,这些组件极大地扩展了标准...
- **主题化**: 允许开发者轻松地定制界面样式,以匹配特定的设计需求。 - **性能优化**: 通过优化网络通信等方式提高应用程序的响应速度。 - **事件处理**: 简化了事件处理逻辑,使得开发者能够更加专注于业务逻辑的...
在本示例中,"JavaEE登陆程序(JSF+ICEFaces)好东东"是一个采用JavaServer Faces (JSF) 和 ICEFaces 技术实现的登录界面。下面我们将详细探讨这两个技术以及它们在登录程序中的应用。 **JavaServer Faces (JSF)** ...
此外,它还支持JSF的自定义组件和第三方库,使得开发者可以根据需求进行扩展和定制。 总结来说,ICEfaces 2 for Eclipse是一个强大的开发工具,通过提供丰富的JSF组件、自动化AJAX功能以及与Eclipse IDE的紧密集成...
IceFaces安装auctionMonitor示例
ICEFaces 是一个强大的Java EE Web应用程序开发框架,专注于创建富互联网应用程序(Rich Internet Applications, RIA)。这个"autocomplete-tutorial.zip"压缩包提供了一个关于如何在ICEFaces框架中使用自动补全功能...
在IT行业中,Spring、IceFaces和Hibernate是三个非常重要的开源框架,它们分别专注于不同领域:Spring作为全面的企业级应用框架,负责IoC(Inversion of Control)和AOP(Aspect Oriented Programming);IceFaces是...
【ICEFaces+JSF】是关于使用ICEFaces框架与JavaServer Faces (JSF) 技术的集成。JSF是一种用于构建Web应用程序的MVC框架,它为开发者提供了丰富的组件库和事件处理机制。ICEFaces是JSF的一个扩展,特别强调了AJAX...
4. **组件丰富**:提供了一系列丰富的预定义组件,如表格、图表、日期选择器等,这些组件都具有高度可定制性。 5. **移动设备支持**:ICEfaces Mobile提供了一套针对移动设备优化的组件,使开发者可以轻松创建响应式...
在IT行业中,Hibernate和IceFaces是两个非常重要的技术框架,它们分别用于持久层管理和用户界面交互。本篇文章将深入探讨这两个技术以及它们如何协同工作。 首先,Hibernate是一个强大的Java对象关系映射(ORM)...
icefaces1_6_0.chm
**标题:“icefaces eclipse plugin”** “icefaces eclipse plugin”是一个专门为Java Server Faces (JSF) 框架中的IceFaces提供集成开发环境支持的Eclipse插件。它旨在简化和优化开发人员在Eclipse中使用IceFaces...