Merged V2.2 to HEAD

10634: Fix for ETWOTWO-600 and ETWOTWO-601: System error happens on various pages in WebLogic.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10790 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-09-05 14:30:07 +00:00
parent 588957ac32
commit 496e13c997
10 changed files with 466 additions and 315 deletions

View File

@@ -71,6 +71,7 @@ import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.WebResources; import org.alfresco.web.ui.wcm.WebResources;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.xerces.xs.XSConstants; import org.apache.xerces.xs.XSConstants;
@@ -83,13 +84,14 @@ import org.w3c.dom.Document;
* Bean implementation for the "Create XML Form" dialog * Bean implementation for the "Create XML Form" dialog
* *
* @author arielb * @author arielb
* @author Arseny Kovalchuk (The fixer of the issue https://issues.alfresco.com/jira/browse/ETWOTWO-600,601)
*/ */
public class CreateFormWizard extends BaseWizardBean public class CreateFormWizard extends BaseWizardBean
{ {
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
private static final long serialVersionUID = 4038447699556408567L; private static final long serialVersionUID = -7133077371875949483L;
/** /**
* Simple wrapper class to represent a form data renderer * Simple wrapper class to represent a form data renderer
@@ -107,6 +109,7 @@ public class CreateFormWizard extends BaseWizardBean
private final String mimetypeForRendition; private final String mimetypeForRendition;
private final String outputPathPatternForRendition; private final String outputPathPatternForRendition;
private final RenderingEngine renderingEngine; private final RenderingEngine renderingEngine;
private final String renderingEngineDescriptionAttribute;
public RenderingEngineTemplateData(final RenderingEngineTemplate ret) public RenderingEngineTemplateData(final RenderingEngineTemplate ret)
{ {
@@ -118,6 +121,7 @@ public class CreateFormWizard extends BaseWizardBean
this.outputPathPatternForRendition = ret.getOutputPathPattern(); this.outputPathPatternForRendition = ret.getOutputPathPattern();
this.mimetypeForRendition = ret.getMimetypeForRendition(); this.mimetypeForRendition = ret.getMimetypeForRendition();
this.renderingEngine = ret.getRenderingEngine(); this.renderingEngine = ret.getRenderingEngine();
this.renderingEngineDescriptionAttribute = buildREDescriptionAttribute();
} }
public RenderingEngineTemplateData(final File file, public RenderingEngineTemplateData(final File file,
@@ -136,6 +140,7 @@ public class CreateFormWizard extends BaseWizardBean
this.outputPathPatternForRendition = outputPathPatternForRendition; this.outputPathPatternForRendition = outputPathPatternForRendition;
this.mimetypeForRendition = mimetypeForRendition; this.mimetypeForRendition = mimetypeForRendition;
this.renderingEngine = renderingEngine; this.renderingEngine = renderingEngine;
this.renderingEngineDescriptionAttribute = buildREDescriptionAttribute();
} }
public String getOutputPathPatternForRendition() public String getOutputPathPatternForRendition()
@@ -178,6 +183,11 @@ public class CreateFormWizard extends BaseWizardBean
return this.renderingEngine; return this.renderingEngine;
} }
public String getRenderingEngineDescriptionAttribute()
{
return this.renderingEngineDescriptionAttribute;
}
public String toString() public String toString()
{ {
return (this.getClass().getName() + "{" + return (this.getClass().getName() + "{" +
@@ -187,6 +197,23 @@ public class CreateFormWizard extends BaseWizardBean
"renderingEngine: " + this.getRenderingEngine().getName() + "renderingEngine: " + this.getRenderingEngine().getName() +
"}"); "}");
} }
private String buildREDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(255);
attribute.append(DescriptionAttributeHelper.getTableBegin());
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, this.getDescription())));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "rendering_engine_type",
this.getRenderingEngine().getName()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
this.getOutputPathPatternForRendition()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "mimetype_for_renditions",
this.getMimetypeForRendition()));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -219,6 +246,8 @@ public class CreateFormWizard extends BaseWizardBean
private String renderingEngineTemplateName = null; private String renderingEngineTemplateName = null;
private String renderingEngineTemplateTitle = null; private String renderingEngineTemplateTitle = null;
private String renderingEngineTemplateDescription = null; private String renderingEngineTemplateDescription = null;
private String formDescriptionAttribute = null;
private String workflowDescriptionAttribute = null;
private RenderingEngine renderingEngine = null; private RenderingEngine renderingEngine = null;
protected transient DataModel renderingEngineTemplatesDataModel; protected transient DataModel renderingEngineTemplatesDataModel;
@@ -407,6 +436,9 @@ public class CreateFormWizard extends BaseWizardBean
this.defaultWorkflowName = null; this.defaultWorkflowName = null;
this.defaultWorkflowChoices = null; this.defaultWorkflowChoices = null;
this.applyDefaultWorkflow = true; this.applyDefaultWorkflow = true;
this.formDescriptionAttribute = null;
this.workflowDescriptionAttribute = null;
} }
@Override @Override
@@ -492,6 +524,36 @@ public class CreateFormWizard extends BaseWizardBean
return this.getRenderingEngineTemplateFileName() == null; return this.getRenderingEngineTemplateFileName() == null;
} }
/**
*
* @return Returns HTML code of the formDescriptionAttribute
* for the attribute "description" of the <code><a:listItem></code> tag.
* See create-form-wizard/summary.jsp
*/
public String getFormDescriptionAttribute()
{
if (StringUtils.isEmpty(formDescriptionAttribute))
{
this.formDescriptionAttribute = buildFormDescriptionAttribute();
}
return this.formDescriptionAttribute;
}
/**
*
* @return Returns HTML code of the formDescriptionAttribute
* for the attribute "description" of the <code><a:listItem></code> tag.
* See create-form-wizard/summary.jsp
*/
public String getWorkflowDescriptionAttribute()
{
if (StringUtils.isEmpty(workflowDescriptionAttribute))
{
this.workflowDescriptionAttribute = buildWorkflowDescriptionAttribute();
}
return this.workflowDescriptionAttribute;
}
/** /**
* @return Returns the output path for the rendition. * @return Returns the output path for the rendition.
*/ */
@@ -1252,4 +1314,47 @@ public class CreateFormWizard extends BaseWizardBean
final FileUploadBean fileBean = this.getFileUploadBean(id); final FileUploadBean fileBean = this.getFileUploadBean(id);
return fileBean != null ? fileBean.getFile() : null; return fileBean != null ? fileBean.getFile() : null;
} }
/**
*
* @return Returns a HTML code for "description" attribute
*/
private String buildFormDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(255);
attribute.append(DescriptionAttributeHelper.getTableBegin());
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getFormDescription())));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "schema_root_element_name",
getSchemaRootElementName()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern",
getOutputPathPatternForFormInstanceData()));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
/**
*
* @return Returns a HTML code for "description" attribute
*/
private String buildWorkflowDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(255);
attribute.append(DescriptionAttributeHelper.getTableBegin());
// get workflow description
String desc = null;
WorkflowDefinition def = getDefaultWorkflowDefinition();
if (def != null)
{
desc = def.getDescription();
}
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, desc)));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }

View File

@@ -80,6 +80,7 @@ import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.component.UIUserSandboxes; import org.alfresco.web.ui.wcm.component.UIUserSandboxes;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@@ -104,6 +105,7 @@ public class CreateWebContentWizard extends CreateContentWizard
protected boolean formSelectDisabled = false; protected boolean formSelectDisabled = false;
protected boolean startWorkflow = false; protected boolean startWorkflow = false;
protected List<String> locksToReturnToMainStoreOnCancel = null; protected List<String> locksToReturnToMainStoreOnCancel = null;
protected String formDescriptionAttribute;
transient private AVMLockingService avmLockingService; transient private AVMLockingService avmLockingService;
transient private AVMService avmService; transient private AVMService avmService;
@@ -238,6 +240,8 @@ public class CreateWebContentWizard extends CreateContentWizard
} }
} }
// this.formDescriptionAttribute = buildFormDescriptionAttribute();
// reset the preview layer // reset the preview layer
String storeName = AVMUtil.getStoreName(this.avmBrowseBean.getCurrentPath()); String storeName = AVMUtil.getStoreName(this.avmBrowseBean.getCurrentPath());
storeName = AVMUtil.getCorrespondingPreviewStoreName(storeName); storeName = AVMUtil.getCorrespondingPreviewStoreName(storeName);
@@ -877,6 +881,15 @@ public class CreateWebContentWizard extends CreateContentWizard
return false; return false;
} }
public String getFormDescriptionAttribute()
{
if (StringUtils.isEmpty(this.formDescriptionAttribute))
{
this.formDescriptionAttribute = buildFormDescriptionAttribute();
}
return this.formDescriptionAttribute;
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Action event handlers // Action event handlers
@@ -888,4 +901,34 @@ public class CreateWebContentWizard extends CreateContentWizard
// clear the content as HTML is not compatible with the plain text box etc. // clear the content as HTML is not compatible with the plain text box etc.
this.content = null; this.content = null;
} }
private String buildFormDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
String contextPath = fc.getExternalContext().getRequestContextPath();
StringBuilder attribute = new StringBuilder(255);
attribute.append("<span style=\"float:right;\">");
attribute.append("<a id=\"preview_fid\" href=\"").append(getFormInstanceData().getUrl()).append("\" ");
attribute.append("style=\"text-decoration: none;\" ");
attribute.append("target=\"window_").append(getFormInstanceData().getName()).append("\">");
attribute.append("<img src=\"").append(contextPath).append("/images/icons/preview_website.gif\" ");
attribute.append("align=\"absmiddle\" style=\"border: 0px\" ");
attribute.append("alt=").append(getFormInstanceData().getName()).append("\">");
attribute.append("</a></span>\n");
attribute.append(DescriptionAttributeHelper.getTableBegin());
String formTitle = null;
try
{
formTitle = getForm().getTitle();
}
catch (FormNotFoundException e)
{
formTitle = Application.getMessage(FacesContext.getCurrentInstance(),"form_not_found");
}
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "form", formTitle));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "location",
getFormInstanceData().getSandboxRelativePath()));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }

View File

@@ -76,6 +76,7 @@ import org.alfresco.web.ui.common.component.UIActionLink;
import org.alfresco.web.ui.common.component.UIListItem; import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.common.component.UISelectList; import org.alfresco.web.ui.common.component.UISelectList;
import org.alfresco.web.ui.wcm.WebResources; import org.alfresco.web.ui.wcm.WebResources;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -83,6 +84,7 @@ import org.apache.commons.logging.LogFactory;
* Backing bean for the Create Web Project wizard. * Backing bean for the Create Web Project wizard.
* *
* @author Kevin Roast * @author Kevin Roast
* @author Arseny Kovalchuk (The fixer of the issue https://issues.alfresco.com/jira/browse/ETWOTWO-600,601)
*/ */
public class CreateWebsiteWizard extends BaseWizardBean public class CreateWebsiteWizard extends BaseWizardBean
{ {
@@ -120,6 +122,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
protected List<SelectItem> webappsList; protected List<SelectItem> webappsList;
protected boolean isSource; protected boolean isSource;
protected boolean showAllSourceProjects; protected boolean showAllSourceProjects;
protected String websiteDescriptionAttribute;
transient private AVMService avmService; transient private AVMService avmService;
transient private WorkflowService workflowService; transient private WorkflowService workflowService;
@@ -1451,6 +1454,42 @@ public class CreateWebsiteWizard extends BaseWizardBean
} }
} }
/**
*
* @return Returns a websiteDescriptionAttribute
*/
public String getWebsiteDescriptionAttribute()
{
if (this.websiteDescriptionAttribute == null)
{
this.websiteDescriptionAttribute = buildWebsiteDescriptionAttribute();
}
return this.websiteDescriptionAttribute;
}
/**
*
* @return Returns a HTML code for "description" attribute
*/
private String buildWebsiteDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(255);
String sourceWebProjectName = getSourceWebProjectName();
sourceWebProjectName = StringUtils.isEmpty(sourceWebProjectName) ?
DescriptionAttributeHelper.BLANK : DescriptionAttributeHelper.TRTD_BEGIN +
Application.getMessage(fc, "website_sourcewebsite") + DescriptionAttributeHelper.TD_TD +
sourceWebProjectName + DescriptionAttributeHelper.TDTR_END;
attribute.append(DescriptionAttributeHelper.getTableBegin());
attribute.append(sourceWebProjectName);
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_dnsname", getDnsName()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_webapp", getWebapp()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", getTitle()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description",
DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription())));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Invite users page // Invite users page
@@ -1478,6 +1517,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
private Form form; private Form form;
private String title; private String title;
private String description; private String description;
private String formDescriptionAttribute;
private WorkflowWrapper workflow; private WorkflowWrapper workflow;
private String outputPathPattern; private String outputPathPattern;
private List<PresentationTemplate> templates = null; private List<PresentationTemplate> templates = null;
@@ -1486,6 +1526,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
{ {
this.form = form; this.form = form;
this.title = form.getName(); this.title = form.getName();
this.description = form.getDescription();
} }
public Form getForm() public Form getForm()
@@ -1518,6 +1559,15 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.description = description; this.description = description;
} }
public String getFormDescriptionAttribute()
{
if (StringUtils.isEmpty(this.formDescriptionAttribute))
{
this.formDescriptionAttribute = this.buildFormDescriptionAttribute();
}
return this.formDescriptionAttribute;
}
/** /**
* @return Returns the workflow. * @return Returns the workflow.
*/ */
@@ -1600,6 +1650,24 @@ public class CreateWebsiteWizard extends BaseWizardBean
{ {
this.templates = templates; this.templates = templates;
} }
private String buildFormDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(255);
String formDescription = DescriptionAttributeHelper.getDescriptionNotEmpty(fc, this.getDescription());
String workflowTitle = getWorkflow() == null ?
DescriptionAttributeHelper.SPAN_ITALIC_BEGIN + Application.getMessage(fc, "none") +
DescriptionAttributeHelper.SPAN_END : getWorkflow().getTitle();
attribute.append(DescriptionAttributeHelper.getTableBegin());
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "name", this.getName()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "title", this.getTitle()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "output_path_pattern", this.getOutputPathPattern()));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", formDescription));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "workflow", workflowTitle));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }
@@ -1682,6 +1750,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
private String title; private String title;
private String description; private String description;
private String filenamePattern; private String filenamePattern;
private String workflowDescriptionAttribute;
private QName type; private QName type;
private Map<QName, Serializable> params; private Map<QName, Serializable> params;
@@ -1690,6 +1759,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.name = name; this.name = name;
this.title = title; this.title = title;
this.description = description; this.description = description;
this.workflowDescriptionAttribute = this.buildWorkflowDescriptionAttribute();
} }
public WorkflowWrapper(String name, String title, String description, String filenamePattern) public WorkflowWrapper(String name, String title, String description, String filenamePattern)
@@ -1698,6 +1768,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.title = title; this.title = title;
this.description = description; this.description = description;
this.filenamePattern = filenamePattern; this.filenamePattern = filenamePattern;
this.workflowDescriptionAttribute = this.buildWorkflowDescriptionAttribute();
} }
/** /**
@@ -1771,6 +1842,35 @@ public class CreateWebsiteWizard extends BaseWizardBean
{ {
this.type = type; this.type = type;
} }
/**
*
* @return Returns workflowDescriptionAttribute in HTML format (TABLE tag)
*/
public String getWorkflowDescriptionAttribute()
{
if (StringUtils.isEmpty(this.workflowDescriptionAttribute))
{
this.workflowDescriptionAttribute = this.buildWorkflowDescriptionAttribute();
}
return this.workflowDescriptionAttribute;
}
/**
*
* @return Returns HTML representation of the "description" attribute
*/
private String buildWorkflowDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
String workflowDescription = DescriptionAttributeHelper.getDescriptionNotEmpty(fc, getDescription());
StringBuilder attribute = new StringBuilder(255);
attribute.append(DescriptionAttributeHelper.getTableBegin());
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "description", workflowDescription));
attribute.append(DescriptionAttributeHelper.getTableLine(fc, "website_filename_pattern", this.getFilenamePattern()));
attribute.append(DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }
@@ -1779,6 +1879,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
private static final long serialVersionUID = 6546685548198253273L; private static final long serialVersionUID = 6546685548198253273L;
private final String name, role; private final String name, role;
private String userDescriptionAttribute;
public UserWrapper(final String authority, final String role) public UserWrapper(final String authority, final String role)
{ {
@@ -1796,9 +1897,28 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.name = authority.substring(PermissionService.GROUP_PREFIX.length()); this.name = authority.substring(PermissionService.GROUP_PREFIX.length());
} }
this.role = Application.getMessage(FacesContext.getCurrentInstance(), role); this.role = Application.getMessage(FacesContext.getCurrentInstance(), role);
this.userDescriptionAttribute = this.buildUserDescriptionAttribute();
} }
public String getName() { return this.name; } public String getName() { return this.name; }
public String getRole() { return this.role; } public String getRole() { return this.role; }
public String getUserDescriptionAttribute()
{
if (StringUtils.isEmpty(this.userDescriptionAttribute))
{
this.userDescriptionAttribute = buildUserDescriptionAttribute();
}
return this.userDescriptionAttribute;
}
private String buildUserDescriptionAttribute()
{
FacesContext fc = FacesContext.getCurrentInstance();
StringBuilder attribute = new StringBuilder(128);
attribute.append(DescriptionAttributeHelper.getTableBegin()).append(
DescriptionAttributeHelper.getTableLine(fc, "roles", this.getRole())).append(
DescriptionAttributeHelper.getTableEnd());
return attribute.toString();
}
} }
} }

View File

@@ -0,0 +1,72 @@
package org.alfresco.web.bean.wcm;
import javax.faces.context.FacesContext;
import org.alfresco.web.app.Application;
import org.apache.commons.lang.StringUtils;
/**
* Helper class to build a HTML description attribute for the <code><a:listItem></code> tag.
*
* @author Arseny Kovalchuk
*
* @see org.alfresco.web.bean.wcm.CreateWebsiteWizard
* @see org.alfresco.web.bean.wcm.CreateFormWizard
*/
public class DescriptionAttributeHelper
{
static final String BLANK = "";
static final String TABLE_BEGIN = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> <colgroup><col width=\"25%\"/><col width=\"75%\"/></colgroup><tbody>";
static final String TABLE_END = "</tbody></table>";
static final String TRTD_BEGIN = "<tr><td>";
static final String TD_TD = ":</td><td>";
static final String TDTR_END = "</td></tr>";
static final String SPAN_ITALIC_BEGIN = "<span style=\"font-style:italic\">";
static final String SPAN_END = "</span>";
/**
*
* @return Returns beginning tags of the HTML table
* @see org.alfresco.web.bean.wcm.DescriptionAttributeConstants
*/
public static String getTableBegin()
{
return TABLE_BEGIN;
}
/**
*
* @param fc Current FacesContext
* @param fieldName Field name
* @param fieldValue Field value
* @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)
{
StringBuilder line = new StringBuilder(128);
line.append(TRTD_BEGIN).append(Application.getMessage(fc, fieldName)).append(TD_TD).append(fieldValue).append(TDTR_END);
return line.toString();
}
/**
*
* @return Returns an ending HTML table tags
*/
public static String getTableEnd()
{
return TABLE_END;
}
/**
*
* @param fc Current FacesContext
* @param fieldValue Field value
* @return Returns localised "description_not_set" message if fieldValue is empty.
*/
public static String getDescriptionNotEmpty(FacesContext fc, String fieldValue)
{
return StringUtils.isEmpty(fieldValue) ?
SPAN_ITALIC_BEGIN + Application.getMessage(fc, "description_not_set") + SPAN_END :
fieldValue;
}
}

View File

@@ -67,6 +67,9 @@ public interface Rendition
/** the output stream for the rendition */ /** the output stream for the rendition */
public OutputStream getOutputStream(); public OutputStream getOutputStream();
/** the HTML description attribute for UI */
public String getDescriptionAttribute();
/** regenerates the contents of this rendition using the primary form instance data */ /** regenerates the contents of this rendition using the primary form instance data */
public void regenerate() public void regenerate()
throws IOException, throws IOException,

View File

@@ -42,6 +42,7 @@ import org.alfresco.util.Pair;
import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil; import org.alfresco.web.bean.wcm.AVMUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
@@ -62,6 +63,7 @@ import org.xml.sax.SAXException;
private final NodeRef nodeRef; private final NodeRef nodeRef;
transient private FormsService formsService; transient private FormsService formsService;
transient private RenderingEngineTemplate renderingEngineTemplate; transient private RenderingEngineTemplate renderingEngineTemplate;
private String descriptionAttribute;
/* package */ RenditionImpl(final NodeRef nodeRef, final FormsService formsService) /* package */ RenditionImpl(final NodeRef nodeRef, final FormsService formsService)
{ {
@@ -267,4 +269,28 @@ import org.xml.sax.SAXException;
", rendering_engine_template : " + this.getRenderingEngineTemplate() + ", rendering_engine_template : " + this.getRenderingEngineTemplate() +
"}"); "}");
} }
public String getDescriptionAttribute()
{
if (StringUtils.isEmpty(this.descriptionAttribute))
{
this.descriptionAttribute = buildDescriptionAttribute();
}
return this.descriptionAttribute;
}
private String buildDescriptionAttribute()
{
int hashCode = hashCode();
String contextPath = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
StringBuilder attribute = new StringBuilder(255);
attribute.append("<span style=\"float:right;\"><a id=\"preview").append(hashCode).append("\" ");
attribute.append("href=\"").append(getUrl()).append("\" ");
attribute.append("style=\"text-decoration: none;\" ");
attribute.append("target=\"window_").append(hashCode).append("_").append(getName()).append("\">");
attribute.append("<img src=\"").append(contextPath).append("/images/icons/preview_website.gif\" ");
attribute.append("align=\"absmiddle\" style=\"border: 0px\" alt=\"").append(getName()).append("\">");
attribute.append("</a></span><span>").append(getDescription()).append("</span>");
return attribute.toString();
}
} }

View File

@@ -41,28 +41,9 @@
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<a:listItem label="<b>${WizardManager.bean.formTitle}</b>" <a:listItem label="<b>${WizardManager.bean.formTitle}</b>" value="${WizardManager.bean.formName}"
value="${WizardManager.bean.formName}" image="/images/icons/webform_large.gif"
image="/images/icons/webform_large.gif"> description="${WizardManager.bean.formDescriptionAttribute}" />
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty WizardManager.bean.formDescription}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${WizardManager.bean.formDescription}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.schema_root_element_name}:</td><td>${WizardManager.bean.schemaRootElementName}</td></tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>

View File

@@ -20,6 +20,7 @@
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
--%> --%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
@@ -41,30 +42,10 @@
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<a:listItem label="<b>${WizardManager.bean.formTitle}</b>" <a:listItem label="<b>${WizardManager.bean.formTitle}</b>" value="${WizardManager.bean.formName}"
value="${WizardManager.bean.formName}" image="/images/icons/webform_large.gif"
image="/images/icons/webform_large.gif"> description="${WizardManager.bean.formDescriptionAttribute}" />
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty WizardManager.bean.formDescription}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${WizardManager.bean.formDescription}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.schema_root_element_name}:</td><td>${WizardManager.bean.schemaRootElementName}</td></tr>
<tr><td>${msg.output_path_pattern}:</td><td>${WizardManager.bean.outputPathPatternForFormInstanceData}</td></tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
@@ -79,34 +60,14 @@
<a:selectList id="rendering-engine-template-list" <a:selectList id="rendering-engine-template-list"
multiSelect="false" multiSelect="false"
itemStyle="vertical-align: top; margin-right: 5px;" itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;"
activeSelect="true" activeSelect="true"
style="width:100%"> style="width:100%">
<c:forEach items="${WizardManager.bean.renderingEngineTemplates}" var="ret"> <c:forEach items="${WizardManager.bean.renderingEngineTemplates}" var="ret">
<a:listItem label="<b>${ret.title}</b>" <a:listItem label="<b>${ret.title}</b>"
value="${ret.name}" value="${ret.name}"
image="/images/icons/template_large.gif"> image="/images/icons/template_large.gif"
<jsp:attribute name="description"> description="${ret.renderingEngineDescriptionAttribute}" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty ret.description}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${ret.description}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.rendering_engine_type}:</td><td>${ret.renderingEngine.name}</td></tr>
<tr><td>${msg.output_path_pattern}:</td><td>${ret.outputPathPatternForRendition}</td></tr>
<tr><td>${msg.mimetype_for_renditions}:</td><td>${ret.mimetypeForRendition}</td></tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
@@ -123,28 +84,11 @@
rendered="#{WizardManager.bean.defaultWorkflowDefinition != null}" rendered="#{WizardManager.bean.defaultWorkflowDefinition != null}"
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
itemStyle="vertical-align: top; margin-right: 5px;" itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;"
style="width:100%"> style="width:100%">
<a:listItem label="<b>${WizardManager.bean.defaultWorkflowDefinition.title}</b>" <a:listItem label="<b>${WizardManager.bean.defaultWorkflowDefinition.title}</b>"
value="${WizardManager.bean.defaultWorkflowDefinition.name}" value="${WizardManager.bean.defaultWorkflowDefinition.name}"
image="/images/icons/workflow_large.gif"> image="/images/icons/workflow_large.gif"
<jsp:attribute name="description"> description="${WizardManager.bean.workflowDescriptionAttribute}" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty WizardManager.bean.defaultWorkflowDefinition.description}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${WizardManager.bean.defaultWorkflowDefinition.description}</c:otherwise>
</c:choose>
</td>
</tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>

View File

@@ -1,4 +1,4 @@
<!-- <%--
* Copyright (C) 2005-2007 Alfresco Software Limited. * Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@@ -19,21 +19,13 @@
* FLOSS exception. You should have recieved a copy of the text describing * FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing * http://www.alfresco.com/legal/licensing
--> --%>
<jsp:root version="1.2" <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
xmlns:jsp="http://java.sun.com/JSP/Page" <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
xmlns:c="http://java.sun.com/jsp/jstl/core" <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld" <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
xmlns:f="http://java.sun.com/jsf/core" <%@ page isELIgnored="false" %>
xmlns:h="http://java.sun.com/jsf/html">
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page language="java" buffer="32kb" contentType="text/html; charset=UTF-8"/>
<jsp:directive.page isELIgnored="false"/>
<script type="text/javascript"> <script type="text/javascript">
window.onload = function() { document.getElementById("wizard:finish-button").focus(); } window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
@@ -49,35 +41,11 @@
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<a:listItem value="${WizardManager.bean.formInstanceData.name}" <a:listItem value="${WizardManager.bean.formInstanceData.name}"
image="/images/filetypes32/xml.gif"> image="/images/filetypes32/xml.gif"
<jsp:attribute name="label"><b>${WizardManager.bean.formInstanceData.name}</b></jsp:attribute> label="<b>${WizardManager.bean.formInstanceData.name}</b>"
<jsp:attribute name="description"> description="${WizardManager.bean.formDescriptionAttribute}" />
<span style="float:right;">
<a id="preview_fid"
href="${WizardManager.bean.formInstanceData.url}"
style="text-decoration: none;"
target="window_${WizardManager.bean.formInstanceData.name}">
<jsp:element name="img">
<jsp:attribute name="src" trim="true">
<c:out value="${pageContext.request.contextPath}"/>/images/icons/preview_website.gif
</jsp:attribute>
<jsp:attribute name="align">absmiddle</jsp:attribute>
<jsp:attribute name="style">border: 0px</jsp:attribute>
<jsp:attribute name="alt">${WizardManager.bean.formInstanceData.name}</jsp:attribute>
</jsp:element>
</a>
</span>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.web_form}:</td><td>${WizardManager.bean.form.title}</td></tr>
<tr><td>${msg.location}:</td><td>${WizardManager.bean.formInstanceData.sandboxRelativePath}</td></tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
@@ -93,33 +61,11 @@
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<c:forEach items="${WizardManager.bean.renditions}" <c:forEach items="${WizardManager.bean.renditions}" var="rendition" varStatus="status">
var="rendition" <a:listItem id="listItem${status.index}" value="${rendition.name}" image="${rendition.fileTypeImage}"
varStatus="status"> label="<b>${rendition.name}</b>"
<a:listItem id="listItem${status.index}" description="${rendition.descriptionAttribute}" />
value="${rendition.name}"
image="${rendition.fileTypeImage}">
<jsp:attribute name="label"><b>${rendition.name}</b></jsp:attribute>
<jsp:attribute name="description">
<span style="float:right;">
<a id="preview${status.index}"
href="${rendition.url}"
style="text-decoration: none;"
target="window_${status.index}_${rendition.name}">
<jsp:element name="img">
<jsp:attribute name="src" trim="true">
<c:out value="${pageContext.request.contextPath}"/>/images/icons/preview_website.gif
</jsp:attribute>
<jsp:attribute name="align">absmiddle</jsp:attribute>
<jsp:attribute name="style">border: 0px</jsp:attribute>
<jsp:attribute name="alt">${rendition.name}</jsp:attribute>
</jsp:element>
</a>
</span>
<span>${rendition.description}</span>
</jsp:attribute>
</a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
@@ -136,7 +82,7 @@
multiSelect="false" multiSelect="false"
activeSelect="true" activeSelect="true"
style="width:100%" style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<a:listItems value="#{WizardManager.bean.uploadedFiles}"/> <a:listItems value="#{WizardManager.bean.uploadedFiles}"/>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
@@ -153,4 +99,3 @@
</h:outputFormat> </h:outputFormat>
</h:column> </h:column>
</h:panelGrid> </h:panelGrid>
</jsp:root>

View File

@@ -1,4 +1,4 @@
<!-- <%--
* Copyright (C) 2005-2007 Alfresco Software Limited. * Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@@ -21,27 +21,17 @@
* FLOSS exception. You should have recieved a copy of the text describing * FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
--> --%>
<jsp:root version="1.2" <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
xmlns:jsp="http://java.sun.com/JSP/Page" <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
xmlns:c="http://java.sun.com/jsp/jstl/core" <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld" <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
xmlns:f="http://java.sun.com/jsf/core" <%@ page isELIgnored="false" %>
xmlns:h="http://java.sun.com/jsf/html">
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page language="java" buffer="32kb" contentType="text/html; charset=UTF-8"/>
<jsp:directive.page isELIgnored="false"/>
<f:verbatim>
<script type="text/javascript"> <script type="text/javascript">
window.onload = function() { document.getElementById("wizard:finish-button").focus(); } window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
</script> </script>
</f:verbatim>
<!-- General properties --> <!-- General properties -->
<h:panelGrid columns="1" cellpadding="2" style="padding-top:4px;padding-bottom:4px;" <h:panelGrid columns="1" cellpadding="2" style="padding-top:4px;padding-bottom:4px;"
@@ -50,145 +40,67 @@
</h:panelGrid> </h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
<a:selectList id="webproject-list" multiSelect="false" activeSelect="true" <a:selectList id="webproject-list" multiSelect="false" activeSelect="true" style="width:100%;"
style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<a:listItem value="${WizardManager.bean.name}" image="/images/icons/website_large.gif"> <a:listItem value="${WizardManager.bean.name}"
<jsp:attribute name="label"><b>${WizardManager.bean.name}</b></jsp:attribute> image="/images/icons/website_large.gif"
<jsp:attribute name="description"> label="<b>${WizardManager.bean.name}</b>"
<table width="100%" cellspacing="0" cellpadding="0" border="0"> description="${WizardManager.bean.websiteDescriptionAttribute}" />
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<c:if test="${!empty WizardManager.bean.sourceWebProjectName}">
<tr><td>${msg.website_sourcewebsite}:</td><td> ${WizardManager.bean.sourceWebProjectName}</td></tr>
</c:if>
<tr><td>${msg.website_dnsname}:</td><td> ${WizardManager.bean.dnsName}</td></tr>
<tr><td>${msg.website_webapp}:</td><td> ${WizardManager.bean.webapp}</td></tr>
<tr><td>${msg.title}:</td><td> ${WizardManager.bean.title}</td></tr>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty WizardManager.bean.description}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${WizardManager.bean.description}</c:otherwise>
</c:choose>
</td>
</tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
<!-- Web Content Forms --> <%-- Web Content Forms --%>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" width="100%" rowClasses="wizardSectionHeading">
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&#160;#{msg.website_web_content_forms}" escape="false" /> <h:outputText value="&#160;#{msg.website_web_content_forms}" escape="false" />
</h:panelGrid> </h:panelGrid>
<h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0" width="100%">
<h:outputText rendered="#{empty WizardManager.bean.forms}" value="#{msg.no_selected_items}"/> <h:outputText rendered="#{empty WizardManager.bean.forms}" value="#{msg.no_selected_items}"/>
<a:selectList id="form-list" multiSelect="false" activeSelect="true" <a:selectList id="form-list" multiSelect="false" activeSelect="true" style="width:100%;"
style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;"> itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
<c:forEach items="${WizardManager.bean.forms}" var="r"> <c:forEach items="${WizardManager.bean.forms}" var="form">
<a:listItem value="${r.name}" image="/images/icons/webform_large.gif"> <a:listItem value="${form.name}"
<jsp:attribute name="label"><b>${r.name}</b></jsp:attribute> image="/images/icons/webform_large.gif"
<jsp:attribute name="description"> label="<b>${form.name}</b>"
<table width="100%" cellspacing="0" cellpadding="0" border="0"> description="${form.formDescriptionAttribute}" />
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.name}:</td><td> ${r.name}</td></tr>
<tr><td>${msg.title}:</td><td> ${r.title}</td></tr>
<tr><td>${msg.output_path_pattern}:</td><td> ${r.outputPathPattern}</td></tr>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty WizardManager.bean.description}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${r.description}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.workflow}:</td>
<td>
<c:choose>
<c:when test="${r.workflow == null}">
<span style="font-style:italic">${msg.none}</span>
</c:when>
<c:otherwise>${r.workflow.title}</c:otherwise>
</c:choose>
</td>
</tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
<!-- Selected Workflows --> <%-- Selected Workflows --%>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;" width="100%" rowClasses="wizardSectionHeading">
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&#160;#{msg.website_selected_workflows}" escape="false" /> <h:outputText value="&#160;#{msg.website_selected_workflows}" escape="false" />
</h:panelGrid> </h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
<h:outputText rendered="#{empty WizardManager.bean.workflows}" <h:outputText rendered="#{empty WizardManager.bean.workflows}" value="#{msg.no_selected_items}"/>
value="#{msg.no_selected_items}"/> <a:selectList id="workflow-list" multiSelect="false" activeSelect="true" style="width:100%;"
<a:selectList id="workflow-list" multiSelect="false" activeSelect="true" itemStyle="vertical-align: top; margin-right: 5px; padding-right: 5px;">
style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;"> <c:forEach items="${WizardManager.bean.workflows}" var="workflow">
<c:forEach items="${WizardManager.bean.workflows}" var="r"> <a:listItem value="${workflow.name}"
<a:listItem value="${r.name}" image="/images/icons/workflow_large.gif"> image="/images/icons/workflow_large.gif"
<jsp:attribute name="label"><b>${r.title}</b></jsp:attribute> label="<b>${workflow.title}</b>"
<jsp:attribute name="description"> description="${workflow.workflowDescriptionAttribute}" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
<tbody>
<tr><td>${msg.description}:</td>
<td>
<c:choose>
<c:when test="${empty r.description}">
<span style="font-style:italic">${msg.description_not_set}</span>
</c:when>
<c:otherwise>${r.description}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.website_filename_pattern}:</td><td> ${r.filenamePattern}</td></tr>
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
<!-- Users and Roles --> <%-- Users and Roles --%>
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px" <h:panelGrid columns="1" cellpadding="2" style="padding-top:16px" width="100%" rowClasses="wizardSectionHeading">
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&#160;#{msg.create_website_summary_users}" escape="false" /> <h:outputText value="&#160;#{msg.create_website_summary_users}" escape="false" />
</h:panelGrid> </h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%" style="margin-left:12px"> <h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%" style="margin-left:12px">
<a:selectList id="users-list" multiSelect="false" activeSelect="true" <a:selectList id="users-list"
style="width:100%;" itemStyle="vertical-align: top; margin-right: 5px;"> multiSelect="false"
<c:forEach items="${WizardManager.bean.invitedUsers}" var="r"> activeSelect="true"
<a:listItem value="${r.name}" image="/images/icons/user_large.gif"> style="width:100%;"
<jsp:attribute name="label"><b><c:out escapeXml="true" value="${r.name}"/></b></jsp:attribute> itemStyle="vertical-align: top; margin-right: 5px;">
<jsp:attribute name="description"> <c:forEach items="${WizardManager.bean.invitedUsers}" var="user">
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <a:listItem value="${user.name}"
<colgroup><col width="25%"/><col width="75%"/></colgroup> image="/images/icons/user_large.gif"
<tbody> label="<b>${user.name}</b>"
<tr><td>${msg.roles}:</td><td> ${r.role}</td></tr> description="${user.userDescriptionAttribute}" />
</tbody>
</table>
</jsp:attribute>
</a:listItem>
</c:forEach> </c:forEach>
</a:selectList> </a:selectList>
</h:panelGrid> </h:panelGrid>
</jsp:root>