try {
String roles = parseRole(rolesForComponent.getRolePalette().getModelObjectAsString());
DataAccessRule rule = new DataAccessRule((String) workspace.getConvertedInput(),
(String) layer.getConvertedInput(),
(AccessMode) accessMode.getConvertedInput(), roles);
DataAccessRuleDAO dao = DataAccessRuleDAO.get();
dao.addRule(rule);
dao.storeRules();
setResponsePage(DataAccessRulePage.class);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
}