Search code examples
xpagesxpinc

In an XPiNC app, how can I launch one XPage vs. another based on Role


I have an XPiNC app that consists of two different XPages. The XPages are set up to be used based on Roles. One Role is for the people who set up the content and the other is for those that consume it.

One of my requirements is that the Consumer Role wants to open the NSF from the desktop and have it automatically open the Consumer XPage. I know I can set the Launch property to do this for the Consumers, but that also causes the Content Providers to open that XPage which is not what should happen.

How can I set it up so that the application opens to the proper XPage based on their Role?


Solution

  • Another way to do this would be to have a third page which is the launch page. This page would just have a beforePageLoads event that looks at the user roles and then does a context.redirectToPage("/otherpage.xsp") depending on the role detected.