I have used af:popup a lot in my application and I call the popup only from the pages in which it is created. For example, if popup1 is created in Page1, I can call it only from this page!
I want to call a popup being created within Page1 from Page2. The real scenario is that I want to create the popup within the pageTemplate, and use it everywhere.
The problem with this is that it does not recognize the bindings that are used in the popup when called from another page. Does anyone know how to fix or avoid this? Please tell me what approach have you used in this case? Thanks
Actually 1 Page Definition (Binding Container) per page is not a hard/fixed restriction. You can use the same PageDef for more than one page. Admittedly unusual but works. Go to the Databindings.cpx file. You will notice that the jspx page is associated with its pagedef file, not by tightly coupled/direct reference, but by an indirect UsageID. Edit the metadata to have page1 and page2 use the same page definition file, via the usageID. Then the binding container will be shared by both pages.
BUT, PageTemplates can have their own page bindings - have you tried this?