mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Fix up for several merge issues in UI classes
. Framework for new SelectList component git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4221 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -42,7 +42,7 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
super.init(parameters);
|
||||
|
||||
// setup the editable node
|
||||
this.editableNode = new Node(this.browseBean.getDocument().getNodeRef());
|
||||
this.editableNode = initEditableNode();
|
||||
|
||||
// special case for Mimetype - since this is a sub-property of the ContentData object
|
||||
// we must extract it so it can be edited in the client, then we check for it later
|
||||
@@ -54,11 +54,19 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the editable Node
|
||||
*/
|
||||
protected Node initEditableNode()
|
||||
{
|
||||
return new Node(this.browseBean.getDocument().getNodeRef());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome)
|
||||
throws Exception
|
||||
{
|
||||
NodeRef nodeRef = this.browseBean.getDocument().getNodeRef();
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
Map<String, Object> editedProps = this.editableNode.getProperties();
|
||||
|
||||
// get the name and move the node as necessary
|
||||
@@ -68,9 +76,9 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
fileFolderService.rename(nodeRef, name);
|
||||
}
|
||||
|
||||
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
|
||||
// we need to put all the properties from the editable bag back into
|
||||
// the format expected by the repository
|
||||
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
|
||||
|
||||
// but first extract and deal with the special mimetype property for ContentData
|
||||
String mimetype = (String)editedProps.get(TEMP_PROP_MIMETYPE);
|
||||
@@ -172,7 +180,7 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
this.nodeService.removeChild(assoc.getParentRef(), assoc.getChildRef());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@@ -233,6 +241,7 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean getters and setters
|
||||
|
||||
|
@@ -325,8 +325,7 @@ public class DashboardWizard extends BaseWizardBean
|
||||
item.setLabel(label);
|
||||
item.setTooltip(desc);
|
||||
item.setValue(layoutDef.Id);
|
||||
// set the special attribute used by the imageRadioPicker component
|
||||
item.getAttributes().put("image", layoutDef.Image);
|
||||
item.setImage(layoutDef.Image);
|
||||
icons.add(item);
|
||||
|
||||
// build UIDescription to represent the layout description text
|
||||
|
@@ -504,7 +504,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
defaultItem.setValue(ContentModel.TYPE_FOLDER.toString());
|
||||
defaultItem.setLabel(defaultLabel);
|
||||
defaultItem.setTooltip(defaultLabel);
|
||||
defaultItem.getAttributes().put("image", DEFAULT_SPACE_TYPE_ICON_PATH);
|
||||
defaultItem.setImage(DEFAULT_SPACE_TYPE_ICON_PATH);
|
||||
this.folderTypes.add(defaultItem);
|
||||
|
||||
UIDescription defaultDesc = new UIDescription();
|
||||
@@ -561,10 +561,10 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
}
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.getAttributes().put("value", idQName.toString());
|
||||
item.getAttributes().put("label", label);
|
||||
item.getAttributes().put("tooltip", label);
|
||||
item.getAttributes().put("image", icon);
|
||||
item.setValue(idQName.toString());
|
||||
item.setLabel(label);
|
||||
item.setTooltip(label);
|
||||
item.setImage(icon);
|
||||
this.folderTypes.add(item);
|
||||
|
||||
UIDescription desc = new UIDescription();
|
||||
@@ -665,7 +665,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(iconName);
|
||||
item.getAttributes().put("image", iconPath);
|
||||
item.setImage(iconPath);
|
||||
icons.add(item);
|
||||
iconNames.add(iconName);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(DEFAULT_SPACE_ICON_NAME);
|
||||
item.getAttributes().put("image", "/images/icons/space-icon-default.gif");
|
||||
item.setImage("/images/icons/space-icon-default.gif");
|
||||
icons.add(item);
|
||||
iconNames.add(DEFAULT_SPACE_ICON_NAME);
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
super.init(parameters);
|
||||
|
||||
// setup the space being edited
|
||||
this.editableNode = new Node(this.browseBean.getActionSpace().getNodeRef());
|
||||
this.editableNode = initEditableNode();
|
||||
this.spaceType = this.editableNode.getType().toString();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,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.browseBean.getActionSpace().getNodeRef();
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
Map<String, Object> editedProps = this.editableNode.getProperties();
|
||||
|
||||
// handle the name property separately, perform a rename in case it changed
|
||||
@@ -163,4 +163,18 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean getters and setters
|
||||
|
||||
/**
|
||||
* Returns the node being edited
|
||||
*
|
||||
* @return The node being edited
|
||||
*/
|
||||
public Node getEditableNode()
|
||||
{
|
||||
return this.editableNode;
|
||||
}
|
||||
}
|
||||
|
@@ -165,7 +165,7 @@ public class EditFolderPropertiesDialog extends EditSpaceDialog
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(DEFAULT_SPACE_ICON_NAME);
|
||||
item.getAttributes().put("image", "/images/icons/" + DEFAULT_SPACE_ICON_NAME + ".gif");
|
||||
item.setImage("/images/icons/" + DEFAULT_SPACE_ICON_NAME + ".gif");
|
||||
icons.add(item);
|
||||
|
||||
return icons;
|
||||
|
Reference in New Issue
Block a user