externalizing widget config for xforms to xml

- adding a utility method to ConfigElement to get a list of child config elements by name
- using JSONObject to generate js rendition of config
- adding a build script to build json.jar since json.org only distributes source
- adding a preview link for form instance data to create web content summary screen
- doing the full jsp2.0 thing with summary screen for create website, i have a hunch it will fix a websphere issue

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5943 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-06-13 21:11:24 +00:00
parent da0edcf071
commit 710ac5b727
9 changed files with 633 additions and 356 deletions

View File

@@ -17,5 +17,6 @@
<classpathentry kind="lib" path="/3rd Party/lib/fop/avalon-framework-4.2.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/MBean"/>
<classpathentry kind="lib" path="/3rd Party/lib/chiba-1.3.0.jar"/>
<classpathentry kind="lib" path="/3rd Party/lib/json.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

View File

@@ -26,6 +26,81 @@
<!-- the delay (in seconds) to apply to a deployment (for testing and demo purposes) -->
<delay>30</delay>
</deployment>
<xforms>
<widget xforms-type="xf:group"
appearance="minimal"
javascript-class-name="alfresco.xforms.HGroup"/>
<widget xforms-type="xf:group"
javascript-class-name="alfresco.xforms.VGroup"/>
<widget xforms-type="xf:repeat"
javascript-class-name="alfresco.xforms.Repeat"/>
<widget xforms-type="xf:textarea"
appearance="minimal"
javascript-class-name="alfresco.xforms.PlainTextEditor"/>
<widget xforms-type="xf:textarea"
javascript-class-name="alfresco.xforms.RichTextEditor">
<param>bold,italic,underline,separator,forecolor,backcolor,separator,link,unlink,image</param>
</widget>
<widget xforms-type="xf:textarea"
appearance="full"
javascript-class-name="alfresco.xforms.RichTextEditor">
<param>bold,italic,underline,strikethrough,separator,fontselect,fontsizeselect</param>
<param>link,unlink,image,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,undo,redo,separator,forecolor,backcolor</param>
</widget>
<widget xforms-type="xf:upload" javascript-class-name="alfresco.xforms.FilePicker"/>
<widget xforms-type="xf:range" javascript-class-name="alfresco.xforms.NumericalRange"/>
<widget xforms-type="xf:input"
xml-schema-type="date"
javascript-class-name="alfresco.xforms.DatePicker"/>
<widget xforms-type="xf:input"
xml-schema-type="time"
javascript-class-name="alfresco.xforms.TimePicker"/>
<widget xforms-type="xf:input"
xml-schema-type="gDay"
javascript-class-name="alfresco.xforms.DayPicker"/>
<widget xforms-type="xf:input"
xml-schema-type="gMonth"
javascript-class-name="alfresco.xforms.MonthPicker"/>
<widget xforms-type="xf:input"
xml-schema-type="gYear"
javascript-class-name="alfresco.xforms.YearPicker"/>
<widget xforms-type="xf:input"
xml-schema-type="gMonthDay"
javascript-class-name="alfresco.xforms.MonthDayPicker"/>
<widget xforms-type="xf:input"
xml-schema-type="gYearMonth"
javascript-class-name="alfresco.xforms.YearMonthPicker"/>
<widget xforms-type="xf:input"
xml-schema-type="dateTime"
javascript-class-name="alfresco.xforms.DateTimePicker"/>
<widget xforms-type="xf:input"
javascript-class-name="alfresco.xforms.TextField"/>
<widget xforms-type="xf:select1"
xml-schema-type="boolean"
javascript-class-name="alfresco.xforms.Checkbox"/>
<widget xforms-type="xf:select1"
appearance="full"
javascript-class-name="alfresco.xforms.RadioSelect1"/>
<widget xforms-type="xf:select1"
javascript-class-name="alfresco.xforms.ComboboxSelect1"/>
<widget xforms-type="xf:select"
appearance="full"
javascript-class-name="alfresco.xforms.CheckboxSelect"/>
<widget xforms-type="xf:select"
javascript-class-name="alfresco.xforms.ListSelect"/>
<widget xforms-type="xf:submit"
javascript-class-name="alfresco.xforms.Submit"/>
<widget xforms-type="xf:trigger"
javascript-class-name="alfresco.xforms.Trigger"/>
<widget xforms-type="xf:switch"
javascript-class-name="alfresco.xforms.SwitchGroup"/>
<widget xforms-type="xf:case"
javascript-class-name="alfresco.xforms.CaseGroup"/>
<widget xforms-type="chiba:data"/>
<widget xforms-type="xf:label"/>
<widget xforms-type="xf:alert"/>
</xforms>
</wcm>
</config>

View File

@@ -50,8 +50,8 @@ import org.alfresco.web.app.servlet.ajax.InvokeCommand;
import org.alfresco.web.bean.FileUploadBean;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMBrowseBean;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.bean.wcm.AVMNode;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.forms.*;
import org.alfresco.web.ui.common.Utils;

View File

@@ -20,16 +20,20 @@ package org.alfresco.web.forms.xforms;
import java.io.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ResourceBundle;
import java.util.*;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.config.ConfigElement;
import org.alfresco.config.ConfigService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.web.bean.wcm.AVMBrowseBean;
import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.forms.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.web.util.JavaScriptUtils;
import org.w3c.dom.Document;
@@ -92,8 +96,14 @@ public class XFormsProcessor
"validation_provide_values_for_required_fields"
};
private static JSONObject widgetConfig = null;
public XFormsProcessor()
{
if (XFormsProcessor.widgetConfig == null)
{
XFormsProcessor.widgetConfig = XFormsProcessor.loadConfig();
}
}
public Session process(final Document instanceDataDocument,
@@ -225,6 +235,19 @@ public class XFormsProcessor
append(k.equals(BUNDLE_KEYS[BUNDLE_KEYS.length - 1]) ? "\n};" : ",").
append("\n");
}
try
{
js.append("alfresco.xforms.widgetConfig = \n").
append(LOGGER.isDebugEnabled()
? XFormsProcessor.widgetConfig.toString(0)
: XFormsProcessor.widgetConfig).
append("\n");
}
catch (JSONException jsone)
{
LOGGER.error(jsone);
}
e.appendChild(result.createTextNode(js.toString()));
div.appendChild(e);
@@ -241,4 +264,141 @@ public class XFormsProcessor
XMLUtil.print(result, out);
}
private static JSONObject loadConfig()
{
final ConfigService cfgService = Application.getConfigService(FacesContext.getCurrentInstance());
final ConfigElement xformsConfig = cfgService.getGlobalConfig().getConfigElement("wcm").getChild("xforms");
final List<ConfigElement> widgetConfig = xformsConfig.getChildren("widget");
class WidgetConfigElement
implements Comparable<WidgetConfigElement>
{
public final String xformsType;
public final String xmlSchemaType;
public final String appearance;
public final String javascriptClassName;
private List<String> params;
public WidgetConfigElement(final String xformsType,
final String xmlSchemaType,
final String appearance,
final String javascriptClassName)
{
if (xformsType == null)
{
throw new NullPointerException();
}
this.xformsType = xformsType;
this.xmlSchemaType = xmlSchemaType;
this.appearance = appearance;
this.javascriptClassName = javascriptClassName;
}
public void addParam(final String p)
{
if (this.params == null)
{
this.params = new LinkedList();
}
this.params.add(p);
}
public List<String> getParams()
{
return (this.params == null
? (List<String>)Collections.EMPTY_LIST
: Collections.unmodifiableList(this.params));
}
public int compareTo(final WidgetConfigElement other)
{
int result = this.xformsType.compareTo(other.xformsType);
if (result != 0)
{
return result;
}
result = this.compareAttribute(this.xmlSchemaType, other.xmlSchemaType);
if (result != 0)
{
return result;
}
result = this.compareAttribute(this.appearance, other.appearance);
if (result != 0)
{
return result;
}
throw new RuntimeException("widget definitions " + this +
" and " + other + " collide");
}
public String toString()
{
return (this.getClass().getName() + "{" +
"xformsType: "+ this.xformsType +
", xmlSchemaType: " + this.xmlSchemaType +
", appearance: " + this.appearance +
", javascriptClassName: " + this.javascriptClassName +
", numParams: " + this.getParams().size() +
"}");
}
private int compareAttribute(final String s1, final String s2)
{
return (s1 != null && s2 == null
? 1
: (s1 == null && s2 != null
? -1
: (s1 != null && s2 != null
? s1.compareTo(s2)
: 0)));
}
}
final TreeSet<WidgetConfigElement> widgetConfigs = new TreeSet<WidgetConfigElement>();
for (final ConfigElement ce : widgetConfig)
{
final WidgetConfigElement wce = new WidgetConfigElement(ce.getAttribute("xforms-type"),
ce.getAttribute("xml-schema-type"),
ce.getAttribute("appearance"),
ce.getAttribute("javascript-class-name"));
final List<ConfigElement> params = ce.getChildren("param");
for (final ConfigElement p : params)
{
wce.addParam(p.getValue());
}
widgetConfigs.add(wce);
}
try
{
final JSONObject result = new JSONObject();
for (final WidgetConfigElement wce : widgetConfigs)
{
if (!result.has(wce.xformsType))
{
result.put(wce.xformsType, new JSONObject());
}
final JSONObject xformsTypeObject = result.getJSONObject(wce.xformsType);
String s = wce.xmlSchemaType == null ? "*" : wce.xmlSchemaType;
if (!xformsTypeObject.has(s))
{
xformsTypeObject.put(s, new JSONObject());
}
final JSONObject schemaTypeObject = xformsTypeObject.getJSONObject(s);
s = wce.appearance == null ? "*" : wce.appearance;
final JSONObject o = new JSONObject();
schemaTypeObject.put(s, o);
o.put("className", wce.javascriptClassName);
o.put("params", wce.getParams());
}
return result;
}
catch (JSONException jsone)
{
LOGGER.error(jsone, jsone);
return null;
}
}
}

View File

@@ -13,7 +13,7 @@
</xs:annotation>
</xs:element>
<xs:element name="rich_text_anyType" type="xs:anyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="rich_text_stringType" type="xs:string" minOccurs="0" maxOccurs="1" default="ф">
<xs:element name="rich_text_stringType" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<alf:appearance>full</alf:appearance>
@@ -29,7 +29,7 @@
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="rich_text_stringType_attribute" type="xs:string" use="optional" default="ф">
<xs:attribute name="rich_text_stringType_attribute" type="xs:string" use="optional">
<xs:annotation>
<xs:appinfo>
<alf:appearance>full</alf:appearance>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xhtml">
<xsl:output method="html" version="4.01" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="/">
<html>
<head>
<style type="text/css">
body
{
font-family: Tahoma, Arial, Helvetica, sans-serif;
background-color: white;
font-size: 11px;
}
.name
{
color: #003366;
font-weight: bold;
margin-right: 10px;
}
</style>
<title>textarea test</title>
</head>
<body>
<div>Generated by textarea-test.xsl</div>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="/textarea-test/plain_text">
<div style="line-height: 25px;">
<span class="name">plain text: </span>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
<xsl:template match="/textarea-test/rich_text_anyType">
<div style="line-height: 25px;">
<span class="name">rich text anyType: </span>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
<xsl:template match="/textarea-test/rich_text_stringType">
<div style="line-height: 25px;">
<span class="name">rich text stringType: </span>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
<xsl:template match="/textarea-test/@plain_text_attribute">
<div style="line-height: 25px;">
<span class="name">rich text stringType attribute: </span>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
<xsl:template match="/textarea-test/@rich_text_stringType_attribute">
<div style="line-height: 25px;">
<span class="name">rich text stringType attribute: </span>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,4 +1,4 @@
<%--
<!--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
@@ -18,21 +18,30 @@
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ 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/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page isELIgnored="false" %>
* http://www.alfresco.com/legal/licensing
-->
<jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld"
xmlns:f="http://java.sun.com/jsf/core"
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">
window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
</script>
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&nbsp;#{msg.create_web_content_summary_content_details}" escape="false" />
<h:outputText value="&#160;#{msg.create_web_content_summary_content_details}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
@@ -41,10 +50,25 @@
activeSelect="true"
style="width:100%"
itemStyle="vertical-align: top; margin-right: 5px;">
<a:listItem label="<b>${WizardManager.bean.formInstanceData.name}<b/>"
value="${WizardManager.bean.formInstanceData.name}"
<a:listItem value="${WizardManager.bean.formInstanceData.name}"
image="/images/filetypes32/xml.gif">
<jsp:attribute name="label"><b>${WizardManager.bean.formInstanceData.name}</b></jsp:attribute>
<jsp:attribute name="description">
<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>
@@ -60,7 +84,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
width="100%" rowClasses="wizardSectionHeading"
rendered="#{!empty WizardManager.bean.renditions}">
<h:outputText value="&nbsp;#{msg.create_web_content_summary_rendition_details}" escape="false" />
<h:outputText value="&#160;#{msg.create_web_content_summary_rendition_details}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"
@@ -74,9 +98,9 @@
var="rendition"
varStatus="status">
<a:listItem id="listItem${status.index}"
label="<b>${rendition.name}</b>"
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}"
@@ -103,7 +127,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;"
width="100%" rowClasses="wizardSectionHeading"
rendered="#{!empty WizardManager.bean.uploadedFiles}">
<h:outputText value="&nbsp;#{msg.create_web_content_summary_uploaded_files_details}" escape="false" />
<h:outputText value="&#160;#{msg.create_web_content_summary_uploaded_files_details}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%"
@@ -122,9 +146,10 @@
<h:column>
<h:selectBooleanCheckbox id="startWorkflow"
value="#{WizardManager.bean.startWorkflow}"/>
<h:outputFormat value="&nbsp;#{msg.create_web_content_summary_submit_message}" escape="false">
<h:outputFormat value="&#160;#{msg.create_web_content_summary_submit_message}" escape="false">
<f:param value="#{WizardManager.bean.numberOfSubmittableFiles}"/>
<f:param value="#{WizardManager.bean.formInstanceData.name}"/>
</h:outputFormat>
</h:column>
</h:panelGrid>
</jsp:root>

View File

@@ -1,4 +1,4 @@
<%--
<!--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
@@ -21,13 +21,21 @@
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ 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/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page isELIgnored="false" %>
-->
<jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:a="urn:jsptld:/WEB-INF/alfresco.tld"
xmlns:f="http://java.sun.com/jsf/core"
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">
window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
@@ -35,7 +43,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top:4px;padding-bottom:4px;"
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&nbsp;#{msg.general_properties}" escape="false" />
<h:outputText value="&#160;#{msg.general_properties}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
@@ -44,9 +52,9 @@
activeSelect="true"
style="width:100%;"
itemStyle="vertical-align: top; margin-right: 5px;">
<a:listItem label="<b>${WizardManager.bean.name}</b>"
value="${WizardManager.bean.name}"
<a:listItem value="${WizardManager.bean.name}"
image="/images/icons/website_large.gif">
<jsp:attribute name="label"><b>${WizardManager.bean.name}</b></jsp:attribute>
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
@@ -73,7 +81,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;"
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&nbsp;#{msg.website_web_content_forms}" escape="false" />
<h:outputText value="&#160;#{msg.website_web_content_forms}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="2" cellpadding="3" cellspacing="3" border="0" width="100%">
@@ -85,9 +93,9 @@
style="width:100%;"
itemStyle="vertical-align: top; margin-right: 5px;">
<c:forEach items="${WizardManager.bean.forms}" var="r">
<a:listItem label="<b>${r.name}</b>"
value="${r.name}"
<a:listItem value="${r.name}"
image="/images/icons/webform_large.gif">
<jsp:attribute name="label"><b>${r.name}</b></jsp:attribute>
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
@@ -104,6 +112,7 @@
<c:otherwise>${r.description}</c:otherwise>
</c:choose>
</td>
</tr>
<tr><td>${msg.workflow}:</td>
<td>
<c:choose>
@@ -124,7 +133,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px;padding-bottom:4px;"
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&nbsp;#{msg.website_selected_workflows}" escape="false" />
<h:outputText value="&#160;#{msg.website_selected_workflows}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" width="100%">
@@ -136,9 +145,9 @@
style="width:100%;"
itemStyle="vertical-align: top; margin-right: 5px;">
<c:forEach items="${WizardManager.bean.workflows}" var="r">
<a:listItem label="<b>${r.title}</b>"
value="${r.name}"
<a:listItem value="${r.name}"
image="/images/icons/workflow_large.gif">
<jsp:attribute name="label"><b>${r.title}</b></jsp:attribute>
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
@@ -164,7 +173,7 @@
<h:panelGrid columns="1" cellpadding="2" style="padding-top:16px"
width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="&nbsp;#{msg.create_website_summary_users}" escape="false" />
<h:outputText value="&#160;#{msg.create_website_summary_users}" escape="false" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0"
@@ -176,9 +185,9 @@
style="width:100%;"
itemStyle="vertical-align: top; margin-right: 5px;">
<c:forEach items="${WizardManager.bean.invitedUsers}" var="r">
<a:listItem label="<b>${r.name}</b>"
value="${r.name}"
<a:listItem value="${r.name}"
image="/images/icons/user_large.gif">
<jsp:attribute name="label"><b>${r.name}</b></jsp:attribute>
<jsp:attribute name="description">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup><col width="25%"/><col width="75%"/></colgroup>
@@ -191,3 +200,4 @@
</c:forEach>
</a:selectList>
</h:panelGrid>
</jsp:root>

View File

@@ -846,9 +846,9 @@ dojo.declare("alfresco.xforms.RichTextEditor",
this.statics.currentInstance = this;
tinyMCE.settings.theme_advanced_buttons1 = this._tinyMCE_buttons[0];
tinyMCE.settings.theme_advanced_buttons2 = this._tinyMCE_buttons[1];
tinyMCE.settings.theme_advanced_buttons3 = this._tinyMCE_buttons[2];
tinyMCE.settings.theme_advanced_buttons1 = this._tinyMCE_buttons[0] || "";
tinyMCE.settings.theme_advanced_buttons2 = this._tinyMCE_buttons[1] || "";
tinyMCE.settings.theme_advanced_buttons3 = this._tinyMCE_buttons[2] || "";
tinyMCE.addMCEControl(this.widget, this.id);
var editorDocument = tinyMCE.getInstanceById(this.id).getDoc();
@@ -4006,11 +4006,19 @@ dojo.declare("alfresco.xforms.XForm",
" schemaType " + schemaType +
" appearance " + appearance);
}
if (x == null)
if (x == null || typeof x.className == "undefined")
{
return null;
}
var result = new x.className(this, xformsNode, x.params);
var cstr = eval(x.className);
if (!cstr)
{
throw new Error("unable to load constructor " + x.className +
" for xforms type " + xformsType +
" schemaType " + schemaType +
" appearance " + appearance);
}
var result = new cstr(this, xformsNode, x.params);
if (result instanceof alfresco.xforms.Widget)
{
return result;
@@ -4624,74 +4632,3 @@ tinyMCE.init({
theme_advanced_buttons3: "",
urlconverter_callback: "alfresco_TinyMCE_urlconverter_callback"
});
alfresco.xforms.widgetConfig =
{
"xf:group":
{
"*": { "minimal": { className: alfresco.xforms.HGroup }, "*": { className: alfresco.xforms.VGroup }}
},
"xf:repeat":
{
"*": { "*": { className: alfresco.xforms.Repeat } }
},
"xf:textarea":
{
"*":
{
"minimal": { className: alfresco.xforms.PlainTextEditor },
"*": { className: alfresco.xforms.RichTextEditor, params: [ "bold,italic,underline,separator,forecolor,backcolor,separator,link,unlink,image", "", "" ] },
"full": { className: alfresco.xforms.RichTextEditor, params: ["bold,italic,underline,strikethrough,separator,fontselect,fontsizeselect", "link,unlink,image,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,undo,redo,separator,forecolor,backcolor", "" ] }
}
},
"xf:upload":
{
"*": { "*": { className: alfresco.xforms.FilePicker } }
},
"xf:range":
{
"*": { "*": { className: alfresco.xforms.NumericalRange } }
},
"xf:input":
{
"date": { "*": { className: alfresco.xforms.DatePicker }},
"time": { "*": { className: alfresco.xforms.TimePicker }},
"gDay": { "*": { className: alfresco.xforms.DayPicker }},
"gMonth": { "*": { className: alfresco.xforms.MonthPicker }},
"gYear": { "*": { className: alfresco.xforms.YearPicker }},
"gMonthDay": { "*": { className: alfresco.xforms.MonthDayPicker }},
"gYearMonth": { "*": { className: alfresco.xforms.YearMonthPicker }},
"dateTime": { "*": { className: alfresco.xforms.DateTimePicker }},
"*": { "*": { className: alfresco.xforms.TextField }}
},
"xf:select1":
{
"boolean": { "*": { className: alfresco.xforms.Checkbox }},
"*": { "full": { className: alfresco.xforms.RadioSelect1},
"*": { className: alfresco.xforms.ComboboxSelect1 }}
},
"xf:select":
{
"*": { "full": { className: alfresco.xforms.CheckboxSelect},
"*": { className: alfresco.xforms.ListSelect }}
},
"xf:submit":
{
"*": { "*": { className: alfresco.xforms.Submit } }
},
"xf:trigger":
{
"*": { "*": { className: alfresco.xforms.Trigger }}
},
"xf:switch":
{
"*": { "*": { className: alfresco.xforms.SwitchGroup } }
},
"xf:case":
{
"*": { "*": { className: alfresco.xforms.CaseGroup }}
},
"chiba:data": { "*": { "*": null } },
"xf:label": { "*": { "*": null } },
"xf:alert": { "*": { "*": null } }
}