Sunday, May 29, 2011

How to get the Page Id in Oracle ADF

Hi,

Another quicky today. How to get the page id of current page in Java.

lets have a quick look


//get the Context
FacesContext fctx = FacesContext.getCurrentInstance();

//get the Page id in String
String viewId = fctx.getViewRoot().getViewId();

//Display Id in Message
FacesMessage message = new FacesMessage("Hello Page no "+viewId);
fctx.addMessage(null,message);

Have a nice day,
Zeeshan Baig

No comments:

Post a Comment