Changed the EditNodeCategories dialog to take a nodeRef rather than an id

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2007-09-27 21:54:43 +00:00
parent 62dc606fe2
commit ddc1d285c9
4 changed files with 14 additions and 6 deletions

View File

@@ -67,13 +67,13 @@ public class EditNodeCategoriesDialog extends BaseDialogBean
this.addedCategory = null;
// retrieve parameters
String id = parameters.get("id");
String nodeRef = parameters.get("nodeRef");
// make sure id was supplied
ParameterCheck.mandatoryString("id", id);
// make sure nodeRef was supplied
ParameterCheck.mandatoryString("nodeRef", nodeRef);
// create the node
this.node = new Node(new NodeRef(Repository.getStoreRef(), id));
this.node = new Node(new NodeRef(nodeRef));
// determine description for dialog
FacesContext context = FacesContext.getCurrentInstance();

View File

@@ -282,6 +282,14 @@ public class Node implements Serializable
return this.nodeRef;
}
/**
* @return Returns the string form of the NodeRef this Node represents
*/
public final String getNodeRefAsString()
{
return this.nodeRef.toString();
}
/**
* @return Returns the type.
*/

View File

@@ -406,7 +406,7 @@
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write">
<a:actionLink id="titleLink3" value="#{msg.change_category}" showLink="false" image="/images/icons/Change_details.gif"
action="dialog:editNodeCategories" actionListener="#{DialogManager.setupParameters}">
<f:param name="id" value="#{DocumentDetailsBean.document.id}" />
<f:param name="nodeRef" value="#{DocumentDetailsBean.document.nodeRefAsString}" />
</a:actionLink>
</r:permissionEvaluator>
</f:facet>

View File

@@ -254,7 +254,7 @@
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
<a:actionLink id="titleLink3" value="#{msg.change_category}" showLink="false" image="/images/icons/Change_details.gif"
action="dialog:editNodeCategories" actionListener="#{DialogManager.setupParameters}">
<f:param name="id" value="#{SpaceDetailsBean.space.id}" />
<f:param name="nodeRef" value="#{SpaceDetailsBean.space.nodeRefAsString}" />
</a:actionLink>
</r:permissionEvaluator>
</f:facet>