- getting terminology consistent

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4185 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-10-20 21:26:31 +00:00
parent 8bfaea9d12
commit d1d378eac0
6 changed files with 63 additions and 59 deletions

View File

@@ -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

View File

@@ -235,10 +235,10 @@
description-id="create_form_step1_desc"
instruction-id="default_instruction" />
</step>
<step name="configure_presentation_templates"
title-id="configure_template_output_methods"
<step name="configure_rendering_engines"
title-id="configure_rendering_engines"
description-id="create_form_step2_desc">
<page path="/jsp/wcm/create-form-wizard/configure-template-output-methods.jsp"
<page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp"
title-id="create_form_step2_title"
description-id="create_form_step2_desc"
instruction-id="default_instruction" />

View File

@@ -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<QName, Serializable> props = new HashMap<QName, Serializable>(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<RenderingEngineData>();
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 <tt>null</tt>
* @return Returns the rendering engine file or <tt>null</tt>
*/
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);
}
/**

View File

@@ -220,16 +220,19 @@ public class CreateWebContentWizard extends BaseContentWizard
this.content = content;
}
public List<SelectItem> getCreateForms()
/**
* @return the available forms that can be created.
*/
public List<SelectItem> getFormChoices()
{
Collection<Form> ttl = FormsService.getInstance().getForms();
List<SelectItem> sil = new ArrayList<SelectItem>(ttl.size());
final Collection<Form> ttl = FormsService.getInstance().getForms();
final List<SelectItem> sil = new ArrayList<SelectItem>(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;
}

View File

@@ -43,7 +43,7 @@
<h:panelGrid id="general-properties-panel-grid"
columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
width="100%">
<h:outputText id="step-1-text" value="1. #{msg.configure_output_methods_step1_desc}" escape="false" />
<h:outputText id="step-1-text" value="1. #{msg.configure_rendering_engines_step1_desc}" escape="false" />
<h:panelGrid id="panel_grid_3"
columns="3" cellpadding="3" cellspacing="3" border="0"
width="100%">
@@ -59,7 +59,7 @@ if (upload == null || upload.getFile() == null)
%>
<h:column id="column_pt">
<f:verbatim>
<input type="hidden" name="upload-id" value="template-output-method"/>
<input type="hidden" name="upload-id" value="<%= CreateFormWizard.FILE_RENDERING_ENGINE %>"/>
<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>
@@ -69,24 +69,24 @@ if (upload == null || upload.getFile() == null)
else
{
%>
<h:outputText id="template-output-method-file-name"
value="#{WizardManager.bean.templateOutputMethodFileName}"/>
<h:outputText id="rendering-engine-file-name"
value="#{WizardManager.bean.renderingEngineFileName}"/>
<%
}
%>
<h:graphicImage id="required_image_template_output_method_type"
<h:graphicImage id="required-image-rendering-engine-type"
value="/images/icons/required_field.gif" alt="Required Field" />
<h:outputText id="template_output_method_type_output_text"
<h:outputText id="rendering-engine-type-output-text"
value="#{msg.type}:"/>
<h:selectOneRadio id="template_output_method_type"
value="#{WizardManager.bean.templateOutputMethodType}">
<f:selectItems id="template_output_method_type_choices"
value="#{WizardManager.bean.templateOutputMethodTypeChoices}"/>
<h:selectOneRadio id="rendering-engine-type"
value="#{WizardManager.bean.renderingEngineType}">
<f:selectItems id="rendering-engine-type-choices"
value="#{WizardManager.bean.renderingEngineTypeChoices}"/>
</h:selectOneRadio>
<h:graphicImage id="required_image_file_extension"
<h:graphicImage id="required-image-file-extension"
value="/images/icons/required_field.gif" alt="Required Field" />
<h:outputText id="file_extension_output_text"
<h:outputText id="file-extension-output-text"
value="#{msg.extension_for_generated_assets}:"/>
<h:inputText id="file-extension" value="#{WizardManager.bean.fileExtension}"
maxlength="10" size="10"/>
@@ -95,22 +95,22 @@ else
<h:panelGroup id="step-2-panel-group" styleClass="mainSubText">
<h:outputText id="step-2-output-text" value="2." />
<h:commandButton id="add-to-list-button" value="#{msg.add_to_list_button}"
actionListener="#{WizardManager.bean.addSelectedTemplateOutputMethod}"
actionListener="#{WizardManager.bean.addSelectedRenderingEngine}"
styleClass="wizardButton" disabled="#{WizardManager.bean.addToListDisabled}" />
</h:panelGroup>
<h:outputText id="selected_template_output_methods_output_text"
<h:outputText id="selected-rendering-engines-output-text"
styleClass="mainSubText"
value="#{msg.selected_templateoutputmethods}" />
value="#{msg.selected_rendering_engines}" />
<h:panelGroup id="data-table-panel-group">
<h:dataTable id="template_output_method_data_table"
value="#{WizardManager.bean.templateOutputMethodsDataModel}"
<h:dataTable id="rendering-engine-data-table"
value="#{WizardManager.bean.renderingEnginesDataModel}"
var="row"
rowClasses="selectedItemsRow,selectedItemsRowAlt"
styleClass="selectedItems"
headerClass="selectedItemsHeader"
cellspacing="0"
cellpadding="4"
rendered="#{WizardManager.bean.templateOutputMethodsDataModel.rowCount != 0}">
rendered="#{WizardManager.bean.renderingEnginesDataModel.rowCount != 0}">
<h:column id="data-table-column-1">
<f:facet name="header">
<h:outputText id="data-table-name-1" value="#{msg.file_name}" />
@@ -121,7 +121,7 @@ else
<f:facet name="header">
<h:outputText id="data-table-name-2" value="#{msg.type}" />
</f:facet>
<h:outputText id="data-table-value-2" value="#{row.templateOutputMethodTypeName}" />
<h:outputText id="data-table-value-2" value="#{row.renderingEngineTypeName}" />
</h:column>
<h:column id="data-table-column-3">
<f:facet name="header">
@@ -130,14 +130,14 @@ else
<h:outputText id="data-table-value-3" value="#{row.fileExtension}" />
</h:column>
<h:column id="data-table-column-4">
<a:actionLink id="remove-select-template-output-method-action-link"
actionListener="#{WizardManager.bean.removeSelectedTemplateOutputMethod}"
<a:actionLink id="remove-select-rendering-engine-action-link"
actionListener="#{WizardManager.bean.removeSelectedRenderingEngine}"
image="/images/icons/delete.gif"
value="#{msg.remove}" showLink="false" style="padding-left:6px" />
</h:column>
</h:dataTable>
<a:panel id="no-items" rendered="#{WizardManager.bean.templateOutputMethodsDataModel.rowCount == 0}">
<a:panel id="no-items" rendered="#{WizardManager.bean.renderingEnginesDataModel.rowCount == 0}">
<h:panelGrid id="no-items-panel-grid"
columns="1"
cellpadding="2"

View File

@@ -93,8 +93,8 @@
</h:selectOneMenu>
<h:outputText value=""/>
<h:outputText value="#{msg.template_type}:"/>
<h:selectOneMenu value="#{WizardManager.bean.templateTypeName}">
<f:selectItems value="#{WizardManager.bean.createTemplateTypes}" />
<h:outputText value="#{msg.form}:"/>
<h:selectOneMenu value="#{WizardManager.bean.formName}">
<f:selectItems value="#{WizardManager.bean.formChoices}" />
</h:selectOneMenu>
</h:panelGrid>