Merged V3.0 to HEAD (fixes ALFCOM-2311 & ALFCOM-2332)

12718: Merged V2.2 to V3.0
      12706: Merged V2.1 to V2.2
         12693: Fixed regression where summary pages of WCM related wizards do not render correctly after XSS fixes, related to ETWOTWO-987

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12722 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-01-13 22:57:30 +00:00
parent 0e2cbde7b3
commit e1da4cb9d4
13 changed files with 258 additions and 32 deletions

View File

@@ -187,6 +187,14 @@ public class CreateFormWizard extends BaseWizardBean
{
return this.renderingEngineDescriptionAttribute;
}
public String getRenderingEngineLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.title));
builder.append("</b>");
return builder.toString();
}
public String toString()
{
@@ -538,6 +546,18 @@ public class CreateFormWizard extends BaseWizardBean
}
return this.formDescriptionAttribute;
}
/**
*
* @return HTML code for the form label
*/
public String getFormLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.getFormTitle()));
builder.append("</b>");
return builder.toString();
}
/**
*
@@ -555,6 +575,24 @@ public class CreateFormWizard extends BaseWizardBean
}
/**
*
* @return Returns HTML code of the workflow label
*/
public String getWorkflowLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
WorkflowDefinition wkDef = this.getDefaultWorkflowDefinition();
if (wkDef != null)
{
builder.append(Utils.encode(wkDef.getTitle()));
}
builder.append("</b>");
return builder.toString();
}
/**
* @return Returns the output path for the rendition.
*/
public String getOutputPathPatternForRendition()

View File

@@ -894,6 +894,14 @@ public class CreateWebContentWizard extends CreateContentWizard
}
return this.formDescriptionAttribute;
}
public String getFormLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.getFormInstanceData().getName()));
builder.append("</b>");
return builder.toString();
}
// ------------------------------------------------------------------------------
// Action event handlers

View File

@@ -1355,6 +1355,18 @@ public class CreateWebsiteWizard extends BaseWizardBean
return this.websiteDescriptionAttribute;
}
/**
*
* @return Returns HTML for website label
*/
public String getWebsiteLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.name));
builder.append("</b>");
return builder.toString();
}
/**
*
* @return Returns a HTML code for "description" attribute
@@ -1455,6 +1467,14 @@ public class CreateWebsiteWizard extends BaseWizardBean
}
return this.formDescriptionAttribute;
}
public String getFormLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.getName()));
builder.append("</b>");
return builder.toString();
}
/**
* @return Returns the workflow.
@@ -1744,6 +1764,18 @@ public class CreateWebsiteWizard extends BaseWizardBean
return this.workflowDescriptionAttribute;
}
/**
*
* @return Returns HTML for the workflow label
*/
public String getWorkflowLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.title));
builder.append("</b>");
return builder.toString();
}
/**
*
* @return Returns HTML representation of the "description" attribute
@@ -1799,6 +1831,14 @@ public class CreateWebsiteWizard extends BaseWizardBean
return this.userDescriptionAttribute;
}
public String getUserLabelAttribute()
{
StringBuilder builder = new StringBuilder("<b>");
builder.append(Utils.encode(this.name));
builder.append("</b>");
return builder.toString();
}
private String buildUserDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();

View File

@@ -3,6 +3,7 @@ package org.alfresco.web.bean.wcm;
import javax.faces.context.FacesContext;
import org.alfresco.web.app.Application;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.lang.StringUtils;
/**
@@ -43,7 +44,8 @@ public class DescriptionAttributeHelper
public static String getTableLine(FacesContext fc, String fieldName, String fieldValue)
{
StringBuilder line = new StringBuilder(128);
line.append(TRTD_BEGIN).append(Application.getMessage(fc, fieldName)).append(TD_TD).append(fieldValue).append(TDTR_END);
line.append(TRTD_BEGIN).append(Application.getMessage(fc, fieldName)).
append(TD_TD).append(Utils.encode(fieldValue)).append(TDTR_END);
return line.toString();
}