注册 登录
壹佰网|ERP100 - 企业信息化知识门户 返回首页

的个人空间 https://www.erp100.com/?0 [收藏] [复制] [RSS]

日志

在OAF中实现Tree(二)

热度 1已有 837 次阅读2008/7/7 14:49

     通过点击树结点,进入另一个页面,显示详细信息。
     1.新建TestTreeFrmPG,放入需要显示的Item.
     2.在树层级页面上的,nodeDef结点中的Navigation下的Destination URL 设为OA.jsp?page=/dtxy/oracle/apps/test/webui/TestTreeFrmPG&CId={@CId}&OAPLRS=PLNH
     3.回到TestTreeFrmPG页面中,新建CO,在processRequest中加入
             
OAPageLayoutBean pageLayout = pageContext.getPageLayoutBean();
pageLayout.prepareForRendering(pageContext);
UINode tabBar = pageLayout.getTabs();
int childCount = 0;
if( tabBar != null )
{
     childCount    =tabBar.getIndexedChildCount(pageContext.getRenderingContext());
}
for( int i=0; i<childCount; i++)
{
   LinkBean child =
          (LinkBean) tabBar.getIndexedChild(pageContext.getRenderingContext(), i);
        if( child != null )
        {
          child.setTargetFrame("_top");
        }
   }
      OAApplicationModule am = pageContext.getApplicationModule(webBean);

      // Get the CId parameter from the URL
      String cId = pageContext.getParameter("CId");
      Serializable[] parameters = { cId };
      am.invokeMethod("initDetails", parameters);

     在AMImpl中,加入
        
public void initDetails(String cId)  
{        TreeVOImpl vo = getTreeVO1();  
          String[] keys = { cId };
         Row[] rows = vo.findByKey(new Key(keys), 1);
         if ((rows != null) && (rows.length > 0)) 
        {  
              vo.setCurrentRow(rows[0]);
     }   
     } // end initDetails()

   运行,点击树结点,得出效果。

  

   

发表评论 评论 (1 个评论)

回复 hero_bbserp 2011/11/6 01:55
不错瓦

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

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

GMT+8, 2025/11/29 06:43 , Processed in 0.009458 second(s), 13 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部