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

本文介绍了一种在Oracle ADF中使用af:goLink组件通过单次点击调用多个URL的方法。具体实现包括创建一个简单的JavaScript函数来调用特定URL,并通过af:clientListener在点击af:goLink时触发该函数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 callinga logout for WebCenter application and method attribute inaf: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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值