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:
Kevin Roast
2007-11-12 16:07:55 +00:00
parent f9a456f870
commit f261c168b7
26 changed files with 135 additions and 133 deletions

View File

@@ -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;