{
public void execute(Event<UIListPermissionSelector> event) throws Exception
{
String permission = event.getRequestContext().getRequestParameter(OBJECTID);
UIListPermissionSelector uiPermissions = event.getSource();
UIPageIterator pageIterator = uiPermissions.getChild(UIFormGrid.class).getUIPageIterator();
int currentPage = pageIterator.getCurrentPage();
uiPermissions.removePermission(permission);
UIContainer uiParent = uiPermissions.getParent();
uiParent.setRenderedChild(UIListPermissionSelector.class);
UIForm uiForm = uiPermissions.getAncestorOfType(UIForm.class);
uiForm.broadcast(event, event.getExecutionPhase());
while (currentPage > pageIterator.getAvailablePage())
{
currentPage--;
}
pageIterator.setCurrentPage(currentPage);
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}