|
|
发表于 2010/10/12 09:03:28
|
显示全部楼层
我试过了,是没有错误消息的,我的做法供你参考一下。
CO中的代码:
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
import oracle.cabo.ui.collection.UINodeList;
import oracle.cabo.ui.collection.DataObjectListNodeList;
import oracle.cabo.ui.data.DataBoundValue;
import oracle.cabo.ui.data.DictionaryData;
import oracle.cabo.ui.data.ArrayDataSet;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
// Set a dummy view usage on the table
OAAdvancedTableBean tableBean = (OAAdvancedTableBean)webBean.findChildRecursive("region4");
tableBean.setViewUsageName("");
// Set text binding for the leaf items
OAMessageStyledTextBean item1 = (OAMessageStyledTextBean)tableBean.findIndexedChildRecursive("item1");
item1.setTextBinding("text1");
OAMessageStyledTextBean item2 = (OAMessageStyledTextBean)tableBean.findIndexedChildRecursive("item2");
item2.setTextBinding("text2");
// Set the column bean's properties
OAColumnBean column2 = (OAColumnBean)tableBean.findIndexedChildRecursive("column2");
column2.setUseSeparateRows(true);
UINodeList col2List = new DataObjectListNodeList(item2, new DataBoundValue("childDataList"));
column2.setIndexedNodeList(col2List);
// Create the row data
DictionaryData rowData[] = new DictionaryData[3];
rowData[0] = new DictionaryData("text1", "value1");
DictionaryData row1Col2Data[] = new DictionaryData[2];
row1Col2Data[0] = new DictionaryData("text2", "value2");
row1Col2Data[1] = new DictionaryData("text2", "value3");
rowData[0].put("childDataList", new ArrayDataSet(row1Col2Data));
rowData[1] = new DictionaryData("text1", "value4");
DictionaryData row2Col2Data[] = new DictionaryData[3];
row2Col2Data[0] = new DictionaryData("text2", "value5");
row2Col2Data[1] = new DictionaryData("text2", "value6");
row2Col2Data[2] = new DictionaryData("text2", "value7");
rowData[1].put("childDataList", new ArrayDataSet(row2Col2Data));
rowData[2] = new DictionaryData("text1", "value8");
DictionaryData row3Col2Data[] = new DictionaryData[1];
row3Col2Data[0] = new DictionaryData("text2", "value9");
rowData[2].put("childDataList", new ArrayDataSet(row3Col2Data));
tableBean.setTableData(new ArrayDataSet(rowData));
}
页面结构及运行效果参考截图 |
-
-
|