首页 > 技术文章 > OATable中column栏位数据居中的实现方法及代码

huanghongbo 2016-02-26 09:22 原文

// Table column中显示居中的实现
// QpriceResultTable1 为table的名称
// noPrice 为table中的列

OATableBean table = (OATableBean)webBean.findChildRecursive("QpriceResultTable1");
table.prepareForRendering(pageContext);
DataObjectList columnFormats = table.getColumnFormats();
DictionaryData columnFormat = null;
int childindex = pageContext.findChildIndex(table, "noPrice");
columnFormat = (DictionaryData)columnFormats.getItem(childindex);
columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);

 

推荐阅读