mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- removing filename attribute from rendering engine, wasn't working properly and redundant with name property
- misc ui fixes per usability meeting this morning - using action node path in XFormsBean since current path isn't reliable in workflow context - getting location column to work in manage task screen. had to use actioncontext.id for wcm actions since path can be a Path object in workflow screens - adding property resolvers to AVMNode for common props git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4731 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -239,8 +239,8 @@ remove_user=Remove User
|
||||
create_space=Create Space
|
||||
add_content=Add Content
|
||||
create_content=Create Content
|
||||
create_form=Create Form
|
||||
edit_form=Edit Form
|
||||
create_form=Create Web Form
|
||||
edit_form=Edit Web Form
|
||||
add_multiple_files=Add Multiple Files
|
||||
import_directory=Import Directory
|
||||
advanced_space_wizard=Advanced Space Wizard
|
||||
@@ -653,23 +653,30 @@ content=Content
|
||||
text_content=Plain Text Content
|
||||
html_content=HTML Content
|
||||
xml_content=XML Content
|
||||
create_form_title=Create Form Wizard
|
||||
edit_form_title=Edit Form Wizard
|
||||
create_form_title=Create Web Form Wizard
|
||||
edit_form_title=Edit Web Form Wizard
|
||||
create_form_desc=This wizard helps you create a new form.
|
||||
edit_form_desc=This wizard helps you edit a form.
|
||||
create_form_form_details_title=Step One - Specify details
|
||||
create_form_form_details_title=Web Form Details
|
||||
create_form_form_details_step_title=Step One - Web Form Details
|
||||
create_form_form_details_desc=Enter information about the web form you want to create.
|
||||
create_form_form_details_step1_desc=Select XML schema to use
|
||||
create_form_form_details_step2_desc=Specify details for new form.
|
||||
create_form_form_details_no_schema_selected=<no schema selected>
|
||||
create_form_configure_rendering_engine_templates_title=Step Two - Configure rendering engine templates
|
||||
create_form_configure_rendering_engine_templates_title=Configure Templates
|
||||
create_form_configure_rendering_engine_templates_step_title=Step Two - Configure Templates
|
||||
create_form_configure_rendering_engine_templates_desc=Enter information about the rendering engine templates you want to use for form {0}.
|
||||
create_form_configure_rendering_engine_templates_step1_desc=Select the rendering engine template to use
|
||||
create_form_configure_rendering_engine_templates_step2_desc=Specify details for the new rendering engine template
|
||||
create_form_select_default_workflow_title=Stop Three - Select default workflow
|
||||
create_form_select_default_workflow_title=Configure Workflow
|
||||
create_form_select_default_workflow_step_title=Step Three - Configure Workflow
|
||||
create_form_select_default_workflow_desc=Select the workflow you want to be used by default for form {0}.
|
||||
create_form_select_default_workflow_apply_default_workflow=Do you want to apply a default workflow now?
|
||||
create_form_select_default_workflow_select_workflow=Select a workflow
|
||||
create_web_content_details_title=Web Content Details
|
||||
create_web_content_details_title=Step One - Web Content Details
|
||||
create_web_content_enter_content_title=Author Web Content
|
||||
create_web_content_enter_content_step_title=Step Two - Web Content Details
|
||||
create_web_content_summary_desc=The wizard has successfully created the content and all renditions.
|
||||
create_web_content_summary_content_details=Content Details
|
||||
create_web_content_summary_rendition_details=Rendition Details
|
||||
@@ -953,6 +960,7 @@ delete_folder=Delete Folder
|
||||
delete_avm_folder_info=To remove this folder and its contents from the sandbox, click OK.
|
||||
delete_avm_folder_confirm=Are you sure you want to remove \"{0}\" and its contents from the sandbox?
|
||||
error_delete_folder=Unable to delete Folder due to system error:
|
||||
create_web_content=Create Web Content
|
||||
create_web_content_title=Create Web Content Wizard
|
||||
create_web_content_desc=This wizard helps you to create a new content item for a website.
|
||||
create_folder=Create Folder
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<image>/images/icons/edit_icon.gif</image>
|
||||
<action-listener>#{AVMEditBean.setupEditAction}</action-listener>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:deleteAvmFile</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:deleteAvmFileBrowse</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:deleteAvmFolder</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:deleteAvmFolderBrowse</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:submitSandboxItems</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<image>/images/icons/revert.gif</image>
|
||||
<action-listener>#{AVMBrowseBean.revertNode}</action-listener>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:updateAvmFile</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:showFileDetails</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
<action-listener>#{AVMBrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:showFolderDetails</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.path}</param>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
@@ -306,28 +306,32 @@
|
||||
<wizard name="createWebContent" managed-bean="CreateWebContentWizard"
|
||||
title-id="create_web_content_title" description-id="create_web_content_desc"
|
||||
icon="/images/icons/new_content_large.gif">
|
||||
<step name="details" title-id="details" description-id="create_content_step1_desc">
|
||||
<step name="details"
|
||||
title-id="create_web_content_details_title"
|
||||
description-id="create_content_step1_desc">
|
||||
<page path="/jsp/wcm/create-web-content-wizard/details.jsp"
|
||||
title-id="create_content_step1_title"
|
||||
title-id="create_web_content_details_step_title"
|
||||
description-id="create_content_step1_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="content" title-id="enter_content" description-id="create_content_step2_desc">
|
||||
<step name="content"
|
||||
title-id="create_web_content_enter_content_title"
|
||||
description-id="create_content_step2_desc">
|
||||
<condition if="#{CreateWebContentWizard.mimeType == 'text/html'}">
|
||||
<page path="/jsp/wcm/create-web-content-wizard/create-html.jsp"
|
||||
title-id="create_content_step2_title"
|
||||
title-id="create_web_content_enter_content_step_title"
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</condition>
|
||||
<condition if="#{CreateWebContentWizard.mimeType == 'text/xml'}">
|
||||
<page path="/jsp/wcm/create-web-content-wizard/create-xml.jsp"
|
||||
title-id="create_content_step2_title"
|
||||
title-id="create_web_content_enter_content_step_title"
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</condition>
|
||||
<!-- Default to the inline text editor -->
|
||||
<page path="/jsp/wcm/create-web-content-wizard/create-text.jsp"
|
||||
title-id="create_content_step2_title"
|
||||
title-id="create_web_content_enter_content_step_title"
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -352,7 +356,7 @@
|
||||
<step name="form_details" title-id="create_form_form_details_title"
|
||||
description-id="create_form_form_details_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/details.jsp"
|
||||
title-id="create_form_form_details_title"
|
||||
title-id="create_form_form_details_step_title"
|
||||
description-id="create_form_form_details_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -360,7 +364,7 @@
|
||||
title-id="create_form_configure_rendering_engine_templates_title"
|
||||
description-id="create_form_configure_rendering_engine_templates_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp"
|
||||
title-id="create_form_configure_rendering_engine_templates_title"
|
||||
title-id="create_form_configure_rendering_engine_templates_step_title"
|
||||
description-id="create_form_configure_rendering_engine_templates_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -368,7 +372,7 @@
|
||||
title-id="create_form_select_default_workflow_title"
|
||||
description-id="create_form_select_default_workflow_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp"
|
||||
title-id="create_form_select_default_workflow_title"
|
||||
title-id="create_form_select_default_workflow_step_title"
|
||||
description-id="create_form_select_default_workflow_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -387,7 +391,7 @@
|
||||
<step name="form_details" title-id="create_form_form_details_title"
|
||||
description-id="create_form_form_details_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/details.jsp"
|
||||
title-id="create_form_form_details_title"
|
||||
title-id="create_form_form_details_step_title"
|
||||
description-id="create_form_form_details_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -395,7 +399,7 @@
|
||||
title-id="create_form_configure_rendering_engine_templates_title"
|
||||
description-id="create_form_configure_rendering_engine_templates_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp"
|
||||
title-id="create_form_configure_rendering_engine_templates_title"
|
||||
title-id="create_form_configure_rendering_engine_templates_step_title"
|
||||
description-id="create_form_configure_rendering_engine_templates_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
@@ -403,7 +407,7 @@
|
||||
title-id="create_form_select_default_workflow_title"
|
||||
description-id="create_form_select_default_workflow_desc">
|
||||
<page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp"
|
||||
title-id="create_form_select_default_workflow_title"
|
||||
title-id="create_form_select_default_workflow_step_title"
|
||||
description-id="create_form_select_default_workflow_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
|
@@ -184,9 +184,6 @@
|
||||
<action idref="revert" />
|
||||
<action idref="preview_file" />
|
||||
<action idref="file_details" />
|
||||
<action idref="workflow_checkout_doc" />
|
||||
<action idref="workflow_checkin_doc" />
|
||||
<action idref="workflow_cancelcheckout_doc" />
|
||||
</action-group>
|
||||
|
||||
<action-group id="remove_package_item_actions">
|
||||
@@ -218,9 +215,6 @@
|
||||
<action idref="revert" />
|
||||
<action idref="preview_file" />
|
||||
<action idref="file_details" />
|
||||
<action idref="workflow_checkout_doc" />
|
||||
<action idref="workflow_checkin_doc" />
|
||||
<action idref="workflow_cancelcheckout_doc" />
|
||||
<action idref="remove_package_item" />
|
||||
</action-group>
|
||||
|
||||
|
@@ -629,15 +629,11 @@ public class AVMBrowseBean implements IContextListener
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
String dns = AVMConstants.lookupStoreDNS(getSandbox());
|
||||
int rootPathIndex = AVMConstants.buildSandboxRootPath(getSandbox()).length();
|
||||
|
||||
Map<String, AVMNodeDescriptor> nodes = this.avmService.getDirectoryListing(-1, getCurrentPath());
|
||||
this.files = new ArrayList<Map>(nodes.size());
|
||||
this.folders = new ArrayList<Map>(nodes.size());
|
||||
ClientConfigElement config = Application.getClientConfig(context);
|
||||
String wcmDomain = config.getWCMDomain();
|
||||
String wcmPort = config.getWCMPort();
|
||||
for (String name : nodes.keySet())
|
||||
{
|
||||
AVMNodeDescriptor avmRef = nodes.get(name);
|
||||
@@ -661,9 +657,7 @@ public class AVMBrowseBean implements IContextListener
|
||||
}
|
||||
|
||||
// common properties
|
||||
String assetPath = path.substring(rootPathIndex);
|
||||
String previewUrl = AVMConstants.buildAssetUrl(assetPath, wcmDomain, wcmPort, dns);
|
||||
node.getProperties().put("previewUrl", previewUrl);
|
||||
node.addPropertyResolver("previewUrl", AVMNode.RESOLVER_PREVIEW_URL);
|
||||
}
|
||||
|
||||
// commit the transaction
|
||||
|
@@ -62,6 +62,7 @@ import org.w3c.dom.Document;
|
||||
/**
|
||||
* Bean backing the edit pages for a AVM node content.
|
||||
*
|
||||
* @author Ariel Backenroth
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class AVMEditBean
|
||||
|
@@ -19,13 +19,18 @@ package org.alfresco.web.bean.wcm;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.NodePropertyResolver;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
|
||||
/**
|
||||
* Node class representing an AVM specific Node.
|
||||
@@ -37,8 +42,57 @@ import org.alfresco.web.bean.repository.Node;
|
||||
*/
|
||||
public class AVMNode extends Node implements Map<String, Object>
|
||||
{
|
||||
|
||||
public final static NodePropertyResolver RESOLVER_PREVIEW_URL =
|
||||
new NodePropertyResolver()
|
||||
{
|
||||
public Object get(final Node node)
|
||||
{
|
||||
if (! (node instanceof AVMNode))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
final ClientConfigElement config =
|
||||
Application.getClientConfig(FacesContext.getCurrentInstance());
|
||||
final String dns =
|
||||
AVMConstants.lookupStoreDNS(AVMConstants.getStoreName(node.getPath()));
|
||||
return AVMConstants.buildAssetUrl(AVMConstants.getSandboxRelativePath(node.getPath()),
|
||||
config.getWCMDomain(),
|
||||
config.getWCMPort(),
|
||||
dns);
|
||||
}
|
||||
};
|
||||
|
||||
public final static NodePropertyResolver RESOLVER_SANDBOX_RELATIVE_PATH =
|
||||
new NodePropertyResolver()
|
||||
{
|
||||
public Object get(final Node node)
|
||||
{
|
||||
if (! (node instanceof AVMNode))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
String s = node.getPath();
|
||||
s = AVMConstants.getSandboxRelativePath(s);
|
||||
final Path result = new Path();
|
||||
final String[] parts = s.split("/");
|
||||
for (int i = 1; i < parts.length; i++)
|
||||
{
|
||||
if (parts[i].length() != 0)
|
||||
{
|
||||
final String s2 = parts[i];
|
||||
result.append(new Path.Element()
|
||||
{
|
||||
public String getElementString() { return s2; }
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private AVMNodeDescriptor avmRef;
|
||||
private String path;
|
||||
private int version;
|
||||
private boolean deleted = false;
|
||||
|
||||
@@ -48,13 +102,12 @@ public class AVMNode extends Node implements Map<String, Object>
|
||||
*
|
||||
* @param avmRef The AVMNodeDescriptor that describes this node
|
||||
*/
|
||||
public AVMNode(AVMNodeDescriptor avmRef)
|
||||
public AVMNode(final AVMNodeDescriptor avmRef)
|
||||
{
|
||||
super(AVMNodeConverter.ToNodeRef(-1, avmRef.getPath()));
|
||||
this.avmRef = avmRef;
|
||||
this.version = -1; // TODO: always -1 for now...
|
||||
this.path = avmRef.getPath();
|
||||
this.id = this.path;
|
||||
this.id = avmRef.getPath();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,17 +122,19 @@ public class AVMNode extends Node implements Map<String, Object>
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public final String getPath()
|
||||
@Override
|
||||
public String getPath()
|
||||
{
|
||||
return this.path;
|
||||
return this.avmRef.getPath();
|
||||
}
|
||||
|
||||
public final int getVersion()
|
||||
public int getVersion()
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public final String getName()
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.avmRef.getName();
|
||||
}
|
||||
@@ -97,13 +152,13 @@ public class AVMNode extends Node implements Map<String, Object>
|
||||
/**
|
||||
* @return All the properties known about this node.
|
||||
*/
|
||||
public final Map<String, Object> getProperties()
|
||||
public Map<String, Object> getProperties()
|
||||
{
|
||||
if (this.propsRetrieved == false)
|
||||
if (!this.propsRetrieved)
|
||||
{
|
||||
if (this.deleted == false)
|
||||
if (!this.deleted)
|
||||
{
|
||||
Map<QName, PropertyValue> props = getServiceRegistry().getAVMService().getNodeProperties(this.version, this.path);
|
||||
Map<QName, PropertyValue> props = getServiceRegistry().getAVMService().getNodeProperties(this.version, this.id);
|
||||
for (QName qname: props.keySet())
|
||||
{
|
||||
PropertyValue propValue = props.get(qname);
|
||||
@@ -111,8 +166,7 @@ public class AVMNode extends Node implements Map<String, Object>
|
||||
}
|
||||
}
|
||||
|
||||
this.properties.put("id", this.path);
|
||||
this.properties.put("path", this.path);
|
||||
this.properties.put("id", this.id);
|
||||
this.properties.put("size", this.avmRef.getLength());
|
||||
this.properties.put("name", this.avmRef.getName());
|
||||
this.properties.put("created", this.avmRef.getCreateDate());
|
||||
|
@@ -86,7 +86,6 @@ public class CreateFormWizard
|
||||
public class RenderingEngineTemplateData
|
||||
implements Serializable
|
||||
{
|
||||
private final String fileName;
|
||||
private final NodeRef nodeRef;
|
||||
private final File file;
|
||||
private final String name;
|
||||
@@ -100,7 +99,6 @@ public class CreateFormWizard
|
||||
{
|
||||
this.file = null;
|
||||
this.nodeRef = ((RenderingEngineTemplateImpl)ret).getNodeRef();
|
||||
this.fileName = ret.getName();
|
||||
this.name = ret.getName();
|
||||
this.title = ret.getTitle();
|
||||
this.description = ret.getDescription();
|
||||
@@ -109,8 +107,7 @@ public class CreateFormWizard
|
||||
this.renderingEngine = ret.getRenderingEngine();
|
||||
}
|
||||
|
||||
public RenderingEngineTemplateData(final String fileName,
|
||||
final File file,
|
||||
public RenderingEngineTemplateData(final File file,
|
||||
final String name,
|
||||
final String title,
|
||||
final String description,
|
||||
@@ -119,7 +116,6 @@ public class CreateFormWizard
|
||||
final RenderingEngine renderingEngine)
|
||||
{
|
||||
this.nodeRef = null;
|
||||
this.fileName = fileName;
|
||||
this.file = file;
|
||||
this.name = name;
|
||||
this.title = title;
|
||||
@@ -139,11 +135,6 @@ public class CreateFormWizard
|
||||
return this.mimetypeForRendition;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public File getFile()
|
||||
{
|
||||
return this.file;
|
||||
@@ -177,7 +168,7 @@ public class CreateFormWizard
|
||||
public String toString()
|
||||
{
|
||||
return (this.getClass().getName() + "{" +
|
||||
"fileName: " + this.getFileName() + "," +
|
||||
"name: " + this.getName() + "," +
|
||||
"mimetypeForRendition: " + this.getMimetypeForRendition() + "," +
|
||||
"outputPathPatternForRendition: " + this.getOutputPathPatternForRendition() + "," +
|
||||
"renderingEngine: " + this.getRenderingEngine().getName() +
|
||||
@@ -529,8 +520,7 @@ public class CreateFormWizard
|
||||
}
|
||||
}
|
||||
final RenderingEngineTemplateData data =
|
||||
this.new RenderingEngineTemplateData(this.getRenderingEngineTemplateFileName(),
|
||||
this.getRenderingEngineTemplateFile(),
|
||||
this.new RenderingEngineTemplateData(this.getRenderingEngineTemplateFile(),
|
||||
this.getRenderingEngineTemplateName(),
|
||||
this.getRenderingEngineTemplateTitle(),
|
||||
this.getRenderingEngineTemplateDescription(),
|
||||
@@ -727,35 +717,6 @@ public class CreateFormWizard
|
||||
return this.mimetypeChoices;
|
||||
}
|
||||
|
||||
private FileUploadBean getFileUploadBean(final String id)
|
||||
{
|
||||
final FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
final Map sessionMap = ctx.getExternalContext().getSessionMap();
|
||||
return (FileUploadBean)sessionMap.get(FileUploadBean.getKey(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the name of the file
|
||||
*/
|
||||
private String getFileName(final String id)
|
||||
{
|
||||
// try and retrieve the file and filename from the file upload bean
|
||||
// representing the file we previously uploaded.
|
||||
final FileUploadBean fileBean = this.getFileUploadBean(id);
|
||||
return fileBean == null ? null : fileBean.getFileName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the schema file or <tt>null</tt>
|
||||
*/
|
||||
private File getFile(final String id)
|
||||
{
|
||||
// try and retrieve the file and filename from the file upload bean
|
||||
// representing the file we previously uploaded.
|
||||
final FileUploadBean fileBean = this.getFileUploadBean(id);
|
||||
return fileBean != null ? fileBean.getFile() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the schema file or <tt>null</tt>
|
||||
*/
|
||||
@@ -927,7 +888,7 @@ public class CreateFormWizard
|
||||
public String getRenderingEngineTemplateName()
|
||||
{
|
||||
return (this.renderingEngineTemplateName == null && this.getRenderingEngineTemplateFileName() != null
|
||||
? FilenameUtils.removeExtension(this.getRenderingEngineTemplateFileName())
|
||||
? this.getRenderingEngineTemplateFileName()
|
||||
: this.renderingEngineTemplateName);
|
||||
}
|
||||
/**
|
||||
@@ -1056,13 +1017,42 @@ public class CreateFormWizard
|
||||
protected void clearUpload(final String id)
|
||||
{
|
||||
// remove the file upload bean from the session
|
||||
FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
FileUploadBean fileBean =
|
||||
(FileUploadBean)ctx.getExternalContext().getSessionMap().get(FileUploadBean.getKey(id));
|
||||
final FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
FileUploadBean fileBean = (FileUploadBean)
|
||||
ctx.getExternalContext().getSessionMap().get(FileUploadBean.getKey(id));
|
||||
if (fileBean != null)
|
||||
{
|
||||
fileBean.setFile(null);
|
||||
fileBean.setFileName(null);
|
||||
}
|
||||
}
|
||||
|
||||
private FileUploadBean getFileUploadBean(final String id)
|
||||
{
|
||||
final FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
final Map sessionMap = ctx.getExternalContext().getSessionMap();
|
||||
return (FileUploadBean)sessionMap.get(FileUploadBean.getKey(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the name of the file
|
||||
*/
|
||||
private String getFileName(final String id)
|
||||
{
|
||||
// try and retrieve the file and filename from the file upload bean
|
||||
// representing the file we previously uploaded.
|
||||
final FileUploadBean fileBean = this.getFileUploadBean(id);
|
||||
return fileBean == null ? null : fileBean.getFileName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the schema file or <tt>null</tt>
|
||||
*/
|
||||
private File getFile(final String id)
|
||||
{
|
||||
// try and retrieve the file and filename from the file upload bean
|
||||
// representing the file we previously uploaded.
|
||||
final FileUploadBean fileBean = this.getFileUploadBean(id);
|
||||
return fileBean != null ? fileBean.getFile() : null;
|
||||
}
|
||||
}
|
||||
|
@@ -34,9 +34,7 @@ import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.NodePropertyResolver;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.TransientNode;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.alfresco.web.bean.wcm.AVMNode;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
import org.alfresco.web.config.DialogsConfigElement.DialogButtonConfig;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||
@@ -126,7 +124,14 @@ public class ManageTaskDialog extends BaseDialogBean
|
||||
{
|
||||
LOGGER.debug("Task: " + this.task);
|
||||
LOGGER.debug("Trasient node: " + this.taskNode);
|
||||
LOGGER.debug("Workflow package: " + this.workflowPackage );
|
||||
Boolean isSystemPackage = (Boolean)
|
||||
this.nodeService.getProperty(this.workflowPackage,
|
||||
WorkflowModel.PROP_IS_SYSTEM_PACKAGE);
|
||||
LOGGER.debug("Workflow package: " + this.workflowPackage +
|
||||
" system package: " + isSystemPackage);
|
||||
boolean isWCMWorkflow =
|
||||
this.task.properties.get(AVMWorkflowUtil.PROP_FROM_PATH) != null;
|
||||
LOGGER.debug("is wcm workflow: " + isWCMWorkflow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -537,8 +542,7 @@ public class ManageTaskDialog extends BaseDialogBean
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
if ((Boolean)this.nodeService.getProperty(this.workflowPackage,
|
||||
WorkflowModel.PROP_IS_SYSTEM_PACKAGE))
|
||||
if (this.task.properties.get(AVMWorkflowUtil.PROP_FROM_PATH) != null)
|
||||
{
|
||||
final NodeRef stagingNodeRef = (NodeRef)
|
||||
this.nodeService.getProperty(this.workflowPackage,
|
||||
@@ -689,39 +693,9 @@ public class ManageTaskDialog extends BaseDialogBean
|
||||
{
|
||||
LOGGER.debug("adding node " + node);
|
||||
node.getProperties().put("taskId", this.task.id);
|
||||
final ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
|
||||
final String dns = AVMConstants.lookupStoreDNS(AVMConstants.getStoreName(node.getPath()));
|
||||
node.getProperties().put("previewUrl",
|
||||
AVMConstants.buildAssetUrl(AVMConstants.getSandboxRelativePath(node.getPath()),
|
||||
config.getWCMDomain(),
|
||||
config.getWCMPort(),
|
||||
dns));
|
||||
|
||||
this.browseBean.setupCommonBindingProperties(node);
|
||||
final String packagePath = AVMNodeConverter.ToAVMVersionPath(this.workflowPackage).getSecond();
|
||||
NodePropertyResolver resolverPath = new NodePropertyResolver()
|
||||
{
|
||||
public Object get(Node node)
|
||||
{
|
||||
Path result = new Path();
|
||||
String s = node.getPath();
|
||||
s = s.substring(packagePath.length());
|
||||
for (final String s2 : s.split("/"))
|
||||
{
|
||||
if (s2.length() != 0)
|
||||
{
|
||||
result.append(new Path.Element()
|
||||
{
|
||||
public String getElementString() { return s2; }
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
// node.remove("path");
|
||||
// node.addPropertyResolver("path", resolverPath);
|
||||
// node.addPropertyResolver("displayPath", resolverPath);
|
||||
node.addPropertyResolver("path", AVMNode.RESOLVER_SANDBOX_RELATIVE_PATH);
|
||||
node.addPropertyResolver("previewUrl", AVMNode.RESOLVER_PREVIEW_URL);
|
||||
this.resources.add(node);
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,7 @@ import org.alfresco.web.bean.FileUploadBean;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.AVMBrowseBean;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.alfresco.web.bean.wcm.AVMNode;
|
||||
import org.alfresco.web.forms.*;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
|
||||
@@ -426,12 +427,12 @@ public class XFormsBean
|
||||
String currentPath = (String)requestParameters.get("currentPath");
|
||||
if (currentPath == null)
|
||||
{
|
||||
currentPath = this.avmBrowseBean.getCurrentPath();
|
||||
currentPath = this.getCurrentAVMPath();
|
||||
}
|
||||
else
|
||||
{
|
||||
final String previewStorePath =
|
||||
AVMConstants.getCorrespondingPathInPreviewStore(this.avmBrowseBean.getCurrentPath());
|
||||
AVMConstants.getCorrespondingPathInPreviewStore(this.getCurrentAVMPath());
|
||||
currentPath = AVMConstants.buildPath(previewStorePath,
|
||||
currentPath,
|
||||
AVMConstants.PathRelation.WEBAPP_RELATIVE);
|
||||
@@ -449,7 +450,7 @@ public class XFormsBean
|
||||
final Element errorElement = result.createElement("error");
|
||||
errorElement.appendChild(result.createTextNode("Path " + currentPath + " not found"));
|
||||
filePickerDataElement.appendChild(errorElement);
|
||||
currentPath = this.avmBrowseBean.getCurrentPath();
|
||||
currentPath = this.getCurrentAVMPath();
|
||||
}
|
||||
else if (! currentNode.isDirectory())
|
||||
{
|
||||
@@ -515,7 +516,7 @@ public class XFormsBean
|
||||
else if (item.isFormField() && item.getFieldName().equals("currentPath"))
|
||||
{
|
||||
final String previewStorePath =
|
||||
AVMConstants.getCorrespondingPathInPreviewStore(this.avmBrowseBean.getCurrentPath());
|
||||
AVMConstants.getCorrespondingPathInPreviewStore(this.getCurrentAVMPath());
|
||||
currentPath = AVMConstants.buildPath(previewStorePath,
|
||||
item.getString(),
|
||||
AVMConstants.PathRelation.WEBAPP_RELATIVE);
|
||||
@@ -709,7 +710,7 @@ public class XFormsBean
|
||||
private Document getXFormsDocument()
|
||||
throws FormBuilderException
|
||||
{
|
||||
final String cwdAVMPath = this.avmBrowseBean.getCurrentPath();
|
||||
final String cwdAVMPath = this.getCurrentAVMPath();
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
@@ -748,4 +749,11 @@ public class XFormsBean
|
||||
throw new FormBuilderException(saxe);
|
||||
}
|
||||
}
|
||||
|
||||
private String getCurrentAVMPath()
|
||||
{
|
||||
final AVMNode node = this.avmBrowseBean.getAvmActionNode();
|
||||
final String result = node.getPath();
|
||||
return node.isDirectory() ? result : AVMNodeConverter.SplitBase(result)[0];
|
||||
}
|
||||
}
|
||||
|
@@ -29,13 +29,13 @@
|
||||
<script type="text/javascript">
|
||||
function upload_file(el)
|
||||
{
|
||||
el.form.method = "post";
|
||||
el.form.enctype = "multipart/form-data";
|
||||
// for IE
|
||||
el.form.encoding = "multipart/form-data";
|
||||
el.form.action = "<%= request.getContextPath() %>/uploadFileServlet";
|
||||
el.form.submit();
|
||||
return false;
|
||||
el.form.method = "post";
|
||||
el.form.enctype = "multipart/form-data";
|
||||
// for IE
|
||||
el.form.encoding = "multipart/form-data";
|
||||
el.form.action = "<%= request.getContextPath() %>/uploadFileServlet";
|
||||
el.form.submit();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</f:verbatim>
|
||||
@@ -54,37 +54,37 @@
|
||||
<h:outputText id="output_text_rendering_engine_template_file"
|
||||
value="#{msg.rendering_engine_template_file}:"/>
|
||||
<h:column id="column_pt">
|
||||
<%
|
||||
final FileUploadBean upload = (FileUploadBean)
|
||||
session.getAttribute(FileUploadBean.getKey(CreateFormWizard.FILE_RENDERING_ENGINE_TEMPLATE));
|
||||
if (upload == null || upload.getFile() == null)
|
||||
{
|
||||
%>
|
||||
<%
|
||||
final FileUploadBean upload = (FileUploadBean)
|
||||
session.getAttribute(FileUploadBean.getKey(CreateFormWizard.FILE_RENDERING_ENGINE_TEMPLATE));
|
||||
if (upload == null || upload.getFile() == null)
|
||||
{
|
||||
%>
|
||||
|
||||
<f:verbatim>
|
||||
<input type="hidden" name="upload-id" value="<%= CreateFormWizard.FILE_RENDERING_ENGINE_TEMPLATE %>"/>
|
||||
<input type="hidden" name="return-page" value="<%= request.getContextPath() %>/faces<%= request.getServletPath() %>"/>
|
||||
<input id="wizard:wizard-body:file-input" type="file" size="35" name="alfFileInput" onchange="javascript:upload_file(this)"/>
|
||||
</f:verbatim>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<h:outputText id="rendering-engine-template-file-name"
|
||||
value="#{WizardManager.bean.renderingEngineTemplateFileName}"/>
|
||||
<h:outputText id="output_text_rendering_engine_template_space"
|
||||
value=" "
|
||||
escape="false"/>
|
||||
<a:actionLink id="action_link_remove_rendering_engine_template"
|
||||
image="/images/icons/delete.gif"
|
||||
value="#{msg.remove}"
|
||||
action="#{WizardManager.bean.removeUploadedRenderingEngineTemplateFile}"
|
||||
showLink="false"
|
||||
target="top"/>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<h:outputText id="rendering-engine-template-file-name"
|
||||
value="#{WizardManager.bean.renderingEngineTemplateFileName}"/>
|
||||
<h:outputText id="output_text_rendering_engine_template_space"
|
||||
value=" "
|
||||
escape="false"/>
|
||||
<a:actionLink id="action_link_remove_rendering_engine_template"
|
||||
image="/images/icons/delete.gif"
|
||||
value="#{msg.remove}"
|
||||
action="#{WizardManager.bean.removeUploadedRenderingEngineTemplateFile}"
|
||||
showLink="false"
|
||||
target="top"/>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</h:column>
|
||||
</h:panelGrid>
|
||||
|
||||
@@ -101,8 +101,8 @@ else
|
||||
value="#{msg.rendering_engine}:"/>
|
||||
<h:selectOneRadio id="rendering-engine"
|
||||
value="#{WizardManager.bean.renderingEngineName}">
|
||||
<f:selectItems id="rendering-engine-choices"
|
||||
value="#{WizardManager.bean.renderingEngineChoices}"/>
|
||||
<f:selectItems id="rendering-engine-choices"
|
||||
value="#{WizardManager.bean.renderingEngineChoices}"/>
|
||||
</h:selectOneRadio>
|
||||
|
||||
<h:graphicImage id="required-image-name"
|
||||
@@ -166,37 +166,40 @@ else
|
||||
cellspacing="0" cellpadding="4" width="100%"
|
||||
rendered="#{WizardManager.bean.renderingEngineTemplatesDataModel.rowCount != 0}">
|
||||
<h:column id="data-table-column-0">
|
||||
<f:facet name="header">
|
||||
<h:outputText id="data-table-name-0" value="#{msg.selected_rendering_engine_templates}" />
|
||||
</f:facet>
|
||||
<f:verbatim>
|
||||
<img style="float: left" src="<%= request.getContextPath() %>/images/icons/template_large.gif"/>
|
||||
</f:verbatim>
|
||||
<h:panelGrid id="panel_grid_row"
|
||||
columns="2" cellpadding="0" cellspacing="1" border="0">
|
||||
<h:outputText id="data-table-name-0-type" value="#{msg.type}: " />
|
||||
<h:outputText id="data-table-value-0-type" value="#{row.renderingEngine.name}" />
|
||||
<f:facet name="header">
|
||||
<h:outputText id="data-table-name-0" value="#{msg.selected_rendering_engine_templates}" />
|
||||
</f:facet>
|
||||
<f:verbatim>
|
||||
<img style="float: left" src="<%= request.getContextPath() %>/images/icons/template_large.gif"/>
|
||||
</f:verbatim>
|
||||
<h:panelGrid id="panel_grid_row"
|
||||
columns="2" cellpadding="0" cellspacing="1" border="0">
|
||||
<h:outputText id="data-table-name-0-type" value="#{msg.type}: " />
|
||||
<h:outputText id="data-table-value-0-type" value="#{row.renderingEngine.name}" />
|
||||
|
||||
<h:outputText id="data-table-name-0-filename" value="#{msg.file_name}: " />
|
||||
<h:outputText id="data-table-value-0-filename" value="#{row.fileName}" />
|
||||
<h:outputText id="data-table-name-0-name" value="#{msg.name}: " />
|
||||
<h:outputText id="data-table-value-0-name" value="#{row.name}" />
|
||||
|
||||
<h:outputText id="data-table-name-0-name" value="#{msg.name}: " />
|
||||
<h:outputText id="data-table-value-0-name" value="#{row.name}" />
|
||||
<h:outputText id="data-table-name-0-title" value="#{msg.title}: " />
|
||||
<h:outputText id="data-table-value-0-title" value="#{row.title}" />
|
||||
|
||||
<h:outputText id="data-table-name-0-title" value="#{msg.title}: " />
|
||||
<h:outputText id="data-table-value-0-title" value="#{row.title}" />
|
||||
<h:outputText id="data-table-name-0-description" value="#{msg.description}: " />
|
||||
<h:outputText id="data-table-value-0-description-empty"
|
||||
rendered="#{empty row.description}" value="<#{msg.value_not_set}>" />
|
||||
<h:outputText id="data-table-value-0-description-not-empty"
|
||||
rendered="#{!empty row.description}" value="#{row.description}" />
|
||||
|
||||
<h:outputText id="data-table-name-0-mimetype" value="#{msg.mimetype_for_renditions}: " />
|
||||
<h:outputText id="data-table-value-0-mimetype" value="#{row.mimetypeForRendition}" />
|
||||
<h:outputText id="data-table-name-0-mimetype" value="#{msg.mimetype_for_renditions}: " />
|
||||
<h:outputText id="data-table-value-0-mimetype" value="#{row.mimetypeForRendition}" />
|
||||
|
||||
<h:outputText id="data-table-name-0-opp" value="#{msg.output_path_pattern}: " />
|
||||
<h:outputText id="data-table-value-0-opp" value="#{row.outputPathPatternForRendition}" />
|
||||
</h:panelGrid>
|
||||
<h:outputText id="data-table-name-0-opp" value="#{msg.output_path_pattern}: " />
|
||||
<h:outputText id="data-table-value-0-opp" value="#{row.outputPathPatternForRendition}" />
|
||||
</h:panelGrid>
|
||||
</h:column>
|
||||
<h:column id="data-table-column-5">
|
||||
<a:actionLink id="remove-select-rendering-engine-action-link"
|
||||
actionListener="#{WizardManager.bean.removeSelectedRenderingEngineTemplate}"
|
||||
image="/images/icons/delete.gif" value="#{msg.remove}" showLink="false" style="padding-left:6px" />
|
||||
image="/images/icons/delete.gif" value="#{msg.remove}" showLink="false" style="padding-left:6px" />
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
|
||||
|
@@ -36,11 +36,20 @@
|
||||
activeSelect="true"
|
||||
style="width:100%"
|
||||
itemStyleClass="selectListItem">
|
||||
<a:listItem label="${WizardManager.bean.formTitle}"
|
||||
<a:listItem label="${msg.name}: ${WizardManager.bean.formTitle}"
|
||||
value="${WizardManager.bean.formName}"
|
||||
image="/images/icons/webform_large.gif">
|
||||
<jsp:attribute name="description">
|
||||
<div>${msg.description}: ${WizardManager.bean.formDescription}</div>
|
||||
<div>${msg.description}:
|
||||
<c:choose>
|
||||
<c:when test="${empty WizardManager.bean.formDescription}">
|
||||
<${msg.value_not_set}>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
${WizardManager.bean.formDescription}
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div>${msg.schema_root_element_name}: ${WizardManager.bean.schemaRootElementName}</div>
|
||||
<div>${msg.output_path_pattern}: ${WizardManager.bean.outputPathPatternForFormInstanceData}</div>
|
||||
</jsp:attribute>
|
||||
@@ -60,11 +69,20 @@
|
||||
style="width:100%"
|
||||
itemStyleClass="selectListItem">
|
||||
<c:forEach items="${WizardManager.bean.renderingEngineTemplates}" var="ret">
|
||||
<a:listItem label="${ret.title}"
|
||||
value="${ret.fileName}"
|
||||
<a:listItem label="${msg.name}: ${ret.title}"
|
||||
value="${ret.name}"
|
||||
image="/images/icons/template_large.gif">
|
||||
<jsp:attribute name="description">
|
||||
<div>${msg.description}: ${ret.description}</div>
|
||||
<div>${msg.description}:
|
||||
<c:choose>
|
||||
<c:when test="${empty ret.description}">
|
||||
<${msg.value_not_set}>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
${ret.description}
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div>${msg.rendering_engine_type}: ${ret.renderingEngine.name}</div>
|
||||
<div>${msg.output_path_pattern}: ${ret.outputPathPatternForRendition}</div>
|
||||
<div>${msg.mimetype_for_renditions}: ${ret.mimetypeForRendition}</div>
|
||||
|
@@ -62,8 +62,6 @@
|
||||
</a:column>
|
||||
|
||||
<%-- Path column --%>
|
||||
<%--
|
||||
XXXarielb need to uncomment this once i figure out how to deal with paths...
|
||||
<a:column id="col3" style="padding:2px;text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/>
|
||||
@@ -71,7 +69,7 @@ XXXarielb need to uncomment this once i figure out how to deal with paths...
|
||||
<r:nodePath id="col3-path" value="#{r.path}" action="dialog:close:browse"
|
||||
actionListener="#{BrowseBean.clickSpacePath}" />
|
||||
</a:column>
|
||||
--%>
|
||||
|
||||
<%-- Created Date column --%>
|
||||
<a:column id="col4" style="padding:2px;text-align:left">
|
||||
<f:facet name="header">
|
||||
|
Reference in New Issue
Block a user