diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 08c59a8289..930f3de082 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -643,21 +643,21 @@ text_content=Plain Text Content html_content=HTML Content xml_content=XML Content create_form_title=Create Form Wizard -create_form_desc=Create an XML Form definition from XML Schema and Templates +create_form_desc=Create an XML Form definition from XML Schema and Rendering Engines create_form_step1_title=Upload an XML Schema create_form_step1_desc=Upload an XML Schema create_form_step2_title=Edit the XML Schema create_form_step2_desc=This is the generated XForm based on the schema provided. -selected_templateoutputmethods=Selected Template Output Methods -configure_output_methods_step1_desc=Upload template output method and specify the extension to use for its generated assets. -template_output_method_file=Template Output Method File +selected_rendering_engines=Selected Rendering Engines +configure_rendering_engines_step1_desc=Upload rendering engine template and specify the extension to use for its generated assets. +rendering_engine_file=Rendering Engine Template File extension_for_generated_assets=Extension For Generated Assets file_extension=Extension schema=Schema schema_root_tag_name=Root Tag edit_xml_schema=Edit XML Schema -template_type=Template Type -configure_template_output_methods=Configure Template Output Methods +form=Form +configure_rendering_engines=Configure Rendering Engines # Rule and Action Wizard messages run_action_title=Run Action Wizard @@ -1159,6 +1159,7 @@ title_edit_link_props=Edit Link Properties title_edit_file=Edit File title_edit_html_inline=Edit HTML File Inline title_edit_text_inline=Edit Text File Inline +title_edit_xml_inline=Edit XML File Inline title_edit_simple_workflow=Edit Simple Workflow title_edit_space=Edit Space Details title_rules=Space Rules @@ -1311,4 +1312,4 @@ validation_is_number={0} must contain a number. validation_regex={0} is invalid. validation_regex_not_match={0} is invalid. validation_numeric_range={0} must be between {1} and {2}. -validation_invalid_character=is an invalid character. \ No newline at end of file +validation_invalid_character=is an invalid character. diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index 3e459f34b8..d219d042e5 100644 --- a/config/alfresco/web-client-config-wizards.xml +++ b/config/alfresco/web-client-config-wizards.xml @@ -235,10 +235,10 @@ description-id="create_form_step1_desc" instruction-id="default_instruction" /> - - diff --git a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java index a3c7b96f8f..1e703ce67d 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java @@ -107,15 +107,14 @@ public class CreateFormWizard extends BaseWizardBean ///////////////////////////////////////////////////////////////////////////// - private static final String FILE_RENDERING_ENGINE = "template-output-method"; + public static final String FILE_RENDERING_ENGINE = "rendering-engine"; - private static final String FILE_SCHEMA = "schema"; + public static final String FILE_SCHEMA = "schema"; - private final static Log LOGGER = - LogFactory.getLog(CreateFormWizard.class); + private final static Log LOGGER = LogFactory.getLog(CreateFormWizard.class); private String schemaRootTagName; - private String templateName; + private String formName; private Class renderingEngineType = null; protected ContentService contentService; private DataModel renderingEnginesDataModel; @@ -135,7 +134,7 @@ public class CreateFormWizard extends BaseWizardBean final FileInfo folderInfo = this.fileFolderService.create(contentFormsNodeRef, - this.getTemplateName(), + this.getFormName(), ContentModel.TYPE_FOLDER); FileInfo fileInfo = this.fileFolderService.create(folderInfo.getNodeRef(), @@ -158,7 +157,7 @@ public class CreateFormWizard extends BaseWizardBean // apply the titled aspect - title and description Map props = new HashMap(2, 1.0f); - props.put(ContentModel.PROP_TITLE, this.getTemplateName()); + props.put(ContentModel.PROP_TITLE, this.getFormName()); props.put(ContentModel.PROP_DESCRIPTION, ""); this.nodeService.addAspect(schemaNodeRef, ContentModel.ASPECT_TITLED, props); @@ -211,7 +210,7 @@ public class CreateFormWizard extends BaseWizardBean this.removeUploadedSchemaFile(); this.removeUploadedRenderingEngineFile(); this.schemaRootTagName = null; - this.templateName = null; + this.formName = null; this.renderingEngineType = null; this.renderingEngines = new ArrayList(); this.fileExtension = null; @@ -248,7 +247,8 @@ public class CreateFormWizard extends BaseWizardBean } /** - * @return true if the Add To List button on the Template Output Methods should be disabled + * @return true if the Add To List button on the configure rendering engines + * page should be disabled */ public boolean getAddToListDisabled() { @@ -272,7 +272,7 @@ public class CreateFormWizard extends BaseWizardBean } /** - * Add the selected template output method to the list + * Add the selected rendering engine to the list */ public void addSelectedRenderingEngine(ActionEvent event) { @@ -280,7 +280,7 @@ public class CreateFormWizard extends BaseWizardBean { if (tomd.getFileExtension().equals(this.fileExtension)) { - throw new AlfrescoRuntimeException("template output method with extension " + this.fileExtension + + throw new AlfrescoRuntimeException("rendering engine with extension " + this.fileExtension + " already exists"); } } @@ -298,7 +298,7 @@ public class CreateFormWizard extends BaseWizardBean /** * Action handler called when the Remove button is pressed to remove a - * template output method + * rendering engine */ public void removeSelectedRenderingEngine(ActionEvent event) { @@ -463,7 +463,7 @@ public class CreateFormWizard extends BaseWizardBean } /** - * @return Returns the presentationTemplate file or null + * @return Returns the rendering engine file or null */ public File getRenderingEngineFile() { @@ -518,21 +518,21 @@ public class CreateFormWizard extends BaseWizardBean } /** - * Sets the human friendly name for this template. + * Sets the human friendly name for this form. */ - public void setTemplateName(final String templateName) + public void setFormName(final String formName) { - this.templateName = templateName; + this.formName = formName; } /** - * @return the human friendly name for this template. + * @return the human friendly name for this form. */ - public String getTemplateName() + public String getFormName() { - return (this.templateName == null && this.getSchemaFileName() != null + return (this.formName == null && this.getSchemaFileName() != null ? this.getSchemaFileName().replaceAll("(.+)\\..*", "$1") - : this.templateName); + : this.formName); } /** diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java index c0e7c466ff..c97e7fbf98 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java @@ -220,16 +220,19 @@ public class CreateWebContentWizard extends BaseContentWizard this.content = content; } - public List getCreateForms() + /** + * @return the available forms that can be created. + */ + public List getFormChoices() { - Collection
ttl = FormsService.getInstance().getForms(); - List sil = new ArrayList(ttl.size()); + final Collection ttl = FormsService.getInstance().getForms(); + final List sil = new ArrayList(ttl.size()); for (Form tt : ttl) { sil.add(new SelectItem(tt.getName(), tt.getName())); } - QuickSort sorter = new QuickSort(sil, "label", true, IDataContainer.SORT_CASEINSENSITIVE); + final QuickSort sorter = new QuickSort(sil, "label", true, IDataContainer.SORT_CASEINSENSITIVE); sorter.sort(); return sil; } diff --git a/source/web/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp b/source/web/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp index eeeb6bbe41..8e85c7224a 100644 --- a/source/web/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp +++ b/source/web/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp @@ -43,7 +43,7 @@ - + @@ -59,7 +59,7 @@ if (upload == null || upload.getFile() == null) %> - + @@ -69,24 +69,24 @@ if (upload == null || upload.getFile() == null) else { %> - + <% } %> - - - - + + - - @@ -95,22 +95,22 @@ else - + value="#{msg.selected_rendering_engines}" /> - + rendered="#{WizardManager.bean.renderingEnginesDataModel.rowCount != 0}"> @@ -121,7 +121,7 @@ else - + @@ -130,14 +130,14 @@ else - - + - - - + + +