Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, December 29, 2009

Doing some work before showing Popup in ADF

Here is the way to do any processing before calling popup. First of all create a method in backing bean and assign this to action of "commandButton" or "commandLink". Sample signature for you method is as follows:

public void myMethod()
{
/**
* Place your processing logic here and then call showPoup method
**/
showPopup(popupId);
}

Signature of showPopup is:

public static void showPopup(String popupId)
{
FacesContext context = FacesContext.getCurrentInstance();

ExtendedRenderKitService extRenderKitSrvc =
Service.getRenderKitService(context, ExtendedRenderKitService.class);
extRenderKitSrvc.addScript(context,
"AdfPage.PAGE.findComponent('" + popupId + "').show();");
}