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

最新文章

  1. 曲面之美:三星 S6 Edge+
  2. Hibernate createCriteria查询详解
  3. (状压) Marriage Ceremonies (lightOJ 1011)
  4. 阿里云的NoSQL存储服务OTS的应用分析
  5. SQL Server技术问题之存储过程与sql语句的优缺点
  6. css3学习总结2--CSS3圆角边框
  7. 学习练习 java 程序设计园的周长面积
  8. C# String.Format
  9. No DEFAULT or UI configuration directive found!
  10. SSIS: Lookup组件高级用法,生成推断成员(inferred member)
  11. (转)C++笔记:面向对象编程基础
  12. Java:foreach实现原理
  13. Spring RPC 入门学习(2)-获取Map对象
  14. Templates中的for标签
  15. day10 内容大纲
  16. Linux系统文件名字体不同的颜色都代表什么
  17. Mongodb 笔记01 MongoDB 简介、MongoDB基础知识、启动和停止MongoDB
  18. eclipse新建tomcat server但是总是报404的解决方法
  19. python使用snappy压缩
  20. 修改PHP上传文件的大小限制

热门文章

  1. 在CentOS7下从0开始搭建docker并发布tomcat项目
  2. nginx挂维护页面
  3. 使用Python创建.sd服务定义文件,实现脚本自动发布ArcGIS服务
  4. Supermarket---poj456(贪心并查集优化)
  5. Caocao&#39;s Bridges---hdu4738(桥)
  6. java 调用静态方法和构造函数和静态块执行的先后顺序
  7. Android仿今日头条手界面
  8. Kafka丢失数据问题优化总结
  9. 使用Ajax验证用户是否已存在
  10. java-Unsupported major.minor version 52.0错误解决