diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties
index cc5e815159..dce4c5c8a7 100644
--- a/config/alfresco/messages/webclient.properties
+++ b/config/alfresco/messages/webclient.properties
@@ -806,7 +806,6 @@ create_website_step1_title=Step One - Web Project Details
create_website_step1_desc=Enter the information about the web project.
website_dnsname=DNS name
validation_invalid_dns_name=Invalid website DNS name, a minimum of 2 alpha-numeric characters are accepted.
-website_forms=Form Templates
website_selected_forms=Selected Web Content Forms
website_save_location=Save Location
website_save_location_info=Use the following pattern when saving content
@@ -814,23 +813,29 @@ website_filename_pattern=Filename pattern
website_workflow=Workflow
website_workflow_info=Use the following workflow
website_form_summary=Using workflow ''{0}'', with filename pattern ''{1}'', {2} template(s) selected.
+website_forms=Define Forms
form_template_details=Form Details
form_template_details_desc=Edit the details of this Form Template
form_template_conf_workflow=Configure Workflow
form_template_select_templates=Select Templates
form_template_templates=Manage Presentation Templates
form_template_templates_desc=Setup the Presentation Templates you want to use for the Web Content Form.
-create_website_step2_title=Step Two - Form Templates
+create_website_step2_title=Step Two - Define Web Content Forms
create_website_step2_desc=Setup the forms you want to use in this project.
website_select_form=Select Form Templates to use
website_select_templates=Select Presentation Templates to use
website_selected_templates=Selected Presentation Templates
+website_settings=Specify Settings
+create_website_step3_title=Step Three - Web Project Settings
+create_website_step3_desc=Specify settings for this Web Project.
+website_select_workflows=Select Workflows to use
+website_selected_workflows=Selected Workflows
website_invite=Invite Users
-create_website_step3_title=Step Three - Invite Users
-create_website_step3_desc=Select users and their roles.
+create_website_step4_title=Step Four - Invite Users
+create_website_step4_desc=Select users and their roles.
website_notify=Email Users
-create_website_step4_title=Step Four - Notify Users
-create_website_step4_desc=Notify the invited users.
+create_website_step5_title=Step Five - Notify Users
+create_website_step5_desc=Notify the invited users.
create_website_finish_instruction=To close this wizard and create your web project space click Finish. To review or change your selections click Back.
create_website_summary_users=Users and Roles
diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml
index 0bda56cb71..62eef228e9 100644
--- a/config/alfresco/web-client-config-wizards.xml
+++ b/config/alfresco/web-client-config-wizards.xml
@@ -21,18 +21,24 @@
description-id="create_website_step2_desc"
instruction-id="default_instruction" />
-
-
+
-
-
+
+
+
+
formsList = null;
- /** list of forms wrapper objects */
+ /** list of form wrapper objects */
private List forms = null;
/** Current form action dialog context */
private FormWrapper actionForm = null;
+ /** datamodel for table of selected workflows */
+ private DataModel workflowsDataModel = null;
+
+ /** transient list of workflow UIListItem objects */
+ private List workflowsList = null;
+
+ /** list of workflow wrapper objects */
+ private List workflows = null;
+
// ------------------------------------------------------------------------------
// Wizard implementation
@@ -113,6 +123,8 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.description = null;
this.formsDataModel = null;
this.forms = new ArrayList(8);
+ this.workflowsDataModel = null;
+ this.workflows = new ArrayList(4);
// init the dependant bean we are using for the invite users pages
InviteWebsiteUsersWizard wiz = getInviteUsersWizard();
@@ -208,6 +220,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
return outcome;
}
+
+ // ------------------------------------------------------------------------------
+ // Service setters
+
/**
* @param avmService The AVMService to set.
*/
@@ -224,6 +240,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.permissionService = permissionService;
}
+
+ // ------------------------------------------------------------------------------
+ // Bean getters and setters
+
/**
* @return Returns the name.
*/
@@ -239,26 +259,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
{
this.name = name;
}
-
- public DataModel getFormsDataModel()
- {
- if (this.formsDataModel == null)
- {
- this.formsDataModel = new ListDataModel();
- }
-
- this.formsDataModel.setWrappedData(this.forms);
-
- return this.formsDataModel;
- }
-
- public void setFormsDataModel(DataModel formsDataModel)
- {
- this.formsDataModel = formsDataModel;
- }
/**
- * @return
+ * @return DNS name
*/
public String getDnsName()
{
@@ -266,7 +269,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
}
/**
- * @param dnsName
+ * @param DNS name
*/
public void setDnsName(String dnsName)
{
@@ -340,8 +343,35 @@ public class CreateWebsiteWizard extends BaseWizardBean
new String[] {this.name, this.description, buf.toString()});
}
+
+ // ------------------------------------------------------------------------------
+ // Define Web Content Workflows page
+
/**
- * @return List of UI items to represent the available Forms for all websites
+ * @return JSF data model for the Form templates
+ */
+ public DataModel getFormsDataModel()
+ {
+ if (this.formsDataModel == null)
+ {
+ this.formsDataModel = new ListDataModel();
+ }
+
+ this.formsDataModel.setWrappedData(this.forms);
+
+ return this.formsDataModel;
+ }
+
+ /**
+ * @param formsDataModel JSF data model for the Form templates
+ */
+ public void setFormsDataModel(DataModel formsDataModel)
+ {
+ this.formsDataModel = formsDataModel;
+ }
+
+ /**
+ * @return List of UI items to represent the available Workflows for all websites
*/
public List getFormsList()
{
@@ -410,7 +440,83 @@ public class CreateWebsiteWizard extends BaseWizardBean
{
this.actionForm = actionForm;
}
+
+
+ // ------------------------------------------------------------------------------
+ // Specify Settings (ah-hoc Workflows) page
+
+ /**
+ * @return JSF data model for the Workflow templates
+ */
+ public DataModel getWorkflowsDataModel()
+ {
+ if (this.workflowsDataModel == null)
+ {
+ this.workflowsDataModel = new ListDataModel();
+ }
+
+ this.workflowsDataModel.setWrappedData(this.workflows);
+
+ return this.workflowsDataModel;
+ }
+ /**
+ * @param workflowsDataModel JSF data model for the Workflow templates
+ */
+ public void setWorkflowsDataModel(DataModel workflowsDataModel)
+ {
+ this.workflowsDataModel = workflowsDataModel;
+ }
+
+ /**
+ * @return List of UI items to represent the available Workflows for all websites
+ */
+ public List getWorkflowsList()
+ {
+ List items = new ArrayList();
+
+ // TODO: add list of workflows from config
+ UIListItem item = new UIListItem();
+ item.setValue("default");
+ item.setLabel("Default");
+ item.setDescription("Default adhoc workflow");
+ item.setImage(WebResources.IMAGE_WORKFLOW_32);
+ items.add(item);
+
+ this.workflowsList = items;
+ return items;
+ }
+
+ /**
+ * Action handler called when the Add to List button is pressed for a workflow
+ */
+ public void addWorkflow(ActionEvent event)
+ {
+ UISelectList selectList = (UISelectList)event.getComponent().findComponent(COMPONENT_WORKFLOWLIST);
+ int index = selectList.getRowIndex();
+ if (index != -1)
+ {
+ String workflow = (String)this.workflowsList.get(index).getValue();
+ this.workflows.add(new WorkflowWrapper(workflow, null));
+ }
+ }
+
+ /**
+ * Remove a workflow from the selected list
+ */
+ public void removeWorkflow(ActionEvent event)
+ {
+ WorkflowWrapper wrapper = (WorkflowWrapper)this.workflowsDataModel.getRowData();
+ if (wrapper != null)
+ {
+ this.workflows.remove(wrapper);
+ }
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Invite users page
+
/**
* @return the InviteWebsiteUsersWizard delegate bean
*/
@@ -420,6 +526,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
FacesContext.getCurrentInstance(), "InviteWebsiteUsersWizard");
}
+
+ // ------------------------------------------------------------------------------
+ // Helper methods
+
/**
* Helper to get the ID of the 'Websites' system folder
*
@@ -670,8 +780,11 @@ public class CreateWebsiteWizard extends BaseWizardBean
}
+ // ------------------------------------------------------------------------------
+ // Inner classes
+
/**
- * Wrapper class for a configurable template Form instance in the UI
+ * Wrapper class for a configurable template Form instance
*/
public static class FormWrapper
{
@@ -779,6 +892,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
}
}
+ /**
+ * Class to represent a single configured Presentation Template instance
+ */
public static class PresentationTemplate
{
private RenderingEngine engine;
@@ -835,4 +951,43 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.filenamePattern = filenamePattern;
}
}
+
+ /**
+ * Class to represent a single configured Workflow instance
+ */
+ public static class WorkflowWrapper
+ {
+ private String name;
+ private String filenamePattern;
+
+ public WorkflowWrapper(String name, String filenamePattern)
+ {
+ this.name = name;
+ this.filenamePattern = filenamePattern;
+ }
+
+ /**
+ * @return Returns the name of the workflow.
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+ /**
+ * @return Returns the filename pattern.
+ */
+ public String getFilenamePattern()
+ {
+ return this.filenamePattern;
+ }
+
+ /**
+ * @param filenamePattern The filename pattern to set.
+ */
+ public void setFilenamePattern(String filenamePattern)
+ {
+ this.filenamePattern = filenamePattern;
+ }
+ }
}
diff --git a/source/java/org/alfresco/web/bean/wcm/FormDetailsDialog.java b/source/java/org/alfresco/web/bean/wcm/FormDetailsDialog.java
index a4e1ecf7c9..8a9e7f7aa1 100644
--- a/source/java/org/alfresco/web/bean/wcm/FormDetailsDialog.java
+++ b/source/java/org/alfresco/web/bean/wcm/FormDetailsDialog.java
@@ -21,13 +21,9 @@ import java.util.List;
import java.util.Map;
import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
import org.alfresco.service.cmr.avm.AVMService;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.web.bean.TemplateSupportBean;
import org.alfresco.web.bean.dialog.BaseDialogBean;
-import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.wcm.WebResources;
@@ -35,6 +31,9 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
+ * Backing bean for the Website Project Form Details dialog.
+ * Launched from the Form Details button on the Define Web Content Forms page.
+ *
* @author Kevin Roast
*/
public class FormDetailsDialog extends BaseDialogBean
@@ -47,7 +46,7 @@ public class FormDetailsDialog extends BaseDialogBean
private String title;
private String description;
private String filenamePattern;
- private String[] workflowSelectedValue = {"default"};
+ private String[] workflowSelectedValue;
/**
@@ -59,6 +58,8 @@ public class FormDetailsDialog extends BaseDialogBean
super.init(parameters);
this.title = null;
this.description = null;
+ this.filenamePattern = null;
+ this.workflowSelectedValue = null;
}
/**
@@ -150,6 +151,14 @@ public class FormDetailsDialog extends BaseDialogBean
*/
public String[] getWorkflowSelectedValue()
{
+ if (this.workflowSelectedValue == null)
+ {
+ String workflow = getActionForm().getWorkflow();
+ if (workflow != null)
+ {
+ this.workflowSelectedValue = new String[] {workflow};
+ }
+ }
return this.workflowSelectedValue;
}
@@ -168,6 +177,7 @@ public class FormDetailsDialog extends BaseDialogBean
{
List items = new ArrayList();
+ // TODO: add list of workflows from config
UIListItem item = new UIListItem();
item.setValue("default");
item.setLabel("Default");
diff --git a/source/java/org/alfresco/web/bean/wcm/FormTemplatesDialog.java b/source/java/org/alfresco/web/bean/wcm/FormTemplatesDialog.java
index 04c0f7622b..9474eaaa11 100644
--- a/source/java/org/alfresco/web/bean/wcm/FormTemplatesDialog.java
+++ b/source/java/org/alfresco/web/bean/wcm/FormTemplatesDialog.java
@@ -29,15 +29,18 @@ import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.web.bean.dialog.BaseDialogBean;
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.PresentationTemplate;
+import org.alfresco.web.forms.Form;
+import org.alfresco.web.forms.RenderingEngine;
import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.common.component.UISelectList;
import org.alfresco.web.ui.wcm.WebResources;
-import org.alfresco.web.forms.Form;
-import org.alfresco.web.forms.RenderingEngine;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
+ * Backing bean for the Website Project Form Templates dialog.
+ * Launched from the Select Templates button on the Define Web Content Forms page.
+ *
* @author Kevin Roast
*/
public class FormTemplatesDialog extends BaseDialogBean
@@ -94,6 +97,9 @@ public class FormTemplatesDialog extends BaseDialogBean
return this.websiteWizard.getActionForm();
}
+ /**
+ * @return JSF data model wrapping the templates selected by the user
+ */
public DataModel getTemplatesDataModel()
{
if (this.templatesDataModel == null)
@@ -106,6 +112,9 @@ public class FormTemplatesDialog extends BaseDialogBean
return this.templatesDataModel;
}
+ /**
+ * @param templatesDataModel JSF data model wrapping the templates
+ */
public void setTemplatesDataModel(DataModel templatesDataModel)
{
this.templatesDataModel = templatesDataModel;
diff --git a/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java b/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java
index d1c5ee2819..ef99cf45bc 100644
--- a/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/InviteWebsiteUsersWizard.java
@@ -25,6 +25,18 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
private Node website;
+
+ /**
+ * @see org.alfresco.web.bean.wizard.InviteUsersWizard#init()
+ */
+ @Override
+ public void init()
+ {
+ super.init();
+ // only allow one selection per authority
+ allowDuplicateAuthorities = false;
+ }
+
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#getWizardDescription()
*/
diff --git a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java b/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
index a169f94f8a..39fd4ab008 100644
--- a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
+++ b/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
@@ -94,6 +94,9 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
/** list of user/group role wrapper objects */
private List userGroupRoles = null;
+ /** True to allow duplicate authorities (with a different role) */
+ protected boolean allowDuplicateAuthorities = true;
+
/** dialog state */
private String notify = NOTIFY_YES;
@@ -387,7 +390,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
{
UserGroupRole wrapper = this.userGroupRoles.get(n);
if (authority.equals(wrapper.getAuthority()) &&
- role.equals(wrapper.getRole()))
+ (!this.allowDuplicateAuthorities || role.equals(wrapper.getRole())))
{
foundExisting = true;
break;
diff --git a/source/java/org/alfresco/web/ui/common/component/UISelectList.java b/source/java/org/alfresco/web/ui/common/component/UISelectList.java
index dac0b66e01..a9575ba85e 100644
--- a/source/java/org/alfresco/web/ui/common/component/UISelectList.java
+++ b/source/java/org/alfresco/web/ui/common/component/UISelectList.java
@@ -441,17 +441,20 @@ public class UISelectList extends UIInput implements NamingContainer
*/
public void setRowIndex(int rowIndex)
{
- this.rowIndex = rowIndex;
- for (Iterator itr=getChildren().iterator(); itr.hasNext(); /**/)
+ if (isActiveSelect())
{
- UIComponent child = (UIComponent)itr.next();
- if (child instanceof UIListItem == false && child instanceof UIListItems == false)
+ this.rowIndex = rowIndex;
+ for (Iterator itr=getChildren().iterator(); itr.hasNext(); /**/)
{
- // forces a reset of the clientId for the component
- // This is then regenerated - relative to this naming container which itself uses the
- // current row index as part of the Id. This is what facilities the correct component
- // rendering submit script and then identified during the decode() phase.
- child.setId(child.getId());
+ UIComponent child = (UIComponent)itr.next();
+ if (child instanceof UIListItem == false && child instanceof UIListItems == false)
+ {
+ // forces a reset of the clientId for the component
+ // This is then regenerated - relative to this naming container which itself uses the
+ // current row index as part of the Id. This is what facilities the correct component
+ // rendering submit script and then identified during the decode() phase.
+ child.setId(child.getId());
+ }
}
}
}
diff --git a/source/web/jsp/wcm/create-website-wizard/form-templates.jsp b/source/web/jsp/wcm/create-website-wizard/form-templates.jsp
index 114e151f28..581b5349b7 100644
--- a/source/web/jsp/wcm/create-website-wizard/form-templates.jsp
+++ b/source/web/jsp/wcm/create-website-wizard/form-templates.jsp
@@ -40,7 +40,7 @@
rendered="#{DialogManager.bean.templatesDataModel.rowCount != 0}">
-
+
diff --git a/source/web/jsp/wcm/create-website-wizard/forms.jsp b/source/web/jsp/wcm/create-website-wizard/forms.jsp
index 594a650b83..4b8f3d649b 100644
--- a/source/web/jsp/wcm/create-website-wizard/forms.jsp
+++ b/source/web/jsp/wcm/create-website-wizard/forms.jsp
@@ -43,7 +43,7 @@
rendered="#{WizardManager.bean.formsDataModel.rowCount != 0}">
-
+
diff --git a/source/web/jsp/wcm/create-website-wizard/notify.jsp b/source/web/jsp/wcm/create-website-wizard/notify.jsp
index 5f706bd515..5eb9cee86b 100644
--- a/source/web/jsp/wcm/create-website-wizard/notify.jsp
+++ b/source/web/jsp/wcm/create-website-wizard/notify.jsp
@@ -52,7 +52,15 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/wcm/create-website-wizard/settings.jsp b/source/web/jsp/wcm/create-website-wizard/settings.jsp
new file mode 100644
index 0000000000..c032022974
--- /dev/null
+++ b/source/web/jsp/wcm/create-website-wizard/settings.jsp
@@ -0,0 +1,70 @@
+<%--
+ Copyright (C) 2005 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
+<%@ page isELIgnored="false" %>
+
+
+ <%-- Workflow selection list - scrollable DIV area --%>
+
+
+
+
+
+ <%-- Selected Workflow table, with configuration buttons and info text --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+