- fixed issues with editing spaces

- made topic pages consistent with 1.2
- added ability to force properties to render even if they are not present in the node
- changed warnings about missing properties to debug but added a log label to turn it on easily

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2922 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-05-18 21:02:07 +00:00
parent 8bb97be974
commit d3a6eb447f
14 changed files with 127 additions and 80 deletions

View File

@@ -31,7 +31,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
super.init(parameters);
// setup the space being edited
this.editableNode = this.browseBean.getActionSpace();
this.editableNode = new Node(this.browseBean.getActionSpace().getNodeRef());
this.spaceType = this.editableNode.getType().toString();
}
@@ -55,7 +55,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// update the existing node in the repository
NodeRef nodeRef = this.editableNode.getNodeRef();
NodeRef nodeRef = this.browseBean.getActionSpace().getNodeRef();
Map<String, Object> editedProps = this.editableNode.getProperties();
// handle the name property separately, perform a rename in case it changed
@@ -68,6 +68,12 @@ public class EditSpaceDialog extends CreateSpaceDialog
// get the current set of properties from the repository
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
// add the "uifacets" aspect if required, properties will get set below
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_UIFACETS) == false)
{
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_UIFACETS, null);
}
// overwrite the current properties with the edited ones
Iterator<String> iterProps = editedProps.keySet().iterator();
while (iterProps.hasNext())
@@ -149,7 +155,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
this.editableNode.reset();
this.browseBean.getActionSpace().reset();
return outcome;
}