May 6, 2013

Refreshing JSF page from Java Code

The below code can be useful to refresh JSF page from java code method. 

String currentView = context.getViewRoot().getViewId();
ViewHandler vh = context.getApplication().getViewHandler();
UIViewRoot x = vh.createView(context,currentView);
context.setViewRoot(x);

No comments:

Post a Comment