Thursday, March 3, 2011

Show Popup from Managed Bean

af:popup id="p1" binding="#{managedbean.bindp1}"
popup child component
af:popup

bindp1 is binding variable for popup in managed bean.

public void showPopup(){
ExtendedRenderKitService erkService =Service.getService(fctx.getRenderKit(),ExtendedRenderKitService.class);
erkService.addScript(fctx,"AdfPage.PAGE.findComponent('" + bindp1 + "').show();");
}


public void hidePopup(){
ExtendedRenderKitService erkService =Service.getService(fctx.getRenderKit(),ExtendedRenderKitService.class);
erkService.addScript(fctx,"AdfPage.PAGE.findComponent('" + bindp1 + "').show();");
}

2 comments:

  1. Thanks for the info, but in the hidePopup method I find a mistake.. in the last line you must be change .show() method invocation with .hide().

    Thanks

    ReplyDelete
  2. Using pop up banner effectively, you will be able to highlight your products and service properly

    Katie Lennon

    ReplyDelete