Comments on: ADF: undo the user’s page personalizations – query and manipulate MDS Friends of Oracle and Java Fri, 22 May 2015 11:49:09 +0000 hourly 1 By: Evert-Jan de Bruin Wed, 13 Nov 2013 03:26:05 +0000 Hi Lucas,

Great blog, very helpful. You were saying: “I am still wondering if the name of the fragment itself could be easily derived at run time. I do not suppose the UI Component tree would give me an indication.”

You are right about the latter. I just found a way to get it:

ViewPortContextImpl viewPort = (ViewPortContextImpl)ControllerContext.getInstance().getCurrentViewPort();
String pageUri = viewPort.getPhysicalURI(viewPort.getViewId());

Still have to test it thoroughly, but it seems to do the trick! Found it through the JDev debugger, the viewPort caches the latest URI of the current view. I was afraid I had to go through reflection to get it, but there was actually a function to do it. Only drawback is the cast to the Impl.