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. Hibernate的状态,缓存和映射

    Hibernate的状态,缓存和映射 1.对象的状态 1.1.对象状态的概念和分类 在使用Hibernate操作数据库的时候,我们先创建了JavaBean对象,然后使用session来保存或者更新到数 ...

  2. 8.Git撤销修改

    有一个文件内容如下: $ cat README.md the first ... the second ... the third ... - 文件自修改后还没有被放到暂存区,现在,撤销修改就回到和版 ...

  3. git学习------> 解决Gitlab 版本升级之后,发送 merge request 出现 http 500 的返回码错误

    今天有同事在Gitlab上发送 Merge Request的时候,直接出现如下所示的界面,提示http 500,服务器内部出错. 一.错误描述 1.1 创建新的 Merge Request 1.2 填 ...

  4. 基于Kafka+Spark Streaming+HBase实时点击流案例

    背景 Kafka实时记录从数据采集工具Flume或业务系统实时接口收集数据,并作为消息缓冲组件为上游实时计算框架提供可靠数据支撑,Spark 1.3版本后支持两种整合Kafka机制(Receiver- ...

  5. WebService客户端几种实现方式

    1.jdk原生调用(需要获取服务接口文件) import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Ser ...

  6. jQuery实现节点克隆、替换和互换

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  7. python16_day35【算法】

    一.BTree class BinTreeNode: def __init__(self, data): self.data = data self.lchild = None self.rchild ...

  8. 4.9 Routing -- Query Parameters

    一.概述 1. 在URL中查询参数是可选的key-value对,出现在?的右边.例如,下面的URL有两个查询参数,sort和page,对应的值分别是ASC和2. example:http://exam ...

  9. cocos代码研究(17)Widget子类RadioButtonGroup学习笔记

    理论基础 RadioButtonGroup可以把指定的单选按钮组织起来, 形成一个组, 使它们彼此交互. 在一个RadioButtonGroup, 有且只有一个或者没有RadioButton可以处于被 ...

  10. JAVA构建高并发商城秒杀系统——架构分析

    面试场景 我们打算组织一个并发一万人的秒杀活动,1元秒杀100个二手元牙刷,你给我说说解决方案. 秒杀/抢购业务场景 商品秒杀.商品抢购.群红包.抢优惠劵.抽奖....... 秒杀/抢购业务特点 秒杀 ...