mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6933: Various fixes for cross-site javascript and associated trickery to web-client UI screens Plus fixes to several dialogs broken in use-the-link dialog conversion changes. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -201,8 +201,12 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
|
||||
String outcome = DIALOG_CLOSE;
|
||||
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
UserTransaction tx = null;
|
||||
try
|
||||
{
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
Map<QName, Serializable> props = properties.getNodeService().getProperties(properties.getPerson().getNodeRef());
|
||||
props.put(ContentModel.PROP_FIRSTNAME,
|
||||
(String) properties.getPerson().getProperties().get(ContentModel.PROP_FIRSTNAME));
|
||||
@@ -214,6 +218,8 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
|
||||
// persist changes
|
||||
properties.getNodeService().setProperties(properties.getPerson().getNodeRef(), props);
|
||||
|
||||
tx.commit();
|
||||
|
||||
// if the above call was successful, then reset Person Node in the session
|
||||
Application.getCurrentUser(context).reset();
|
||||
}
|
||||
@@ -221,6 +227,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
|
||||
{
|
||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||
context, Repository.ERROR_GENERIC), err.getMessage()), err );
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
}
|
||||
|
||||
return outcome;
|
||||
|
Reference in New Issue
Block a user