How to create VO s and VLs dynamically in OAF
I have to create 2 VO objects dynamicaly and created 2 VL's dynamically .I have a static HGrid.and iam setting viewlinks dynamically.It is working for 1 level but not another leve..For Example.. Grid id displaying projects to Tasks but not tasks to subtasks.
here is my code
public void createViewLink(){
OADBTransaction dbTransaction=getOADBTransaction();
OAViewObject obj = (OAViewObject)this.findViewObject("TestProjects1VO1");
OAViewObject obj1 = (OAViewObject)this.findViewObject("TestTasks1VO1");
AttributeDef] prjLinkAttrs = new AttributeDef[ { obj.findAttributeDef("ProjectId") };
AttributeDef] taskLinkAttrs = new AttributeDef[ { obj1.findAttributeDef("ProjectId") };
ViewLink vl = createViewLinkBetweenViewObjects("TestPrjToTestTasksVL","TestPrjToTasksAcc",
obj,prjLinkAttrs,obj1,taskLinkAttrs,null);
//OAViewObject obj3 = (OAViewObject)this.findViewObject("TestTasks1VO1");
OAViewObject obj2 = (OAViewObject)this.findViewObject("TestRecTasks1VO1");
AttributeDef] taskAttrs = new AttributeDef[ { obj1.findAttributeDef("TaskId") };
AttributeDef] parentTaskAttrs = new AttributeDef[ { obj2.findAttributeDef("ParentTaskId") };
ViewLink vl1 = createViewLinkBetweenViewObjects("TaskToTestTasksVL","TaskToTasksAcc",
obj1,taskAttrs,obj2,parentTaskAttrs,null);
}
OAHGridBean hgrid=(OAHGridBean)webBean.findChildRecursive("HGridRN");
OAHGridHierarchyBean hgridHierarchy = (OAHGridHierarchyBean)hgrid.findChildRecursive("TreeRN");
OATreeLevelBean treeChild = (OATreeLevelBean)hgridHierarchy.findChildRecursive("TreeRN");
OAWebBean nodeDef1 = (OAWebBean)treeChild.findChildRecursive("nodeDef1");
nodeDef1.setViewUsageName("TestProjects1VO1");
nodeDef1.setViewAttributeName("ProjectName");
OATreeChildBean childNode1 = (OATreeChildBean)treeChild.findChildRecursive("childNode1");
childNode1.setAttributeValue(VIEW_LINK_NAME,"TestPrjToTestTasksVL");
childNode1.setAttributeValue(VL_ACCESSOR_NAME_ATTR,"TestPrjToTasksAcc");
OAWebBean nodeDef2 = (OAWebBean)childNode1.findIndexedChild(childNode1,"nodeDef2");
nodeDef2.setAttributeValue(VIEW_USAGE_NAME, "TestTasks1VO1");
nodeDef2.setAttributeValue(VIEW_ATTRIBUTE_NAME,"TaskName");
%%%%%%%%%%%%%%%Till Here grid is getting data%%%%%%%%%%%%
This node is not getting data............i.e sub tasks are not getting data
OATreeChildBean childNode2 = (OATreeChildBean)childNode1.findIndexedChildRecursive("childNode2");
childNode2.setAttributeValue(VIEW_LINK_NAME,"TaskToTestTasksVL1");
childNode2.setAttributeValue(VL_ACCESSOR_NAME_ATTR,"TaskToTasksAcc");
OAWebBean nodeDef3 = (OAWebBean)childNode2.findIndexedChild(childNode2,"nodeDef3");
nodeDef3.setAttributeValue(VIEW_USAGE_NAME, "TestRecTasks1VO1");
nodeDef3.setAttributeValue(VIEW_ATTRIBUTE_NAME,"TaskName");
Please help me ..
Thanks
Rama
How to create VO s and VLs dynamically in OAF的更多相关文章
- Extjs-4.2.1(二)——使用Ext.define自定义类
鸣谢:http://www.cnblogs.com/youring2/archive/2013/08/22/3274135.html --------------------------------- ...
- 巧谈 GCD
转载自:http://www.jianshu.com/p/665261814e24 谈到iOS多线程,一般都会谈到四种方式:pthread.NSThread.GCD和NSOperation.其中,苹果 ...
- gcd - b- 201611302317
谈到iOS多线程,一般都会谈到四种方式:pthread.NSThread.GCD和NSOperation.其中,苹果推荐也是我们最经常使用的无疑是GCD.对于身为开发者的我们来说,并发一直都很棘手,如 ...
- uio.c 分析【转】
转自:https://blog.csdn.net/ganggexiongqi/article/details/6737647 版权声明:本文为博主原创文章,未经博主允许不得转载. https://bl ...
- Concurrency Programming Guide 并发设计指引(二)
以下翻译是本人通过谷歌工具进行翻译,并进行修正后的结果,希望能对大家有所帮助.如果您发现翻译的不正确不合适的地方,希望您能够发表评论指正,谢谢.转载请注明出处. Concurrency and App ...
- What is a meta-class in Objective-C?
http://www.cocoawithlove.com/2010/01/what-is-meta-class-in-objective-c.html In this post, I look at ...
- How to attach multiple files in the Send Mail Task in SSIS
Let’s say you need to create a SSIS package that creates 2 files and emails the files to someone. Yo ...
- thinkphp Trace方法
页面Trace只能用于有页面输出的情况,但是trace方法可以用在任何情况,而且trace方法可以用于AJAX等操作. Trace方法的格式: trace('变量','标签','级别','是否记录日志 ...
- OAF_开发系列12_实现OAF开发中URL中的标记和加密参数传递(案例)
20150712 Created By BaoXinjian
随机推荐
- Python入门之用Python统计代码行
Pycharm每天都要写很多代码,如何统计每天的代码行数呢?作为一个目标十万行的coder,要想想办法! 题目:有个目录,里面是你自己写过的程序,统计一下你写过多少行代码.包括空行和注释,但是要分别列 ...
- Python3 数字保留后几位
Python3 数字保留后几位 方案一: 使用Python处理精度很重要的浮点数时,建议使用内置的Decimal库: from decimal import Decimal a = Decimal(' ...
- 第一个c++泛型函数(即模板)
先定义如下: ns.h template <typename T> // 这个关键字typename, 明显多此一举 inline void PRINT_ELEMENTS(const T& ...
- 02: python3使用email和smtplib库发送邮件
1.1 发送qq邮箱 注:python代理登录qq邮箱发邮件,是需要更改自己qq邮箱设置的.在这里大家需要做两件事情:邮箱开启SMTP功能 .获得授权码 教程链接 1.给单个人发邮件 参考 from ...
- 解决mysql的Too many connections
解决: /etc/my.cnf vim编辑 添加 max_connections= wait_timeout= 然后执行code service mysqld reload service mysql ...
- 20145106 《Java程序设计》第10周学习总结
教材学习内容总结 什么是计算机网络? 计算机网络,是指将地理位置不同的具有独立功能的多台计算机及其外部设备,通过通信线路连接起来,在网络操作系统,网络管理软件及网络通信协议的管理和协调下,实现资源共享 ...
- c/c++ 动态申请数组(转载)
转载:http://blog.csdn.net/hondely/article/details/6779887 转载:http://bbs.csdn.net/topics/390721031 转载:h ...
- C++11标准 STL正则表达式 验证电子邮件地址
转自:http://www.cnblogs.com/yejianfei/archive/2012/10/07/2713715.html 我们最经常遇到的验证,就是电子邮件地址验证.网站上常见.各种网页 ...
- Java实现心跳机制
一.心跳机制简介 在分布式系统中,分布在不同主机上的节点需要检测其他节点的状态,如服务器节点需要检测从节点是否失效.为了检测对方节点的有效性,每隔固定时间就发送一个固定信息给对方,对方回复一个固定信息 ...
- IDEA 插件-码云
插件安装 最新插件版本: 2018.3.1.(2019-01-10 发布)注意:码云 IDEA 插件已由 gitosc 更名为 gitee.新版插件 gitee 菜单已经和 git 菜单合并 通过「插 ...