Home > Database > Mysql Tutorial > Oracle ADF 一个页面实现 维护区域Form和查看区域Table 方法

Oracle ADF 一个页面实现 维护区域Form和查看区域Table 方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:10:38
Original
1025 people have browsed it

ADF 的控件是由VO中拖拽出来 所以 如果把同一VO在一个Page分别拖拽成一个Form和一个Table,并实现联动则如果VO中没有数据的情况:

Oracle ADF 一个页面实现 维护区域Form和查看区域Table 方法

[日期:2012-02-03] 来源:Linux社区  作者:haqer0825 [字体:]

ADF 的控件是由VO中拖拽出来

所以 如果把同一VO在一个Page分别拖拽成一个Form和一个Table,并实现联动

则如果VO中没有数据的情况: Table显示 无数据,而Form控件不显示控件外框,并且位置很难看.

所以几种实现方案 如下:


1.Page A 只有Table,如果需要编辑或新建则进行跳转到Page B,这样createRow已经添加进VO中, 维护区域控件有框
        2.          同一页面有Form和Table,在初始 method-call中添加一个blankRow,这样缺点则:Table中也存在一行BlankRow

        3.          所以第三种方案:把维护区域Form的全部控件复制,粘贴到同一Formlayout,并且把value ="#{bind.字段名.inputvalue}"改为value = ""(如有必要把其他属性也改为"") , 假设为Form B(原先Form称为A),B中所有控件

                     统一两个属性:rendered = "#{!pageFlowScope.manageBean.flag}"  disabled =  "true"

                     A中加上rendered = "#{pageFlowScope.manageBean.flag}"    在manageBean中, 初始method -call方法 相关代码

                         this.setFlag(false);
                        if(am.getVO1()getEstimatedRowCount()!=0)
                             {
                                   this.setFlag(true);

                             }

              PS:特别重要的是,input控件要把partialTriggers指向Button,我测试了,如果是CommandToorbarButton.rendered属性不自动刷新.用commandButton才能自动刷新

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template