页面代码
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">
canSort="foo" width="100em" height="43.5em"
value="#{commonSearchBean.dataList}">
rendered="#{queryFieldSelectionBean['materialCode']}" />
rendered="#{queryFieldSelectionBean['manufacturerCode']}" />
field="dataMaintain" />
rendered="#{queryFieldSelectionBean['manufacturerName']}" />
rendered="#{queryFieldSelectionBean['qualityStatusLevel']}" />
rendered="#{queryFieldSelectionBean['qualityStatusLevelDesc']}" />
value="#{msg['rohsAuthentication']}" />
rendered="#{queryFieldSelectionBean['erpStatus']}" />
rendered="#{queryFieldSelectionBean['acknowledgmentAuthor']}" />
rendered="#{queryFieldSelectionBean['acknowledgmentVersion']}" />
rendered="#{queryFieldSelectionBean['firstUsedOccasion']}" />
rendered="#{queryFieldSelectionBean['softwareVersion']}" />
rendered="#{queryFieldSelectionBean['maintainReject']}" />
rendered="#{queryFieldSelectionBean['securityAuthentication']}" />
rendered="#{queryFieldSelectionBean['otherAuthentication']}" />
rendered="#{queryFieldSelectionBean['jointingDemand']}" />
##### 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 " + manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "";
}
searchModel_componentAntiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var materialCode = dataItem.materialCode;
return " + materialCode
+ "','component');return false;\" href=\"javascript:;\">"
+ value
+ "";
}
searchModel_dataMaintain = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var manufacturerId = dataItem.manufacturerId;
return " + manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "";
}
searchModel_antiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var id = dataItem.id;
var materialCode = dataItem.materialCode;
var component = " + materialCode
+ "','component');return false;\" href=\"javascript:;\">"
+ "组件反查";
var deviceType = " + materialCode
+ "','deviceType');return false;\" href=\"javascript:;\">"
+ "机型反查";
return component + ' | '
+ deviceType;
}
searchModel_deviceTypeAntiSearch = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var materialCode = dataItem.materialCode;
return " + materialCode
+ "','deviceType');return false;\" href=\"javascript:;\">"
+ value
+ "";
}
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 " + manufacturerId + "');return false;\" href=\"javascript:;\">"
+ value + "";
}
searchModel_edeNum = function(value, rowIndex) {
var dataItem = dijit.byId('searchModel').getItem(rowIndex);
var edeNum = dataItem.edeNum;
if(edeNum=='null'||edeNum==undefined){
edeNum='';
}
return " + edeNum+ "');return false;\" href=\"javascript:;\">"
+ edeNum + "";
}
######
back bean 里的render方法,在render前这个方法会被执行
public void searchModelRender() {
dataList = serviceLocator.getSearchedModelService().getSearchModel(
commonSearchDto.getWhereSql(), pagingConfig);
}