diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml index f45f66d0f1..2e95fbe78b 100644 --- a/config/alfresco/web-client-config-dialogs.xml +++ b/config/alfresco/web-client-config-dialogs.xml @@ -8,7 +8,7 @@ + description-id="create_space_description" error-message-id="error_create_space_dialog" /> 0) + { + this.errorMsgId = errorMsgId; + } } public String getDescription() @@ -197,6 +204,11 @@ public class DialogsConfigElement extends ConfigElementAdapter return this.titleId; } + public String getErrorMessageId() + { + return this.errorMsgId; + } + /** * @see java.lang.Object#toString() */ @@ -212,7 +224,8 @@ public class DialogsConfigElement extends ConfigElementAdapter buffer.append(" title=").append(this.title); buffer.append(" titleId=").append(this.titleId); buffer.append(" description=").append(this.description); - buffer.append(" descriptionId=").append(this.descriptionId).append(")"); + buffer.append(" descriptionId=").append(this.descriptionId); + buffer.append(" errorMsgId=").append(this.errorMsgId).append(")"); return buffer.toString(); } } diff --git a/source/java/org/alfresco/web/config/DialogsElementReader.java b/source/java/org/alfresco/web/config/DialogsElementReader.java index e47e9d7bf9..f0fc6f4949 100644 --- a/source/java/org/alfresco/web/config/DialogsElementReader.java +++ b/source/java/org/alfresco/web/config/DialogsElementReader.java @@ -41,6 +41,7 @@ public class DialogsElementReader implements ConfigElementReader public static final String ATTR_TITLE_ID = "title-id"; public static final String ATTR_DESCRIPTION = "description"; public static final String ATTR_DESCRIPTION_ID = "description-id"; + public static final String ATTR_ERROR_MSG_ID = "error-message-id"; /** * @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element) @@ -76,10 +77,11 @@ public class DialogsElementReader implements ConfigElementReader String titleId = item.attributeValue(ATTR_TITLE_ID); String description = item.attributeValue(ATTR_DESCRIPTION); String descriptionId = item.attributeValue(ATTR_DESCRIPTION_ID); + String errorMsgId = item.attributeValue(ATTR_ERROR_MSG_ID); DialogsConfigElement.DialogConfig cfg = new DialogsConfigElement.DialogConfig( name, page, bean, actions, icon, title, titleId, description, - descriptionId); + descriptionId, errorMsgId); configElement.addDialog(cfg); } diff --git a/source/java/org/alfresco/web/config/WebClientConfigTest.java b/source/java/org/alfresco/web/config/WebClientConfigTest.java index dd92340e31..cb375f0957 100644 --- a/source/java/org/alfresco/web/config/WebClientConfigTest.java +++ b/source/java/org/alfresco/web/config/WebClientConfigTest.java @@ -656,6 +656,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", dialog.getIcon()); assertEquals("title-id", "create_space_title", dialog.getTitleId()); assertEquals("description-id", "create_space_description", dialog.getDescriptionId()); + assertEquals("error-message-id", "error_create_space_dialog", dialog.getErrorMessageId()); assertNull("title should be null", dialog.getTitle()); assertNull("description should be null", dialog.getDescription()); @@ -671,6 +672,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", dialog.getIcon()); assertEquals("title", "Space Details Dialog", dialog.getTitle()); assertEquals("description", "Space Details Dialog Decsription", dialog.getDescription()); + assertEquals("error-message-id", "error_dialog", dialog.getErrorMessageId()); assertNull("title-id should be null", dialog.getTitleId()); assertNull("description-id should be null", dialog.getDescriptionId()); } @@ -741,6 +743,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/example-logo.gif", wizard.getIcon()); assertEquals("title", "Example Wizard Title", wizard.getTitle()); assertEquals("description", "Example Wizard Description", wizard.getDescription()); + assertEquals("error-message-id", "error_wizard", wizard.getErrorMessageId()); assertNull("title-id should be null", wizard.getTitleId()); assertNull("description-id should be null", wizard.getDescriptionId()); @@ -760,6 +763,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", wizard.getIcon()); assertEquals("title-id", "advanced_space_details_title", wizard.getTitleId()); assertEquals("description-id", "advanced_space_details_description", wizard.getDescriptionId()); + assertEquals("error-message-id", "error_create_space_wizard", wizard.getErrorMessageId()); assertNull("title should be null", wizard.getTitle()); assertNull("description should be null", wizard.getDescription()); List steps = wizard.getStepsAsList(); diff --git a/source/java/org/alfresco/web/config/WizardsConfigElement.java b/source/java/org/alfresco/web/config/WizardsConfigElement.java index 20309bc452..0cb60588fd 100644 --- a/source/java/org/alfresco/web/config/WizardsConfigElement.java +++ b/source/java/org/alfresco/web/config/WizardsConfigElement.java @@ -160,12 +160,15 @@ public class WizardsConfigElement extends ConfigElementAdapter protected String managedBean; protected String icon; protected String actionsConfigId; + protected String errorMsgId = "error_wizard"; + protected Map steps = new LinkedHashMap(4); public WizardConfig(String name, String bean, String actionsConfigId, String icon, String title, String titleId, - String description, String descriptionId) + String description, String descriptionId, + String errorMsgId) { super(title, titleId, description, descriptionId); @@ -176,6 +179,11 @@ public class WizardsConfigElement extends ConfigElementAdapter this.managedBean = bean; this.icon = icon; this.actionsConfigId = actionsConfigId; + + if (errorMsgId != null && errorMsgId.length() > 0) + { + this.errorMsgId = errorMsgId; + } } public String getName() @@ -198,6 +206,11 @@ public class WizardsConfigElement extends ConfigElementAdapter return this.actionsConfigId; } + public String getErrorMessageId() + { + return this.errorMsgId; + } + public int getNumberSteps() { return this.steps.size(); @@ -244,7 +257,8 @@ public class WizardsConfigElement extends ConfigElementAdapter buffer.append(" title=").append(this.title); buffer.append(" titleId=").append(this.titleId); buffer.append(" description=").append(this.description); - buffer.append(" descriptionId=").append(this.descriptionId).append(")"); + buffer.append(" descriptionId=").append(this.descriptionId); + buffer.append(" errorMsgId=").append(this.errorMsgId).append(")"); return buffer.toString(); } } diff --git a/source/java/org/alfresco/web/config/WizardsElementReader.java b/source/java/org/alfresco/web/config/WizardsElementReader.java index 8ea3fb4da9..b775e6fef7 100644 --- a/source/java/org/alfresco/web/config/WizardsElementReader.java +++ b/source/java/org/alfresco/web/config/WizardsElementReader.java @@ -49,6 +49,7 @@ public class WizardsElementReader implements ConfigElementReader public static final String ATTR_DESCRIPTION_ID = "description-id"; public static final String ATTR_INSTRUCTION = "instruction"; public static final String ATTR_INSTRUCTION_ID = "instruction-id"; + public static final String ATTR_ERROR_MSG_ID = "error-message-id"; public static final String ATTR_IF = "if"; public static final String ATTR_PATH = "path"; @@ -85,10 +86,11 @@ public class WizardsElementReader implements ConfigElementReader String titleId = wizard.attributeValue(ATTR_TITLE_ID); String description = wizard.attributeValue(ATTR_DESCRIPTION); String descriptionId = wizard.attributeValue(ATTR_DESCRIPTION_ID); + String errorMsgId = wizard.attributeValue(ATTR_ERROR_MSG_ID); // create the wizard config object WizardsConfigElement.WizardConfig wizardCfg = new WizardsConfigElement.WizardConfig( - name, bean, actions, icon, title, titleId, description, descriptionId); + name, bean, actions, icon, title, titleId, description, descriptionId, errorMsgId); Iterator steps = wizard.elementIterator(ELEMENT_STEP); while (steps.hasNext()) diff --git a/source/test-resources/test-config-dialogs-wizards.xml b/source/test-resources/test-config-dialogs-wizards.xml index 8e02b0d95c..dd8f8d4ed9 100644 --- a/source/test-resources/test-config-dialogs-wizards.xml +++ b/source/test-resources/test-config-dialogs-wizards.xml @@ -13,7 +13,8 @@ + title-id="create_space_title" description-id="create_space_description" + error-message-id="error_create_space_dialog" /> + description-id="advanced_space_details_description" + error-message-id="error_create_space_wizard"> - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - - diff --git a/source/web/jsp/content/create-content-wizard/create-html.jsp b/source/web/jsp/content/create-content-wizard/create-html.jsp index 7f5a498b30..9fa813e2bf 100644 --- a/source/web/jsp/content/create-content-wizard/create-html.jsp +++ b/source/web/jsp/content/create-content-wizard/create-html.jsp @@ -47,11 +47,7 @@ var isIE = (document.all); - - - - - +
diff --git a/source/web/jsp/content/create-content-wizard/create-text.jsp b/source/web/jsp/content/create-content-wizard/create-text.jsp index 1835e135cb..f65af1f775 100644 --- a/source/web/jsp/content/create-content-wizard/create-text.jsp +++ b/source/web/jsp/content/create-content-wizard/create-text.jsp @@ -19,8 +19,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - - \ No newline at end of file diff --git a/source/web/jsp/content/create-content-wizard/details.jsp b/source/web/jsp/content/create-content-wizard/details.jsp index dc072dce91..fdb516d9c1 100644 --- a/source/web/jsp/content/create-content-wizard/details.jsp +++ b/source/web/jsp/content/create-content-wizard/details.jsp @@ -66,8 +66,6 @@ - - diff --git a/source/web/jsp/content/edit-content-properties.jsp b/source/web/jsp/content/edit-content-properties.jsp index 6451f6ed83..6aa2bb0bdc 100644 --- a/source/web/jsp/content/edit-content-properties.jsp +++ b/source/web/jsp/content/edit-content-properties.jsp @@ -19,8 +19,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - - diff --git a/source/web/jsp/dialog/container.jsp b/source/web/jsp/dialog/container.jsp index 8a061b41fd..a5dcd4cd25 100644 --- a/source/web/jsp/dialog/container.jsp +++ b/source/web/jsp/dialog/container.jsp @@ -94,6 +94,9 @@
1.
+ + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> diff --git a/source/web/jsp/rules/conditions.jsp b/source/web/jsp/rules/conditions.jsp index 79f4e71668..ac26fcd9ac 100644 --- a/source/web/jsp/rules/conditions.jsp +++ b/source/web/jsp/rules/conditions.jsp @@ -51,13 +51,7 @@ } } - - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - diff --git a/source/web/jsp/rules/details.jsp b/source/web/jsp/rules/details.jsp index 21ed32b499..9048abe903 100644 --- a/source/web/jsp/rules/details.jsp +++ b/source/web/jsp/rules/details.jsp @@ -35,13 +35,7 @@ } } - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - -
1.
diff --git a/source/web/jsp/spaces/create-space-dialog.jsp b/source/web/jsp/spaces/create-space-dialog.jsp index 727cfc71c0..38170ad0f8 100644 --- a/source/web/jsp/spaces/create-space-dialog.jsp +++ b/source/web/jsp/spaces/create-space-dialog.jsp @@ -63,15 +63,7 @@ } - -<%-- Create Space Dialog Fragment --%> - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - -
diff --git a/source/web/jsp/spaces/create-space-wizard/details.jsp b/source/web/jsp/spaces/create-space-wizard/details.jsp index 32cc2740fb..f7c9feda8e 100644 --- a/source/web/jsp/spaces/create-space-wizard/details.jsp +++ b/source/web/jsp/spaces/create-space-wizard/details.jsp @@ -85,11 +85,7 @@ } } - - - -
diff --git a/source/web/jsp/spaces/edit-space-dialog.jsp b/source/web/jsp/spaces/edit-space-dialog.jsp index d030b7fef5..86f0e52869 100644 --- a/source/web/jsp/spaces/edit-space-dialog.jsp +++ b/source/web/jsp/spaces/edit-space-dialog.jsp @@ -20,12 +20,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> -<%-- Edit Space Dialog Fragment --%> - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - diff --git a/source/web/jsp/wizard/container.jsp b/source/web/jsp/wizard/container.jsp index f2a42990f7..64d64be191 100644 --- a/source/web/jsp/wizard/container.jsp +++ b/source/web/jsp/wizard/container.jsp @@ -98,12 +98,6 @@
- <%-- - - - - - --%> <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> @@ -111,10 +105,7 @@
- <%-- Externalise the error message into an error-message-id attribute on the wizard config --%> - <%-- - - --%> + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>