校验基于EO的VO中的字段是否发生变化
I have a table region and there are multiple records fetching from a Entity based VO. Now I have updated one row or any of row, I require to display once changed records on next page. How can I display? I want to capture row status type thing while pressing the save button.
if(row.getEntity(0).getPostState()==2){
//your logic
}
xxPerPhonesVORowImpl updatedRow = (xxPerPhonesVORowImpl)EmpContactsVO.getCurrentRow();
System.out.println("Row Status : " + updatedRow.getxxPerPhonesEO().getEntityState());
if(updatedRow.getxxPerPhonesEO().getEntityState() == EntityImpl.STATUS_NEW ) {
System.out.println("Row Status : Row # " + i + " : Modified value : " + updatedRow.getEntity(0).getEntityState());
}
最佳答案:
ssue resolved by creating a new field (IS_SUBMITTED) in database table to Flag the record status with the default value as N (update all the existing records if there are any in the table);
Step 1 : Go to properties on your EO and navigate to Java and check Data Manipulation
Step 2 : Go to your EOImpl class and search for doDML method
Step 3 : Under doDML method add below code to set EO Attribute value;
if (getIsSubmitted().equals("N")) {
setIsSubmitted("M"); //where as M stands for Modified
}
Step 4 : Under your Controller Class @ PFR, write code for loop and set the attribute status like below;
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("SubmitButton") != null ) {
am.invokeMethod("apply"); //saving the records so the EOImpl will set the is_submitted to 'M' wherever the record modified state found
OAViewObject EmpPhoneVO = (OAViewObject)am.findViewObject("xxPerPhonesVO1");
int empPhoneRowCnt = EmpPhoneVO.getRowCount();
EmpPhoneVO.first();
for (int i=1; i<=empPhoneRowCnt; i++){
OARow empPhoneRow = (OARow)EmpPhoneVO.getCurrentRow();
String lPhoneValidated = "Y";
// your validation if any
if (lPhoneValidated.equals("Y")) {
System.out.println("IsSubimtted After Get : " + empPhoneRow.getAttribute("IsSubmitted"));
if (empPhoneRow.getAttribute("IsSubmitted").equals("M")){
empPhoneRow.setAttribute("IsSubmitted","S");
}
System.out.println("IsSubimtted After Set : " + empPhoneRow.getAttribute("IsSubmitted"));
OAException submitMessage = new OAException("Employee Contact Details : Row # " + i + " : Submitted for Approval to Employee Relation Officer.",
OAException.CONFIRMATION );
pageContext.putDialogMessage(submitMessage);
}
EmpPhoneVO.next();
}
}
参考资料:
How to get Row Status of VO Rows
校验基于EO的VO中的字段是否发生变化的更多相关文章
- OAF 中的EO 和VO
EO :oracle.apps.fnd.framework.server.OAEntityImpl VO:oracle.apps.fnd.framework.server.OAViewRowImpl ...
- 关于VO中的Attribute的问题
对于新手来说,有些时候会遇到VO中的Attribute的各种问题; 总结如下:1,你页面上输入了值,但是点击保存之后值并不能存到数据库,这个是因为该字段在VO中不是基于EO的 2,你将一个VO中的E ...
- 前端必备HTTP技能之HTTP请求头响应头中常用字段详解(转)
作为一名前端开发人员,肯定少不了要和网络打交道,因为要从服务器端拉取数据,从服务端获取数据最常用的方式还是通过HTTP请求.给服务器发请求的时候有请求头,接受服务器响应的时候有响应头,客户端和服务器端 ...
- mysql向表中某字段后追加一段字符串:
mysql向表中某字段后追加一段字符串:update table_name set field=CONCAT(field,'',str) mysql 向表中某字段前加字符串update table_n ...
- sql 查询表中所有字段的名称
最近工作用到SQL语句查询表中所有字段的名称,网上查询,发现不同数据库的查询方法不同,例如: SQL server 查询表的所有字段名称:Select name from syscolumns Whe ...
- 解决SQL server 2014 修改表中的字段,无法保存的问题。
修改PROJECT表中的字段,保存时,弹出上面的窗体,无法保存. 解决方法为:[工具]->[选项]->[设计器]中,去掉“阻止保存要求重新创建表的更改”前的勾选.
- Elasticsearch入门必备——ES中的字段类型以及常用属性
使用Elasticsearch时,了解字段的概念,是必不可少的.毕竟无论是es还是传统的数据库,都无法弱化字段的类型. 背景知识 在Es中,字段的类型很关键: 在索引的时候,如果字段第一次出现,会自动 ...
- mongoDB删除表中一个字段
使用update命令 update命令 update命令格式: db.collection.update(criteria,objNew,upsert,multi) 参数说明: criteria:查询 ...
- easyui datagrid中datetime字段的显示和增删改查问题
datagrid中datetime字段的异常显示: 使用过easyui datagrid的应该都知道,如果数据库中的字段是datetime类型,绑定在datagrid显式的时候会不正常显示,一般需要借 ...
随机推荐
- Java Naming and Directory Interface (JNDI) Java 命名和目录接口
https://www.oracle.com/technetwork/java/jndi/index.html Lesson: Overview of JNDI (The Java™ Tutorial ...
- 数据库们~MySQL~MongoDB~Redis
mysql基础 mysql进阶 python操作mysql MongoDB Redis
- Delphi中那些容易混淆的基础(@、^、Addr、Pointer,Move、CopyMemory,GetMem和FreeMem、GetMemory和FreeMemory、New和Dispose、StrAlloc和StrDispose、AllocMem)
@.^.Addr.Pointer Delphi(Pascal)中有几个特殊的符号,如@.^等,弄清楚这些符号的运行,首先要明白Delphi指针的一些基础知识:指针,是一个无符号整数(unsigned ...
- Android中的Handler及它所引出的Looper、MessageQueue、Message
0.引入 0.1.线程间通信的目的 首先,线程间通信要交流些什么呢? 解答这个问题要从为什么要有多线程开始,需要多线程的原因大概有这些 最早也最基本:有的任务需要大量的时间,但其实并不占用计算资源,比 ...
- Drawing Graphs using Dot and Graphviz
Drawing Graphs using Dot and Graphviz Table of Contents 1. License 2. Introduction 2.1. What is DOT? ...
- sql用法
1: SELECT `SCHEMA_NAME` FROM `information_schema`.`SCHEMATA`; 查询sql中的数据库名 2: select * from for ...
- mysql删除匿名用户
首先使用命令进入数据库 [root@localhost raul]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Co ...
- 经验搜索排名---google已经做过类似的了(我想多了)
由于编程的原因,我们需要经常的查资料,现在转载的文章比较多,我们经常看到的搜索结果的前十名基本上有7名是转载的.这样看起来很没有效率,后来突然想到,如果把大家的浏览结果搜集起来,然后进行权重排名,这样 ...
- (13)如何使用Cocos2d-x 3.0制作基于tilemap的游戏:第一部分
引言 程序截图: 本教程将会教大家如何使用Cocos2d-x来做一个基于tile地图的游戏,当然还有Tiled地图编辑器.(我们小时候玩的小霸王小学机里面的游戏,大部分都是基于tile地图的游戏,如坦 ...
- Educational Codeforces Round 57 Solution
A. Find Divisible 签到. #include <bits/stdc++.h> using namespace std; int t, l, r; int main() { ...