Display the message after you click OK in the pop-up window

Y at - it is possible to display a Message after close Popup.

For ex:

< af:popup id = "employee" contentDelivery = "lazyUncached".

popupFetchListener = ' #{employee.» Create_employee}.

popupCanceledListener = "#{employee.cancel}" >

< af:dialog id = "d22" type = "okCancel" title = "create an employee."

resize = "on" dialogListener = "#{employee.editPopup} '"

cancelTextAndAccessKey = "Cancel".

affirmativeTextAndAccessKey = "OK" >

After clicking Ok, I want to display a message: create used with success!

Thank you

In your listener dialog, make a call to this function. Or if you want to view pop-up, call popup programmatically.

{} public static void addFacesInformationMessage (String msg)
    FacesContext ctx = getFacesContext();
    FacesMessage fm =
        new FacesMessage (FacesMessage.SEVERITY_INFO, msg, "");
    ctx.addMessage (getRootViewComponentId (), fm);
}

Tags: Java

Similar Questions

Maybe you are looking for