Forum Stats

  • 3,757,060 Users
  • 2,251,192 Discussions


How to fire clientListener when reloading the ADF fragment?

User_8PMDV Member Posts: 25 Green Ribbon


I am using jDeveloper to develop a responsive application with clientListener to give different layouts when page loading.

It works well in JSF file, while not fire in JSFF files. I tried to add the resource javascript code to jsff and also wrap clientListener with af:poll without any luck.

As indicated in a previous blog post, the clientListener should fire with af:poll wrapper. I don't have any idea why it doesn't work in my case.

In jsff file:


<af:resourse type="javascript">

function changeLayout() {

var sorbId=AdfPage.PAGE.findComponenntByAbsoluteId('sorbId');

if(window.matchMedia("(min-width: 480px)").matches) {

sorbId.setProperty("layout", "horizontal");

} else {

sorbId.setProperty("layout", "vertictal");



<af:selectOneRadio id="sorbId">

<af:poll id="p1" interval="5000" timeout="600000" immediate="true" rendered="true">

<af:clientListener method="changeLayout" type="poll"/>





  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,540 Red Diamond

    User, you should provide a complete reusable test case for this.

    Your implementation differs from the one in the blog. Have you tried it the same way as shown in the blog?

    Have you checked if the client listener fires at all?

    From your code, it's not clear. My guess is that your javascript is called, but can't find the component.


  • User_8PMDV
    User_8PMDV Member Posts: 25 Green Ribbon

    Thanks Timo for suggestions. I have made it work by putting the af:poll tag right above the af:selectoOneChoice tag like below:

    <af:poll id="p1" interval="200">

    <af:clientListener method="changeLayout" type="poll"/>


    <af:selectOneRadio id="sorbId">