Call multiple URLs on single click of af:goLink in Oracle ADF

 

Hi,

Last week i experienced a challenging task to forcefully logout from UCM when user logouts from WebCenter application without using Single Sign-on solution.

Note that the application was Extended WebCenter Spaces 11g PS2 so there was no other alternate solution for current environment. i will cover the whole topic in different post sometime soon.

In this post i will cover a simple tip how to call multiple URLs on a single click of af:goLink component in Oracle ADF.

Solution:

I created a simple JavaScript function to call a URL

 <af:resource type="javascript">
    function LogoutFromUCM(){    
        hostname = window.location.hostname;
        document.location.href="http://"+ hostname + "/cs/logout.htm";
</af:resource>

Later call that JavaScript method on af:goLink using af:clientListener

 <af:goLink text="Logout"
    id="logoutLink" 
    inlineStyle="white-space:nowrap"
    rendered="#{security.authenticated}"
    shortDesc="Click here to logout"
    destination="/adfAuthentication?logout=true&end_url=/webcenter/faces/custom/oracle/webcenter/webcenterapp/view/templates/LogoutPage.jspx">
    <af:clientListener method="LogoutFromUCM" type="mouseUp"/>
</af:goLink>

The destination attribute of af:goLink is calling a logout for WebCenter application and method attribute in af:clientListener is calling a JavaScript function to perform logout from UCM.

Using similar technique you can open any URL in a popup as well.


原文:http://baigsorcl.blogspot.com/2011/08/call-multiple-urls-on-single-click-of.html?spref=tw


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值