Including a page fragment that has a clientListener

I use JDeveloper 11.1.2.3. I have a page fragment (.jsff) which was originally written to be used in a stubborn workflow added to pages in an af:region. It was working fine. But now, I need to call a JavaScript function to update an inputText when you press a command button. I know how do it, but never did it in a fragment.

The question is that I need to make sure that the Javascript function is present on any page that uses the fragment. This is done with a component of the af: resource, but given that af: resource is a child of af: document, and af:document is not used in a fragment, I can't put the af: resource in the fragment. As far as I see it, my options are:
< ul >
< li > put the af: resource on every page that uses the workflow containing the fragment (fragment and a parent-action are the only things in the workflow). If I do this, the clientListener in the fragment sees the calling page's Javascript function? < /li >
< li > it has no NEED to be a workflow. Maybe I should reference the fragment with ui: include instead of af: region. If I do that, I think can I use af:resource in the fragment. But I also need to enter the fragment of the calling page pageDef pageDef - can I use the & lt; page & gt; element in the calling page to include pageDef? Or do I need to merge the two pageDefs? < /li >
< /ul >

tag AF:Resource in the jsff works very well for me. Can you please paste your source code?

Tags: Java

Similar Questions

Maybe you are looking for