Merged V3.1 to HEAD

13218: Partial fix for ETHREEOH-1259 - the null pointer exceptions are gone to be replaced by sensible error messages.
   13220: Merged V3.0 to V3.1
      13219: Build Fix for error in hand merge of r13141 from V2.2 to V3.0
   13226: Clearer debugging of exceptions during NodeService cleanup
   13228: ETHREEOH-1250
   13229: Fix for ETHREEOH-1184: Share webscript configuration does not support international chars as values
   13235: Add support to exclude admin and guest from person permission fix ups. Tidy up for ETHREEOH-1239
   13239: Build Fix
   13243: ETHREEOH-1308: Update AMPs to indicate unsupported status
   13247: Build fix - do not delete admin :-)
   13248: Fix build
   13254: Fix for ETHREEOH-1351: Schemas containing an enumeration with an empty string ...
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.0:r13219
      Merged /alfresco/BRANCHES/V3.1:r13218-13220,13224,13226-13229,13231-13232,13234-13237,13239,13241,13243-13248,13250,13252-13254


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13612 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-12 20:51:43 +00:00
parent 63f3fe9fb0
commit f608dc00e6
6 changed files with 118 additions and 80 deletions

View File

@@ -311,70 +311,78 @@ public class CheckinCheckoutDialog extends BaseDialogBean
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0)
try
{
boolean editingInline = false;
Node node = setupContentDocument(id);
if (id != null && id.length() != 0)
{
boolean editingInline = false;
Node node = setupContentDocument(id);
if (node.hasAspect(WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
{
editingInline = true;
if (node.hasAspect(WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
{
editingInline = true;
// editable form document
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
// editable form document
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
// TODO - rename editContent Wizard since it only deals with editing form content
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "wizard:editContent");
}
// TODO - rename editContent Wizard since it only deals with editing form content
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "wizard:editContent");
}
// detect the inline editing aspect to see which edit mode to use
else if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) &&
node.getProperties().get(ApplicationModel.PROP_EDITINLINE) != null &&
((Boolean)node.getProperties().get(ApplicationModel.PROP_EDITINLINE)).booleanValue() == true)
{
// retrieve the content reader for this node
ContentReader reader = property.getContentService().getReader(node.getNodeRef(), ContentModel.PROP_CONTENT);
if (reader != null)
{
editingInline = true;
String mimetype = reader.getMimetype();
// detect the inline editing aspect to see which edit mode to use
else if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) &&
node.getProperties().get(ApplicationModel.PROP_EDITINLINE) != null &&
((Boolean)node.getProperties().get(ApplicationModel.PROP_EDITINLINE)).booleanValue() == true)
{
// retrieve the content reader for this node
ContentReader reader = property.getContentService().getReader(node.getNodeRef(), ContentModel.PROP_CONTENT);
if (reader != null)
{
editingInline = true;
String mimetype = reader.getMimetype();
// calculate which editor screen to display
if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) ||
MimetypeMap.MIMETYPE_XML.equals(mimetype) ||
MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) ||
MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
{
// make content available to the text editing screen
property.setEditorOutput(reader.getContentString());
// calculate which editor screen to display
if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) ||
MimetypeMap.MIMETYPE_XML.equals(mimetype) ||
MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) ||
MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
{
// make content available to the text editing screen
property.setEditorOutput(reader.getContentString());
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editTextInline");
}
else
{
// make content available to the html editing screen
property.setDocumentContent(reader.getContentString());
property.setEditorOutput(null);
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editTextInline");
}
else
{
// make content available to the html editing screen
property.setDocumentContent(reader.getContentString());
property.setEditorOutput(null);
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editHtmlInline");
}
}
}
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editHtmlInline");
}
}
}
if (editingInline == false)
{
// normal downloadable document
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editFile");
}
if (editingInline == false)
{
// normal downloadable document
FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editFile");
}
}
}
catch (InvalidNodeRefException refErr)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {id}) );
}
}