11g: Javascript in page fragment in a dynamic region not working as hoped
Hi!
I have a page fragment. The fragment contains a couple of ActiveX components and some Javascript to control them.
One Javascript function I call from a client listener. The fragment is part of a bounded task flow.
The bounded flow looks much like this:
( ASCIIReportView ) --------- Edit Action ------------> ( EditView containing JS and ActiveX ) ------------- Save Action -----------------> ( ASCII Report View )
Now, in my application I integrate the task flow page fragment into a dynamic region. When my bounded task flow now navigates from the ASCII Report to the fragment containing the JS and ActiveX stuff, then the ActiveX components are displayed alright, but I get a JS error saying that function "onSave" is undefined, which is the JS function called from the client listener.
I created a small test application, toyed around with it, and found that the Javascript needs to be on the very first view of the bounded task flow.
In my example above, this means that the JS function that the clientListener in my EditView calls on click, needs to be defined in the page fragment of the ASCIIReportView.
Now, that's strange. Is that documented somewhere? Is there an explanation for the fact that all Javascript (even the one called in later page fragments) needs to be placed on the first view of the task flow?
Sascha