mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
getting creating of html and text assets to working in createwebcontentwizard again (i thought we'd removed this feature). guess not...
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4544 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -332,9 +332,15 @@
|
|||||||
instruction-id="default_instruction" />
|
instruction-id="default_instruction" />
|
||||||
</step>
|
</step>
|
||||||
<step name="summary" title-id="summary" description-id="summary_step_description">
|
<step name="summary" title-id="summary" description-id="summary_step_description">
|
||||||
<page path="/jsp/wcm/create-web-content-wizard/summary.jsp"
|
<condition if="#{CreateWebContentWizard.mimeType == 'text/xml'}">
|
||||||
|
<page path="/jsp/wcm/create-web-content-wizard/summary.jsp"
|
||||||
|
title-id="summary"
|
||||||
|
description-id="create_web_content_summary_desc"
|
||||||
|
instruction-id="content_finish_instruction" />
|
||||||
|
</condition>
|
||||||
|
<page path="/jsp/wizard/summary.jsp"
|
||||||
title-id="summary"
|
title-id="summary"
|
||||||
description-id="create_web_content_summary_desc"
|
description-id="summary_desc"
|
||||||
instruction-id="content_finish_instruction" />
|
instruction-id="content_finish_instruction" />
|
||||||
</step>
|
</step>
|
||||||
</wizard>
|
</wizard>
|
||||||
|
@@ -19,9 +19,11 @@ package org.alfresco.web.bean.wcm;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.faces.event.ValueChangeEvent;
|
import javax.faces.event.ValueChangeEvent;
|
||||||
@@ -215,7 +217,8 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
protected String finishImpl(final FacesContext context, final String outcome)
|
protected String finishImpl(final FacesContext context, final String outcome)
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
final List<AVMDifference> diffList = new ArrayList<AVMDifference>(1 + this.renditions.size());
|
final List<AVMDifference> diffList =
|
||||||
|
new ArrayList<AVMDifference>(1 + this.renditions.size());
|
||||||
diffList.add(new AVMDifference(-1, this.createdPath,
|
diffList.add(new AVMDifference(-1, this.createdPath,
|
||||||
-1, this.createdPath.replaceFirst(AVMConstants.STORE_PREVIEW,
|
-1, this.createdPath.replaceFirst(AVMConstants.STORE_PREVIEW,
|
||||||
AVMConstants.STORE_MAIN),
|
AVMConstants.STORE_MAIN),
|
||||||
@@ -334,11 +337,6 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (LOGGER.isDebugEnabled())
|
|
||||||
LOGGER.debug("************* not starting workflow");
|
|
||||||
}
|
|
||||||
|
|
||||||
// return the default outcome
|
// return the default outcome
|
||||||
return outcome;
|
return outcome;
|
||||||
@@ -370,6 +368,7 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
final FormsService fs = FormsService.getInstance();
|
final FormsService fs = FormsService.getInstance();
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("saving file content to " + this.fileName);
|
LOGGER.debug("saving file content to " + this.fileName);
|
||||||
|
|
||||||
// get the parent path of the location to save the content
|
// get the parent path of the location to save the content
|
||||||
String path = this.avmBrowseBean.getCurrentPath();
|
String path = this.avmBrowseBean.getCurrentPath();
|
||||||
path = path.replaceFirst(AVMConstants.STORE_MAIN, AVMConstants.STORE_PREVIEW);
|
path = path.replaceFirst(AVMConstants.STORE_MAIN, AVMConstants.STORE_PREVIEW);
|
||||||
@@ -384,7 +383,8 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("reseting layer " + path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE);
|
LOGGER.debug("reseting layer " + path.split(":")[0] +
|
||||||
|
":/" + AVMConstants.DIR_APPBASE);
|
||||||
|
|
||||||
this.avmSyncService.resetLayer(path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE);
|
this.avmSyncService.resetLayer(path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE);
|
||||||
|
|
||||||
@@ -409,13 +409,17 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>(1, 1.0f);
|
Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>(1, 1.0f);
|
||||||
titledProps.put(ContentModel.PROP_TITLE, this.fileName);
|
titledProps.put(ContentModel.PROP_TITLE, this.fileName);
|
||||||
this.nodeService.addAspect(formInstanceDataNodeRef, ContentModel.ASPECT_TITLED, titledProps);
|
this.nodeService.addAspect(formInstanceDataNodeRef, ContentModel.ASPECT_TITLED, titledProps);
|
||||||
this.formInstanceData = new FormInstanceDataImpl(formInstanceDataNodeRef);
|
|
||||||
|
|
||||||
if (MimetypeMap.MIMETYPE_XML.equals(this.mimeType) && this.formName != null)
|
if (MimetypeMap.MIMETYPE_XML.equals(this.mimeType) && this.formName != null)
|
||||||
{
|
{
|
||||||
|
this.formInstanceData = new FormInstanceDataImpl(formInstanceDataNodeRef);
|
||||||
this.getForm().registerFormInstanceData(formInstanceDataNodeRef);
|
this.getForm().registerFormInstanceData(formInstanceDataNodeRef);
|
||||||
this.renditions = FormsService.getInstance().generateRenditions(formInstanceDataNodeRef);
|
this.renditions = FormsService.getInstance().generateRenditions(formInstanceDataNodeRef);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.renditions = Collections.EMPTY_LIST;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -596,6 +600,25 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
return this.startWorkflow;
|
return this.startWorkflow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSummary()
|
||||||
|
{
|
||||||
|
final ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
|
||||||
|
|
||||||
|
// TODO: show first few lines of content here?
|
||||||
|
return this.buildSummary(
|
||||||
|
new String[]
|
||||||
|
{
|
||||||
|
bundle.getString("file_name"),
|
||||||
|
bundle.getString("type"),
|
||||||
|
bundle.getString("content_type")
|
||||||
|
},
|
||||||
|
new String[]
|
||||||
|
{
|
||||||
|
this.fileName,
|
||||||
|
this.getSummaryObjectType(),
|
||||||
|
this.getSummaryMimeType(this.mimeType)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Action event handlers
|
// Action event handlers
|
||||||
|
Reference in New Issue
Block a user