public void execute(Event<UIListPermissionSelector> event) throws Exception {
UIListPermissionSelector uicom = event.getSource();
UICheckBoxInput uiPublicModeInput = uicom.getChildById("publicMode");
uicom.setPublicMode(uiPublicModeInput.isChecked());
uicom.setRendered(true);
UIForm uiForm = uicom.getAncestorOfType(UIForm.class);
UIPermissionSelector uiPermission = uiForm.findFirstComponentOfType(UIPermissionSelector.class);
if (uiPermission != null) {
uiPermission.setRendered(false);
}
// julien: UIForm cannot be null otherwise the uiForm.findFirstComponentOfType would have thrown an NPE
uiForm.broadcast(event, event.getExecutionPhase());
// event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
event.getRequestContext().addUIComponentToUpdateByAjax(uicom);
}