Comments on: ADF: undo the user’s page personalizations – query and manipulate MDS https://technology.amis.nl/2012/09/27/adf-undo-the-users-page-personalizations-query-and-manipulate-mds/ Friends of Oracle and Java Fri, 22 May 2015 11:49:09 +0000 hourly 1 http://wordpress.org/?v=4.2.2 By: Evert-Jan de Bruin https://technology.amis.nl/2012/09/27/adf-undo-the-users-page-personalizations-query-and-manipulate-mds/#comment-7472 Wed, 13 Nov 2013 03:26:05 +0000 http://technology.amis.nl/?p=19457#comment-7472 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.

]]>