Oracle-APEX开发指南(完)

    1. Application Express Free Plugins
      1. LOV

Apex中的Lov是很简陋的,无法与EBS Form中的LOV媲美,不支持显示多列,不支持返回多列值,下图中的User即为一个LOV。

这样的LOV在实际业务中很难满足客户的需求.

Skillbuilders提供了开源的免费Super_lov插件.比较强大,能很好的解决上述需求。

  1. 支持LOV Title
  2. 支持LOV即时输入验证
  3. 支持LOV显示多例
  4. 支持LOV返回多例

下面就实现上述的一个User的LOV。

1、网上下载apex_super_lov插件,导入至Application

2、在Region search1中创建一个Page Item选择Plug-ins

3、点击下一步选择刚导入的super_lov,做如下配置

 

  1. List of values desfinition:定义LOV的数据
  2. Enterable :Enterable-Restrictred to Lov 支持输入并做即时校验,若输入的数据不存在则跳出Lov对话框
  3. Item Display & Return Columns:1,2 即为当前控件New User设置点击LOV后的显示列值与返回例值
  4. Searchable Columns:1,2 支持对哪些列进行数据查询
  5. Hidden columns:可以对某些列做隐藏
  6. Map From Columns & Map To Items 用来设置其它列返回给界面上的Object项.

效果图:

扫描二维码关注公众号,回复: 15214998 查看本文章

      1. Seclect List
      2. Report
    1. APEX部署

Application Express程序不需要编译、依赖Oracle数据库的即时运行。对于开发员来说程序的部署在系统上线之前的UAT过程是很常见的。由于它所有的对象都是存在于数据库,因此就像导数据库对象一样,可以把它导出为一个SQL文件。当然这里是对一个Application做导入做出。

如图:

导入Application至WorkSpace:

点击上图的导入选择需要导入的SQL文件,然后step by step

  1. APEX之调试、常用技巧、API

API

发送邮件

:APEX_MAIL.SEND(

            p_to     => '[email protected]',

            p_from   => 'DO_NOT_REPLY@REQS',

            p_subj   =>    ''

                        || l_who 

                        || ' Has Covered '

                        || l_job 

                        || ' at '

                        || l_client 

                        || CHR (10),

            p_body   => ‘just for test’);

      COMMIT;

      apex_mail.push_queue ();

PL/SQL中执行页面的跳转控制

begin

    ... code which can raise an exception ...

    owa_util.redirect_url('http://apex.oracle.com');

    apex_application.stop_apex_engine;

exception

    when apex_application.e_stop_apex_engine then

        raise; -- raise again the stop APEX engine exception

    when others then

        ...; -- code to handle the exception

end;

  1. APEX–EBS集成

    1. EBS中配置APEX页面调用

在EBS中注册一个Function,挂到相应的职责下就OK了,具体配置如下:

注册APEX的Function的类型都选择SSWA jsp 函数

GWY.jsp?targetAppType=APEX&p=111:10000:::::LANGUAGE,RESP_APPL_ID,RESP_ID:[LANGUAGE_CODE],[RESP_APPL_ID],[RESPONSIBILITY_ID]

                                其中上文中的111是对应APEX的Application ID,10000 是进入当前Application的APEX的第一个页面.后面的LANGUAGE,RESP_APPL_ID…就是传参数给APEX页面

有了上述的传参后,我们就能在APEX页面中做很多的业务操作了,等同于在Form中的操作。

那如何在APEX页面中做该页的权限校验呢?比如这个页面只有某个职责才可以使用。

解决方案一:

  若用户无职责访问该页面,当用户登录该Application时无法在该页做任何操作,新增一个Dynamic Action :Page_Load

Page_Load的Condition:

 Condition Type:PL/SQL Function body Returning a Boolean

 Expression 1:

declare

  user_cnt number := 0;

begin

  select count(user_id)

    into user_cnt

  from   apps.fnd_user_resp_groups

  where  user_id           = :user_id

    and  responsibility_id = :resp_id;

  if (user_cnt > 0) then

    return false;

  end if;

  return true

end;

配置Dynamic Action的True Actions

                         解决方案二:

                              若用户无该页面职责,则直接跳转至错误页面。错误页面page_id:1

                                 

                                 

ID

Author

Name

Date

Version

Remark

Add open issues that you identify while writing or reviewing this document to the open issues section.  As you resolve issues, move them to the closed issues section and keep the issue ID the same.  Include an explanation of the resolution.

When this deliverable is complete, any open issues should be transferred to the project- or process-level Risk and Issue Log (PJM.CR.040) and managed using a project level Risk and Issue Form (PJM.CR.040).  In addition, the open items should remain in the open issues section of this deliverable, but flagged in the resolution column as being transferred.

猜你喜欢

转载自blog.csdn.net/2301_76957510/article/details/130986116