Hi,
I am using jDeveloper 12.2.1.3 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 https://stackoverflow.com/questions/35127482/is-there-no-client-side-load-event-for-a-jsf-fragment, 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:panelGroupLayout>
<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:resource>
<af:selectOneRadio id="sorbId">
<af:poll id="p1" interval="5000" timeout="600000" immediate="true" rendered="true">
<af:clientListener method="changeLayout" type="poll"/>
</af:selectOneRadio>
</af:panelGroupLayout>