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