壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2115|回复: 9

[OAF] OAF 如何去除体统提示

  [复制链接]
发表于 2010/10/7 12:49:56 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x

 楼主| 发表于 2010/10/7 12:52:34 | 显示全部楼层
Advanced Tables  的Row Span
创建Row Span 需要一个虚拟VO,所以在运行时,总是会出现上面的提示,有没有办法可以屏蔽这个提示
发表于 2010/10/8 08:10:53 | 显示全部楼层
把代码及你的页面的结构图,都贴出来看看。
 楼主| 发表于 2010/10/11 13:23:24 | 显示全部楼层
回复 sumury 的帖子

Row SpanThe figure below illustrates a table with row spans. Since an advanced table requires a view usage, and the same view usage for all columns, it is difficult to support row spans that require different amounts of data under each column. In order to implement an advanced table with row spans, you must strip the advanced table's dependence on the view object.
The current support of rowspan is ideal only for the static display of a small amount of data. It currently has the following limitations:
  • Does not scale when the data must come for a view object or if there are a large number of rows or columns.
  • Supports read-only data. It cannot and will not support form data, as without a view object, it is difficult to push back data.
  • Does not support table events.
  • Note that the advanced table will generate an exception in developer mode, as the view object is not set on it. The actual row span, however, will render when you run the page with the advanced table in normal mode.
file:///C:/JDeveloper/jdevdoc/WebHelp/devguide/feat/images/feat_advtabrowspan.gif
Declarative ImplementationStep 1: Create the advanced table, the columns, the leaf items and sortable headers declaratively, but do not specify any view object information for any of these components (that is, do not specify a view instance or view attribute names).
Step 2: In the column for which you want to have row span, set the Use Separate Rows property on the Column to True. (This property will be available in a future version of OA Extension.)
Runtime Control
RowSpan.JPG
 楼主| 发表于 2010/10/11 13:24:48 | 显示全部楼层
代码:
// Set a dummy view usage on the table
   OAAdvancedTableBean tableBean = ...;
   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", "value");   
   DictionaryData row1Col2Data[] = new DictionaryData[2];
   row1Col2Data[0] = new DictionaryData("text2", "value");   
   row1Col2Data[1] = new DictionaryData("text2", "value");   
   rowData[0].put("childDataList", new ArrayDataSet(row1Col2Data));
   rowData[1] = new DictionaryData("text1", "value");
   DictionaryData row2Col2Data[] = new DictionaryData[3];
   row2Col2Data[0] = new DictionaryData("text2", "value");   
   row2Col2Data[1] = new DictionaryData("text2", "value");
   row2Col2Data[2] = new DictionaryData("text2", "value");
   rowData[1].put("childDataList", new ArrayDataSet(row2Col2Data));
   rowData[2] = new DictionaryData("text1", "value");
   DictionaryData row3Col2Data[] = new DictionaryData[1];
   row3Col2Data[0] = new DictionaryData("text2", "value");   
   rowData[2].put("childDataList", new ArrayDataSet(row3Col2Data));
tableBean.setTableData(new ArrayDataSet(rowData));
发表于 2010/10/11 13:53:28 | 显示全部楼层
双击你的工程,

在窗口的左边依次定位Common->Oracle Applications->Run Options

这时在窗口的右边Selected Options中移除OADeveloperMode

即可。
 楼主| 发表于 2010/10/12 07:44:39 | 显示全部楼层
回复 sumury 的帖子

已经移除OADeveloperMode,可是还是出现例外
发表于 2010/10/12 08:20:50 | 显示全部楼层
再将OADiagnostic移除试试看。
发表于 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));
  }

页面结构及运行效果参考截图
image002.jpg
image004.jpg
 楼主| 发表于 2010/10/12 09:30:52 | 显示全部楼层
回复 sumury 的帖子

O(∩_∩)O谢谢

我找到错误了
是 tableBean.setViewUsageName("");   我写成了 tableBean.setViewUsageName("ta");
这句改掉之后就正常了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 02:12 , Processed in 0.015979 second(s), 15 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表