Hello Thomas,
To automatically close your tabs using javascript, you will have to use the markers.
https://4js.com/online_documentation/fjs-gas-2.11.01-manual-html/User/CustomizeJS.htmlCreate a new javascript file in the "FGLASDIR/web/fjs/" directory:
myfile.js:
---
gwc.componentSet.application.end2 = function( polarity, eid, cid, component, data )
{
window.close();
}
---
In this file, there is only a "close" action but you can add an "alert()" statement just to test.
Then, you will have to call this function in the main.xhtml file; define your new javascript file "myfile.js" and your new "end2" instruction:
FGLASDIR/tpl/set1/main.xhtml:
---
<head>
...
<script type="text/javascript" gwc:attributes="src application/connectorURI+'/fjs/myfile.js'" defer="defer"> </script>
...
</head>
<body gwc:marks="
...
end2 application/state/ended/normal?[application/CID]:null;
...
---
Thus, when a "close" action will occur, "myfile.js" will be executed.
Note that since GAS/GWC 2.11 the child windows/tabs of your application should automatically close when executing a "close" action on them.
Note that the behaviour can differ according to the browser; with the changes above, even the main application window could be closed with IE but not with Firefox.
Best regards,