mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12729: Merged V2.2 to V3.0 12727: Further fix for ETWOTWO-987: HTML shown on WCM wizard summary pages git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12732 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -212,7 +212,7 @@ public class CreateFormWizard extends BaseWizardBean
|
|||||||
StringBuilder attribute = new StringBuilder(255);
|
StringBuilder attribute = new StringBuilder(255);
|
||||||
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
||||||
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, this.getDescription())));
|
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, this.getDescription()), false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "rendering_engine_type",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "rendering_engine_type",
|
||||||
this.getRenderingEngine().getName()));
|
this.getRenderingEngine().getName()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
|
||||||
@@ -1363,7 +1363,7 @@ public class CreateFormWizard extends BaseWizardBean
|
|||||||
StringBuilder attribute = new StringBuilder(255);
|
StringBuilder attribute = new StringBuilder(255);
|
||||||
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
||||||
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getFormDescription())));
|
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getFormDescription()), false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "schema_root_element_name",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "schema_root_element_name",
|
||||||
getSchemaRootElementName()));
|
getSchemaRootElementName()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
|
||||||
@@ -1390,7 +1390,7 @@ public class CreateFormWizard extends BaseWizardBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
||||||
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, desc)));
|
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, desc), false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
||||||
return attribute.toString();
|
return attribute.toString();
|
||||||
}
|
}
|
||||||
|
@@ -1386,7 +1386,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_webapp", getWebapp()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_webapp", getWebapp()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", getTitle()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", getTitle()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
|
||||||
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription())));
|
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription()), false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
||||||
return attribute.toString();
|
return attribute.toString();
|
||||||
}
|
}
|
||||||
@@ -1571,7 +1571,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "name", this.getName()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "name", this.getName()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", this.getTitle()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", this.getTitle()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern", this.getOutputPathPattern()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern", this.getOutputPathPattern()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", formDescription));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", formDescription, false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "workflow", workflowTitle));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "workflow", workflowTitle));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
||||||
return attribute.toString();
|
return attribute.toString();
|
||||||
@@ -1786,7 +1786,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
String workflowDescription = DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription());
|
String workflowDescription = DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription());
|
||||||
StringBuilder attribute = new StringBuilder(255);
|
StringBuilder attribute = new StringBuilder(255);
|
||||||
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
attribute.append(DescriptionAttributeHelper.getTableBegin());
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", workflowDescription));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", workflowDescription, false));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_filename_pattern", this.getFilenamePattern()));
|
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_filename_pattern", this.getFilenamePattern()));
|
||||||
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
attribute.append(DescriptionAttributeHelper.getTableEnd());
|
||||||
return attribute.toString();
|
return attribute.toString();
|
||||||
|
@@ -34,6 +34,7 @@ public class DescriptionAttributeHelper
|
|||||||
{
|
{
|
||||||
return TABLE_BEGIN;
|
return TABLE_BEGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param fc Current FacesContext
|
* @param fc Current FacesContext
|
||||||
@@ -42,10 +43,31 @@ public class DescriptionAttributeHelper
|
|||||||
* @return Returns a table line <code><tr><td>Localised field name:</td><td>Field value</td></tr></code>
|
* @return Returns a table line <code><tr><td>Localised field name:</td><td>Field value</td></tr></code>
|
||||||
*/
|
*/
|
||||||
public static String getTableLine(FacesContext fc, String fieldName, String fieldValue)
|
public static String getTableLine(FacesContext fc, String fieldName, String fieldValue)
|
||||||
|
{
|
||||||
|
return getTableLine(fc, fieldName, fieldValue, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param fc Current FacesContext
|
||||||
|
* @param fieldName Field name
|
||||||
|
* @param fieldValue Field value
|
||||||
|
* @param encode Whether to encode the given value or not
|
||||||
|
* @return Returns a table line <code><tr><td>Localised field name:</td><td>Field value</td></tr></code>
|
||||||
|
*/
|
||||||
|
public static String getTableLine(FacesContext fc, String fieldName, String fieldValue, boolean encode)
|
||||||
{
|
{
|
||||||
StringBuilder line = new StringBuilder(128);
|
StringBuilder line = new StringBuilder(128);
|
||||||
line.append(TRTD_BEGIN).append(Application.getMessage(fc, fieldName)).
|
line.append(TRTD_BEGIN).append(Application.getMessage(fc, fieldName)).append(TD_TD);
|
||||||
append(TD_TD).append(Utils.encode(fieldValue)).append(TDTR_END);
|
if (encode)
|
||||||
|
{
|
||||||
|
line.append(Utils.encode(fieldValue));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
line.append(fieldValue);
|
||||||
|
}
|
||||||
|
line.append(TDTR_END);
|
||||||
return line.toString();
|
return line.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +90,7 @@ public class DescriptionAttributeHelper
|
|||||||
{
|
{
|
||||||
return StringUtils.isEmpty(fieldValue) ?
|
return StringUtils.isEmpty(fieldValue) ?
|
||||||
SPAN_ITALIC_BEGIN + Application.getMessage(fc, "description_not_set") + SPAN_END :
|
SPAN_ITALIC_BEGIN + Application.getMessage(fc, "description_not_set") + SPAN_END :
|
||||||
fieldValue;
|
Utils.encode(fieldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user