Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding region breaks AdfBootstrap scripts

japherJul 28 2009 — edited Jul 29 2009
I'm using 11g (11.1.1.1.0) and a method described on this forum to trigger a popup from one of my backing beans like this:
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "AdfPage.PAGE.findComponent('MyContainer:MyPopup').show();");
I have found that if my page includes a bounded task flow (embedded in the page using the af:region tag) then the above no longer works. I can see javascript has been added to the page correctly:
<script type="text/javascript">
AdfBootstrap._extendedScripts=[function(){AdfPage.PAGE.findComponent('MyContainer:MyPopup').show();}];
</script>
...
var exScripts=AdfBootstrap._extendedScripts;for (var i=0;i<exScripts.length;i++){exScripts()};
...

but for some reason, including the af:region in the page interferes with the onload behaviour and the popup is not shown (there are no javascript errors in the firefox error console). I've tried with an even simpler script (e.g. alert("hello");) and again, it works if I remove the af:region, then doesn't work if I add the af:region back in. In both cases, viewing the source of the page shows that the javascript is present, it's just not being called.

Is this a bug?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2009
Added on Jul 28 2009
3 comments
707 views