. Missing title/description in Forms selected in Web Project wizard now correctly taken from Form def

. Workflow package staging/sandbox changes copied from SubmitDialog to CreateWebContentWizard
. Fix to Form and Web Project summary screens to show workflow 'title' instead of 'name' (as 'name' is not a useful label)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4548 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-12-07 11:13:10 +00:00
parent e670b3dd33
commit 657c7a2b3f
6 changed files with 36 additions and 27 deletions

View File

@@ -828,6 +828,7 @@ website_web_content_forms=Web Content Forms
website_save_location=Save Location website_save_location=Save Location
website_save_location_info=Use the following pattern when saving content website_save_location_info=Use the following pattern when saving content
website_filename_pattern=Filename pattern website_filename_pattern=Filename pattern
website_filename_match=Filename pattern match
website_workflow=Workflow website_workflow=Workflow
website_workflow_info=Use the following workflow website_workflow_info=Use the following workflow
website_form_summary=Using workflow ''{0}'', with filename pattern ''{1}'', {2} rendering engine(s) selected. website_form_summary=Using workflow ''{0}'', with filename pattern ''{1}'', {2} rendering engine(s) selected.

View File

@@ -282,11 +282,12 @@ public class CreateWebContentWizard extends BaseContentWizard
LOGGER.debug("creating workflow package"); LOGGER.debug("creating workflow package");
// create package paths (layered to user sandbox area as target) // create package paths (layered to user sandbox area as target)
String webapp = (String)website.getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP); String stagingPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getStagingStore());
String sandboxPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getSandbox()); String packagesPath = AVMWorkflowUtil.createAVMLayeredPackage(this.avmService, stagingPath);
String packagesPath = AVMWorkflowUtil.createAVMLayeredPackage(this.avmService, sandboxPath);
// construct diffs for selected items for submission // construct diffs for selected items for submission
String webapp = (String)website.getProperties().get(WCMAppModel.PROP_DEFAULTWEBAPP);
String sandboxPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getSandbox());
List<AVMDifference> diffs = new ArrayList<AVMDifference>(8); List<AVMDifference> diffs = new ArrayList<AVMDifference>(8);
for (Rendition rendition : this.getRenditions()) for (Rendition rendition : this.getRenditions())
{ {
@@ -315,6 +316,10 @@ public class CreateWebContentWizard extends BaseContentWizard
AVMNodeConverter.ToNodeRef(-1, packageDesc.getPath())); AVMNodeConverter.ToNodeRef(-1, packageDesc.getPath()));
this.nodeService.setProperty(packageNodeRef, WorkflowModel.PROP_IS_SYSTEM_PACKAGE, true); this.nodeService.setProperty(packageNodeRef, WorkflowModel.PROP_IS_SYSTEM_PACKAGE, true);
parameters.put(WorkflowModel.ASSOC_PACKAGE, packageNodeRef); parameters.put(WorkflowModel.ASSOC_PACKAGE, packageNodeRef);
// TODO: capture label and comment?
parameters.put(AVMWorkflowUtil.PROP_LABEL, this.fileName);
parameters.put(AVMWorkflowUtil.PROP_FROM_PATH, AVMConstants.buildAVMStoreRootPath(
this.avmBrowseBean.getSandbox()));
if (LOGGER.isDebugEnabled()) if (LOGGER.isDebugEnabled())
LOGGER.debug("starting workflow " + wd + " with parameters " + parameters); LOGGER.debug("starting workflow " + wd + " with parameters " + parameters);

View File

@@ -500,7 +500,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
{ {
UIListItem item = new UIListItem(); UIListItem item = new UIListItem();
item.setValue(form); item.setValue(form);
item.setLabel(form.getName()); item.setLabel(form.getTitle());
item.setDescription(form.getDescription()); item.setDescription(form.getDescription());
item.setImage(WebResources.IMAGE_WEBFORM_32); item.setImage(WebResources.IMAGE_WEBFORM_32);
items.add(item); items.add(item);
@@ -519,7 +519,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
if (index != -1) if (index != -1)
{ {
Form form = (Form)this.formsList.get(index).getValue(); Form form = (Form)this.formsList.get(index).getValue();
this.forms.add(this.new FormWrapper(form)); FormWrapper wrapper = new FormWrapper(form);
wrapper.setTitle(form.getTitle());
wrapper.setDescription(form.getDescription());
this.forms.add(wrapper);
} }
} }

View File

@@ -32,17 +32,17 @@
<h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0"> <h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0">
<a:selectList id="form-list" <a:selectList id="form-list"
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyleClass="selectListItem"> itemStyleClass="selectListItem">
<a:listItem label="${WizardManager.bean.formTitle}" <a:listItem label="${WizardManager.bean.formTitle}"
value="${WizardManager.bean.formName}" value="${WizardManager.bean.formName}"
image="/images/icons/webform_large.gif"> image="/images/icons/webform_large.gif">
<jsp:attribute name="description"> <jsp:attribute name="description">
<div>${WizardManager.bean.formDescription}</div> <div>${WizardManager.bean.formDescription}</div>
<div>${msg.schema_root_element_name}: ${WizardManager.bean.schemaRootElementName}</div> <div>${msg.schema_root_element_name}: ${WizardManager.bean.schemaRootElementName}</div>
<div>${msg.schema_root_element_name}: ${WizardManager.bean.outputPathPatternForFormInstanceData}</div> <div>${msg.schema_root_element_name}: ${WizardManager.bean.outputPathPatternForFormInstanceData}</div>
</jsp:attribute> </jsp:attribute>
</a:listItem> </a:listItem>
</a:selectList> </a:selectList>
@@ -55,20 +55,20 @@
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0">
<a:selectList id="rendering-engine-template-list" <a:selectList id="rendering-engine-template-list"
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyleClass="selectListItem"> itemStyleClass="selectListItem">
<c:forEach items="${WizardManager.bean.renderingEngineTemplates}" var="ret"> <c:forEach items="${WizardManager.bean.renderingEngineTemplates}" var="ret">
<a:listItem label="${ret.title}" <a:listItem label="${ret.title}"
value="${ret.fileName}" value="${ret.fileName}"
image="/images/icons/template_large.gif"> image="/images/icons/template_large.gif">
<jsp:attribute name="description"> <jsp:attribute name="description">
<div>${msg.description}: ${ret.description}</div> <div>${msg.description}: ${ret.description}</div>
<div>${msg.rendering_engine_type}: ${ret.renderingEngine.name}</div> <div>${msg.rendering_engine_type}: ${ret.renderingEngine.name}</div>
<div>${msg.output_path_pattern}: ${ret.outputPathPatternForRendition}</div> <div>${msg.output_path_pattern}: ${ret.outputPathPatternForRendition}</div>
<div>${msg.mimetype_for_renditions}: ${ret.mimetypeForRendition}</div> <div>${msg.mimetype_for_renditions}: ${ret.mimetypeForRendition}</div>
</jsp:attribute> </jsp:attribute>
</a:listItem> </a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
@@ -91,7 +91,7 @@
</c:choose> </c:choose>
<c:if test="${WizardManager.bean.defaultWorkflowDefinition != null}"> <c:if test="${WizardManager.bean.defaultWorkflowDefinition != null}">
<h:outputText value="#{msg.name}:"/> <h:outputText value="#{msg.name}:"/>
<h:outputText value="#{WizardManager.bean.defaultWorkflowDefinition.name}"/> <h:outputText value="#{WizardManager.bean.defaultWorkflowDefinition.title}"/>
<h:outputText value="#{msg.description}:"/> <h:outputText value="#{msg.description}:"/>
<h:outputText value="#{WizardManager.bean.defaultWorkflowDefinition.description}"/> <h:outputText value="#{WizardManager.bean.defaultWorkflowDefinition.description}"/>
</c:if> </c:if>

View File

@@ -52,7 +52,7 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{msg.configure}" /> <h:outputText value="#{msg.configure}" />
</f:facet> </f:facet>
<h:outputText value="#{msg.website_filename_pattern}:" style="padding-right:4px" /> <h:outputText value="#{msg.website_filename_match}:" style="padding-right:4px" />
<h:inputText value="#{row.filenamePattern}" /> <h:inputText value="#{row.filenamePattern}" />
<h:commandButton id="cmd-1" rendered="#{WizardManager.bean.editMode == false}" value="#{msg.form_template_conf_workflow}" style="margin-left:4px" styleClass="dialogControls" action="dialog:formTemplateWorkflow" actionListener="#{WizardManager.bean.setupWorkflowAction}" /> <h:commandButton id="cmd-1" rendered="#{WizardManager.bean.editMode == false}" value="#{msg.form_template_conf_workflow}" style="margin-left:4px" styleClass="dialogControls" action="dialog:formTemplateWorkflow" actionListener="#{WizardManager.bean.setupWorkflowAction}" />
<h:commandButton id="cmd-2" rendered="#{WizardManager.bean.editMode == true}" value="#{msg.form_template_conf_workflow}" style="margin-left:4px" styleClass="dialogControls" action="dialog:editFormTemplateWorkflow" actionListener="#{WizardManager.bean.setupWorkflowAction}" /> <h:commandButton id="cmd-2" rendered="#{WizardManager.bean.editMode == true}" value="#{msg.form_template_conf_workflow}" style="margin-left:4px" styleClass="dialogControls" action="dialog:editFormTemplateWorkflow" actionListener="#{WizardManager.bean.setupWorkflowAction}" />

View File

@@ -58,7 +58,7 @@
<f:verbatim>${r.filenamePattern}</f:verbatim> <f:verbatim>${r.filenamePattern}</f:verbatim>
<h:outputText value="#{msg.workflow}:" styleClass="mainSubTitle" /> <h:outputText value="#{msg.workflow}:" styleClass="mainSubTitle" />
<c:if test="${r.workflow != null}"> <c:if test="${r.workflow != null}">
<f:verbatim>${r.workflow.name}</f:verbatim> <f:verbatim>${r.workflow.title}</f:verbatim>
</c:if> </c:if>
<c:if test="${r.workflow == null}"> <c:if test="${r.workflow == null}">
<f:verbatim>${msg.none}</f:verbatim> <f:verbatim>${msg.none}</f:verbatim>