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中的字段是否发生变化的更多相关文章

  1. OAF 中的EO 和VO

    EO :oracle.apps.fnd.framework.server.OAEntityImpl VO:oracle.apps.fnd.framework.server.OAViewRowImpl ...

  2. 关于VO中的Attribute的问题

    对于新手来说,有些时候会遇到VO中的Attribute的各种问题; 总结如下:1,你页面上输入了值,但是点击保存之后值并不能存到数据库,这个是因为该字段在VO中不是基于EO的  2,你将一个VO中的E ...

  3. 前端必备HTTP技能之HTTP请求头响应头中常用字段详解(转)

    作为一名前端开发人员,肯定少不了要和网络打交道,因为要从服务器端拉取数据,从服务端获取数据最常用的方式还是通过HTTP请求.给服务器发请求的时候有请求头,接受服务器响应的时候有响应头,客户端和服务器端 ...

  4. mysql向表中某字段后追加一段字符串:

    mysql向表中某字段后追加一段字符串:update table_name set field=CONCAT(field,'',str) mysql 向表中某字段前加字符串update table_n ...

  5. sql 查询表中所有字段的名称

    最近工作用到SQL语句查询表中所有字段的名称,网上查询,发现不同数据库的查询方法不同,例如: SQL server 查询表的所有字段名称:Select name from syscolumns Whe ...

  6. 解决SQL server 2014 修改表中的字段,无法保存的问题。

    修改PROJECT表中的字段,保存时,弹出上面的窗体,无法保存. 解决方法为:[工具]->[选项]->[设计器]中,去掉“阻止保存要求重新创建表的更改”前的勾选.

  7. Elasticsearch入门必备——ES中的字段类型以及常用属性

    使用Elasticsearch时,了解字段的概念,是必不可少的.毕竟无论是es还是传统的数据库,都无法弱化字段的类型. 背景知识 在Es中,字段的类型很关键: 在索引的时候,如果字段第一次出现,会自动 ...

  8. mongoDB删除表中一个字段

    使用update命令 update命令 update命令格式: db.collection.update(criteria,objNew,upsert,multi) 参数说明: criteria:查询 ...

  9. easyui datagrid中datetime字段的显示和增删改查问题

    datagrid中datetime字段的异常显示: 使用过easyui datagrid的应该都知道,如果数据库中的字段是datetime类型,绑定在datagrid显式的时候会不正常显示,一般需要借 ...

随机推荐

  1. opencv中Mat格式的数据访问.at

    opencv3中图形存储基本为Mat格式,如果我们想获取像素点的灰度值或者RGB值,可以通过image.at<uchar>(i,j)的方式轻松获取. Mat类中的at方法对于获取图像矩阵某 ...

  2. 设置webView头部不能滑动

    设置webView头部不能滑动 _webView.scrollView.bounces=NO;

  3. php array_merge和运算符+

    其实很多时候我都很疑惑为什么同维度的数组不能直接使用运算+直接进行相加,然后结果就是两个数组合并的在一起的新结果,这个就有点跟array_merge合并函数类似了,接下来就来看下这两种合并的方式到底有 ...

  4. PHP面向对象详解:继承、封装与多态

    首先,在解释面向对象之前先解释下什么是面向对象? [面向对象]1.什么是类? 具有相同属性(特征)和方法(行为)的一系列个体的集合,类是一个抽象的概念2.什么是对象?从类中拿到的具有具体属性值得个体, ...

  5. java观察者(Observer)模式

    观察者模式:     试想,在电子商务网站上,一个用户看中了一件一份,但是当时衣服的价格太贵,你需要将衣服收藏,以便等衣服降价时自动通知该用户.这里就是典型的观察模式的例子.     1.观察者模式的 ...

  6. kubernetes实战(三):k8s v1.11.1 持久化EFK安装

    1.镜像下载 所有节点下载镜像 docker pull kibana: docker tag kibana: docker.elastic.co/kibana/kibana: docker pull ...

  7. Day27-28 基础加强

    day28基础加强 今日内容 泛型 注解 Servlet3.0 动态代理 类加载器   泛型 回顾泛型类 泛型类:具有一个或多个泛型变量的类被称之为泛型类. public class A<T&g ...

  8. eclipse+maven+tomcat构建web工程

    我们要利用Maven构建一个web应用,开发环境为eclipse+tomcat.构建过程如下: 1.工具准备 eclipse:版本为eclipse 4.2(Juno Service),maven插件的 ...

  9. Android初体验之Monkey和MonkeyRunner

    原文地址https://blog.csdn.net/mad1989/article/details/38087737 Monkey 什么是Monkey Monkey是Android中的一个命令行工具, ...

  10. Android 创建SQLite数据库(一)

    Android内置了轻量级的数据库SQLite,这里将自己理解作个记录,方便自己复习. 一.首先,创建SQLite数据库比较常见的方式是通过Android提供的SQLiteOpenHelper来实现, ...