mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Message for "Website" changes to "Web Project" for appropriate wizards and actions
. New JSF component called SelectList - This generic selection component displays a graphical list of items, each with an optional icon, label, description and tooltip. - The list has three selection modes; single select (radio), multi-select (checkbox) and 'active' selection mode. - The 'active' selection mode renders any child command components (such as ActionLink or CommandButton components) which can then data-bind to each row item in the list. i.e. to allow buttons or links with context for each item. - This various selection modes covers the usage for 4 different screens in the WCM wireframes . Forms page (new step 2) added to Create Web Project wizard - this is currently mostly a test page for the SelectList component git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4236 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -798,29 +798,33 @@ template_space=Template Space
|
||||
select_template=Select the template you want to use.
|
||||
|
||||
# Create Website Wizard messages
|
||||
create_website=Create Website
|
||||
create_website_title=Create Website Wizard
|
||||
create_website_desc=This wizard helps you create a new website space.
|
||||
website_details=Website Details
|
||||
create_website_step1_title=Step One - Website Details
|
||||
create_website_step1_desc=Enter the information about the website.
|
||||
create_website=Create Web Project
|
||||
create_website_title=Create Web Project Wizard
|
||||
create_website_desc=This wizard helps you create a new web project space.
|
||||
website_details=Web Project Details
|
||||
create_website_step1_title=Step One - Web Project Details
|
||||
create_website_step1_desc=Enter the information about the web project.
|
||||
website_forms=Form Templates
|
||||
create_website_step2_title=Step Two - Form Templates
|
||||
create_website_step2_desc=Setup the forms you want to use in this project.
|
||||
website_select_form=Select Form
|
||||
website_invite=Invite Users
|
||||
create_website_step2_title=Step Two - Invite Users
|
||||
create_website_step2_desc=Select users and their roles.
|
||||
create_website_step3_title=Step Three - Invite Users
|
||||
create_website_step3_desc=Select users and their roles.
|
||||
website_notify=Email Users
|
||||
create_website_step3_title=Step Three - Notify Users
|
||||
create_website_step3_desc=Notify the invited users.
|
||||
create_website_finish_instruction=To close this wizard and create your website space click Finish. To review or change your selections click Back.
|
||||
create_website_step4_title=Step Four - Notify Users
|
||||
create_website_step4_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
|
||||
|
||||
# Delete Website Dialog messages
|
||||
delete_website=Delete Website
|
||||
delete_website_info=To remove this website and all associated user sandboxes, click OK.
|
||||
delete_website_confirm=Are you sure you want to delete the website \"{0}\" and all associated user sandboxes?
|
||||
delete_website=Delete Web Project
|
||||
delete_website_info=To remove this web project and all associated user sandboxes, click OK.
|
||||
delete_website_confirm=Are you sure you want to delete the web project \"{0}\" and all associated user sandboxes?
|
||||
|
||||
# Browse Website and Sandboxes messages
|
||||
title_browse_website=Browse Website
|
||||
website_info=Use this view to browse the staging area and user sandboxes for a website.
|
||||
website_info=Use this view to browse the staging area and user sandboxes for a web project.
|
||||
staging_sandbox=Staging Sandbox
|
||||
user_sandboxes=User Sandboxes
|
||||
sandbox_preview=Preview Website
|
||||
@@ -830,7 +834,7 @@ sandbox_submitall=Submit All
|
||||
sandbox_icon=Browse Website
|
||||
import_website_content=Import Website Content
|
||||
title_browse_sandbox=Browse Sandbox
|
||||
sandbox_info=Use this view to browse the files and folders within the sandbox for a website.
|
||||
sandbox_info=Use this view to browse the files and folders within the sandbox for a web project.
|
||||
sandbox_title=Website ''{0}'' sandbox ''{1}''
|
||||
sandbox_staging=Staging
|
||||
website_browse_folders=Browse Folders
|
||||
@@ -839,7 +843,7 @@ creator=Creator
|
||||
modified_items=Modified Items
|
||||
store_created_on=Created On
|
||||
store_created_by=Created By
|
||||
store_working_users=There are {0} user(s) working on this website.
|
||||
store_working_users=There are {0} user(s) working on this web project.
|
||||
avm_node_deleted=Deleted
|
||||
submit=Submit
|
||||
submit_success=Successfully submitted item: {0}
|
||||
|
@@ -15,18 +15,24 @@
|
||||
description-id="create_website_step1_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="invite" title-id="website_invite" description-id="create_website_step2_desc">
|
||||
<page path="/jsp/wcm/create-website-wizard/invite.jsp"
|
||||
<step name="forms" title-id="website_forms" description-id="create_website_step2_desc">
|
||||
<page path="/jsp/wcm/create-website-wizard/forms.jsp"
|
||||
title-id="create_website_step2_title"
|
||||
description-id="create_website_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="notify" title-id="website_notify" description-id="create_website_step3_desc">
|
||||
<page path="/jsp/wcm/create-website-wizard/notify.jsp"
|
||||
<step name="invite" title-id="website_invite" description-id="create_website_step3_desc">
|
||||
<page path="/jsp/wcm/create-website-wizard/invite.jsp"
|
||||
title-id="create_website_step3_title"
|
||||
description-id="create_website_step3_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="notify" title-id="website_notify" description-id="create_website_step4_desc">
|
||||
<page path="/jsp/wcm/create-website-wizard/notify.jsp"
|
||||
title-id="create_website_step4_title"
|
||||
description-id="create_website_step4_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="summary" title-id="summary" description-id="summary_step_description">
|
||||
<page path="/jsp/wizard/summary.jsp"
|
||||
title-id="summary"
|
||||
|
@@ -18,11 +18,13 @@ package org.alfresco.web.bean.wcm;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javax.faces.component.UISelectItem;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
@@ -44,6 +46,8 @@ import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wizard.BaseWizardBean;
|
||||
import org.alfresco.web.bean.wizard.InviteUsersWizard.UserGroupRole;
|
||||
import org.alfresco.web.ui.common.component.UIListItem;
|
||||
import org.alfresco.web.ui.wcm.WebResources;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -275,6 +279,45 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
new String[] {this.name, this.description, buf.toString()});
|
||||
}
|
||||
|
||||
public List<UIListItem> getFormsList()
|
||||
{
|
||||
List<UIListItem> forms = new ArrayList<UIListItem>();
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue("0001");
|
||||
item.setLabel("Company Press Release");
|
||||
item.setDescription("Standard monthly press release form");
|
||||
item.setTooltip("Standard monthly press release form");
|
||||
item.setImage(WebResources.IMAGE_SANDBOX_32);
|
||||
forms.add(item);
|
||||
item = new UIListItem();
|
||||
item.setValue("0002");
|
||||
item.setLabel("Company Site Note");
|
||||
item.setDescription("Main site footer node");
|
||||
item.setTooltip("Basic footer node addition form");
|
||||
item.setImage(WebResources.IMAGE_SANDBOX_32);
|
||||
forms.add(item);
|
||||
item = new UIListItem();
|
||||
item.setValue("0003");
|
||||
item.setLabel("Index Generator");
|
||||
item.setDescription("Complete site index");
|
||||
item.setTooltip("Complete site index generation form");
|
||||
item.setImage(WebResources.IMAGE_SANDBOX_32);
|
||||
forms.add(item);
|
||||
return forms;
|
||||
}
|
||||
|
||||
public String[] getFormsSelectedValue()
|
||||
{
|
||||
return testValue;
|
||||
}
|
||||
|
||||
public void setFormsSelectedValue(String[] value)
|
||||
{
|
||||
testValue = value;
|
||||
}
|
||||
|
||||
private String[] testValue = new String[] {"0001"};
|
||||
|
||||
|
||||
/**
|
||||
* @return the InviteWebsiteUsersWizard delegate bean
|
||||
|
@@ -19,45 +19,51 @@ package org.alfresco.web.ui.common.component;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.component.NamingContainer;
|
||||
import javax.faces.component.UICommand;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.component.UIForm;
|
||||
import javax.faces.component.UIInput;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.ResponseWriter;
|
||||
import javax.faces.el.ValueBinding;
|
||||
import javax.faces.event.AbortProcessingException;
|
||||
import javax.faces.event.FacesEvent;
|
||||
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
|
||||
/**
|
||||
* The SelectList component displays a graphical list of items, each with a label and icon image.
|
||||
* The list has three selection modes; single select (radio), multi-select (checkbox) and active
|
||||
* selection mode (child action components).
|
||||
*
|
||||
* The value for the component is collection of UIListItem objects or a UIListItems instance.
|
||||
*
|
||||
* For passive single and multi-select modes, the selected value(s) can be retrieved from the component.
|
||||
* For active selection mode, appropriate child components such as Command buttons or Action Links
|
||||
* will be rendered for each item in the list, data-binding to the specified 'var' variable should be
|
||||
* used to bind required params. It is then up to the developer to retrieve the selected item param
|
||||
* from the actionListener of the appropriate child component.
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class UISelectList extends UICommand
|
||||
public class UISelectList extends UIInput
|
||||
{
|
||||
private Boolean multiSelect;
|
||||
private String buttonLabel;
|
||||
private Boolean activeSelect;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Construction
|
||||
// Component Impl
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* Default constructor
|
||||
*/
|
||||
public UISelectList()
|
||||
{
|
||||
setRendererType(null);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Component Impl
|
||||
|
||||
/**
|
||||
* @see javax.faces.component.UIComponent#getFamily()
|
||||
*/
|
||||
@@ -75,7 +81,7 @@ public class UISelectList extends UICommand
|
||||
// standard component attributes are restored by the super class
|
||||
super.restoreState(context, values[0]);
|
||||
this.multiSelect = (Boolean)values[1];
|
||||
this.buttonLabel = (String)values[2];
|
||||
this.activeSelect = (Boolean)values[2];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,24 +93,36 @@ public class UISelectList extends UICommand
|
||||
// standard component attributes are saved by the super class
|
||||
values[0] = super.saveState(context);
|
||||
values[1] = this.multiSelect;
|
||||
values[2] = this.buttonLabel;
|
||||
values[2] = this.activeSelect;
|
||||
return (values);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.render.Renderer#decode(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
|
||||
* @see javax.faces.component.UIComponentBase#decode(javax.faces.context.FacesContext)
|
||||
*/
|
||||
public void decode(FacesContext context, UIComponent component)
|
||||
public void decode(FacesContext context)
|
||||
{
|
||||
Map requestMap = context.getExternalContext().getRequestParameterMap();
|
||||
String fieldId = getHiddenFieldName(context, component);
|
||||
String value = (String)requestMap.get(fieldId);
|
||||
Map valuesMap = context.getExternalContext().getRequestParameterValuesMap();
|
||||
|
||||
// we encoded the value to start with our Id
|
||||
if (value != null && value.startsWith(component.getClientId(context) + NamingContainer.SEPARATOR_CHAR))
|
||||
{
|
||||
String selectedValue = value.substring(component.getClientId(context).length() + 1);
|
||||
// save the selected values that match our component Id
|
||||
setSubmittedValue((String[])valuesMap.get(getClientId(context)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.component.UIComponentBase#encodeChildren(javax.faces.context.FacesContext)
|
||||
*/
|
||||
public void encodeChildren(FacesContext context) throws IOException
|
||||
{
|
||||
// we encode child components explicity
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.component.UIComponentBase#getRendersChildren()
|
||||
*/
|
||||
public boolean getRendersChildren()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,8 +135,29 @@ public class UISelectList extends UICommand
|
||||
return;
|
||||
}
|
||||
|
||||
// Prepare the data-binding variable "var" ready for the each cycle of
|
||||
// renderering for the child components.
|
||||
String var = (String)getAttributes().get("var");
|
||||
Map requestMap = context.getExternalContext().getRequestMap();
|
||||
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
|
||||
out.write("<table cellspacing=0 cellpadding=0");
|
||||
String style = (String)getAttributes().get("style");
|
||||
if (style != null)
|
||||
{
|
||||
out.write(" style='");
|
||||
out.write(style);
|
||||
out.write('\'');
|
||||
}
|
||||
String styleClass = (String)getAttributes().get("styleClass");
|
||||
if (styleClass != null)
|
||||
{
|
||||
out.write(" class=");
|
||||
out.write(styleClass);
|
||||
}
|
||||
out.write('>');
|
||||
|
||||
// get the child components and look for compatible ListItem objects
|
||||
for (Iterator i = getChildren().iterator(); i.hasNext(); /**/)
|
||||
{
|
||||
@@ -134,6 +173,10 @@ public class UISelectList extends UICommand
|
||||
UIListItem item = (UIListItem)iter.next();
|
||||
if (item.isRendered())
|
||||
{
|
||||
if (var != null)
|
||||
{
|
||||
requestMap.put(var, item);
|
||||
}
|
||||
renderItem(context, out, item);
|
||||
}
|
||||
}
|
||||
@@ -145,10 +188,20 @@ public class UISelectList extends UICommand
|
||||
{
|
||||
// found a valid UIListItem child to render
|
||||
UIListItem item = (UIListItem)child;
|
||||
if (var != null)
|
||||
{
|
||||
requestMap.put(var, item);
|
||||
}
|
||||
renderItem(context, out, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (var != null)
|
||||
{
|
||||
requestMap.remove(var);
|
||||
}
|
||||
|
||||
out.write("</table>");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,14 +212,106 @@ public class UISelectList extends UICommand
|
||||
* @param item UIListItem representing the item to render
|
||||
*/
|
||||
private void renderItem(FacesContext context, ResponseWriter out, UIListItem item)
|
||||
throws IOException
|
||||
{
|
||||
boolean activeSelect = isActiveSelect();
|
||||
|
||||
// begin the row, add tooltip if present
|
||||
String tooltip = item.getTooltip();
|
||||
out.write("<tr title=\"");
|
||||
out.write(tooltip != null ? tooltip : "");
|
||||
out.write("\">");
|
||||
|
||||
if (activeSelect == false)
|
||||
{
|
||||
// we are rendering passive select list, so either multi or single selection using
|
||||
// checkboxes or radio button control respectively
|
||||
boolean multiSelect = isMultiSelect();
|
||||
String id = getClientId(context);
|
||||
String itemValue = item.getValue().toString();
|
||||
out.write("<td");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyle"), "style");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyleClass"), "class");
|
||||
out.write(" width=16><input type='");
|
||||
out.write(multiSelect ? "checkbox" : "radio");
|
||||
out.write("' name='");
|
||||
out.write(id);
|
||||
out.write("' id='");
|
||||
out.write(id);
|
||||
out.write("' value='");
|
||||
out.write(itemValue);
|
||||
out.write('\'');
|
||||
String[] value = (String[])getValue();
|
||||
if (multiSelect)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
for (int i=0; i<value.length; i++)
|
||||
{
|
||||
if (value[i].equals(itemValue))
|
||||
{
|
||||
out.write(" CHECKED");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value != null && value.length == 1 && value[0].equals(itemValue))
|
||||
{
|
||||
out.write(" CHECKED");
|
||||
}
|
||||
}
|
||||
out.write("></td>");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.component.UICommand#broadcast(javax.faces.event.FacesEvent)
|
||||
*/
|
||||
public void broadcast(FacesEvent event) throws AbortProcessingException
|
||||
// optional 32x32 pixel icon
|
||||
String icon = item.getImage();
|
||||
if (icon != null)
|
||||
{
|
||||
out.write("<td");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyle"), "style");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyleClass"), "class");
|
||||
out.write(" width=34>"); // give pixel space around edges
|
||||
out.write(Utils.buildImageTag(context, icon, 32, 32, ""));
|
||||
out.write("</td>");
|
||||
}
|
||||
|
||||
// label and description text
|
||||
String description = item.getDescription();
|
||||
out.write("<td");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyle"), "style");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyleClass"), "class");
|
||||
out.write("><div style='padding:2px'>");
|
||||
out.write(item.getLabel());
|
||||
out.write("</div><div style='padding:2px'>");
|
||||
if (description != null)
|
||||
{
|
||||
out.write(description);
|
||||
}
|
||||
out.write("</div></td>");
|
||||
|
||||
if (activeSelect)
|
||||
{
|
||||
// we are rendering an active select list with child components next to each item
|
||||
// get the child components and look for compatible Command objects
|
||||
out.write("<td");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyle"), "style");
|
||||
Utils.outputAttribute(out, getAttributes().get("itemStyleClass"), "class");
|
||||
out.write('>');
|
||||
for (Iterator i = getChildren().iterator(); i.hasNext(); /**/)
|
||||
{
|
||||
UIComponent child = (UIComponent)i.next();
|
||||
if (child instanceof UICommand)
|
||||
{
|
||||
out.write("<span style='padding:1px'>");
|
||||
Utils.encodeRecursive(context, child);
|
||||
out.write("</span>");
|
||||
}
|
||||
}
|
||||
out.write("</td>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,25 +353,37 @@ public class UISelectList extends UICommand
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the action button label.
|
||||
* Get the active selection mode flag
|
||||
*
|
||||
* @return true for active selection mode, false otherwise
|
||||
*/
|
||||
public String getButtonLabel()
|
||||
public boolean isActiveSelect()
|
||||
{
|
||||
ValueBinding vb = getValueBinding("buttonLabel");
|
||||
ValueBinding vb = getValueBinding("activeSelect");
|
||||
if (vb != null)
|
||||
{
|
||||
this.buttonLabel = (String)vb.getValue(getFacesContext());
|
||||
this.activeSelect = (Boolean)vb.getValue(getFacesContext());
|
||||
}
|
||||
|
||||
return this.buttonLabel;
|
||||
if (this.activeSelect != null)
|
||||
{
|
||||
return this.activeSelect.booleanValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
// return the default
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param buttonLabel The action button label to set.
|
||||
* Set true for active selection mode, false otherwise
|
||||
*
|
||||
* @param activeSelect True for active selection
|
||||
*/
|
||||
public void setButtonLabel(String buttonLabel)
|
||||
public void setActiveSelect(boolean activeSelect)
|
||||
{
|
||||
this.buttonLabel = buttonLabel;
|
||||
this.activeSelect = activeSelect;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.component.UICommand;
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
/**
|
||||
@@ -46,10 +45,12 @@ public class SelectListTag extends HtmlComponentTag
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
setActionProperty((UICommand)component, this.action);
|
||||
setActionListenerProperty((UICommand)component, this.actionListener);
|
||||
setBooleanProperty(component, "multiSelect", this.multiSelect);
|
||||
setStringProperty(component, "buttonLabel", this.buttonLabel);
|
||||
setBooleanProperty(component, "activeSelect", this.activeSelect);
|
||||
setStringStaticProperty(component, "var", this.var);
|
||||
setStringProperty(component, "itemStyle", this.itemStyle);
|
||||
setStringProperty(component, "itemStyleClass", this.itemStyleClass);
|
||||
setStringProperty(component, "value", this.value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,36 +59,18 @@ public class SelectListTag extends HtmlComponentTag
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
this.action = null;
|
||||
this.actionListener = null;
|
||||
this.multiSelect = null;
|
||||
this.buttonLabel = null;
|
||||
this.activeSelect = null;
|
||||
this.var = null;
|
||||
this.itemStyle = null;
|
||||
this.itemStyleClass = null;
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the action
|
||||
* Set the multi-select mode
|
||||
*
|
||||
* @param action the action
|
||||
*/
|
||||
public void setAction(String action)
|
||||
{
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the actionListener
|
||||
*
|
||||
* @param actionListener the actionListener
|
||||
*/
|
||||
public void setActionListener(String actionListener)
|
||||
{
|
||||
this.actionListener = actionListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the multiSelect
|
||||
*
|
||||
* @param multiSelect the multiSelect
|
||||
* @param multiSelect the multi-select mode
|
||||
*/
|
||||
public void setMultiSelect(String multiSelect)
|
||||
{
|
||||
@@ -95,25 +78,70 @@ public class SelectListTag extends HtmlComponentTag
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the buttonLabel
|
||||
* Set the active selection mode
|
||||
*
|
||||
* @param buttonLabel the buttonLabel
|
||||
* @param activeSelect the active selection mode
|
||||
*/
|
||||
public void setButtonLabel(String buttonLabel)
|
||||
public void setActiveSelect(String activeSelect)
|
||||
{
|
||||
this.buttonLabel = buttonLabel;
|
||||
this.activeSelect = activeSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the variable name for row item context
|
||||
*
|
||||
* @param var the variable name for row item context
|
||||
*/
|
||||
public void setVar(String var)
|
||||
{
|
||||
this.var = var;
|
||||
}
|
||||
|
||||
/** the multiSelect */
|
||||
/**
|
||||
* Set the item Style
|
||||
*
|
||||
* @param itemStyle the item Style
|
||||
*/
|
||||
public void setItemStyle(String itemStyle)
|
||||
{
|
||||
this.itemStyle = itemStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the item Style Class
|
||||
*
|
||||
* @param itemStyleClass the item Style Class
|
||||
*/
|
||||
public void setItemStyleClass(String itemStyleClass)
|
||||
{
|
||||
this.itemStyleClass = itemStyleClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the selected value
|
||||
*
|
||||
* @param value the selected value
|
||||
*/
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/** the selected value */
|
||||
private String value;
|
||||
|
||||
/** the itemStyle */
|
||||
private String itemStyle;
|
||||
|
||||
/** the itemStyleClass */
|
||||
private String itemStyleClass;
|
||||
|
||||
/** the multi-select mode */
|
||||
private String multiSelect;
|
||||
|
||||
/** the buttonLabel */
|
||||
private String buttonLabel;
|
||||
/** the active selection mode */
|
||||
private String activeSelect;
|
||||
|
||||
/** the action */
|
||||
private String action;
|
||||
|
||||
/** the actionListener */
|
||||
private String actionListener;
|
||||
/** the variable name for row item context */
|
||||
private String var;
|
||||
}
|
||||
|
@@ -74,7 +74,6 @@ public class UIUserGroupPicker extends UICommand
|
||||
public void decode(FacesContext context)
|
||||
{
|
||||
Map requestMap = context.getExternalContext().getRequestParameterMap();
|
||||
Map valuesMap = context.getExternalContext().getRequestParameterValuesMap();
|
||||
String fieldId = getHiddenFieldName(context);
|
||||
String value = (String)requestMap.get(fieldId);
|
||||
|
||||
|
@@ -149,7 +149,6 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
public void decode(FacesContext context)
|
||||
{
|
||||
Map requestMap = context.getExternalContext().getRequestParameterMap();
|
||||
Map valuesMap = context.getExternalContext().getRequestParameterValuesMap();
|
||||
String fieldId = getClientId(context);
|
||||
String value = (String)requestMap.get(fieldId);
|
||||
|
||||
|
@@ -1845,10 +1845,14 @@
|
||||
|
||||
<description>
|
||||
The SelectList component displays a graphical list of items, each with a label and icon image.
|
||||
The list has three selection modes; single select (radio), multi-select (checkbox) and command
|
||||
button single item select (action).
|
||||
The value for the component is a bound list of SelectListItem objects.
|
||||
The selected value can be retrieved from the component or during the actionListener event handler.
|
||||
The list has three selection modes; single select (radio), multi-select (checkbox) and active
|
||||
selection mode (child action components).
|
||||
The value for the component is collection of UIListItem objects or a UIListItems instance.
|
||||
For passive single and multi-select modes, the selected value(s) can be retrieved from the component.
|
||||
For active selection mode, appropriate child components such as Command buttons or Action Links
|
||||
will be rendered for each item in the list, data-binding to the specified 'var' variable should be
|
||||
used to bind required params. It is then up to the developer to retrieve the selected item param
|
||||
from the actionListener of the appropriate child component.
|
||||
</description>
|
||||
|
||||
<attribute>
|
||||
@@ -1881,6 +1885,24 @@
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>itemStyle</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>itemStyleClass</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>var</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>multiSelect</name>
|
||||
<required>false</required>
|
||||
@@ -1888,26 +1910,20 @@
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>buttonLabel</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>action</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>actionListener</name>
|
||||
<name>activeSelect</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>value</name>
|
||||
<required>true</required>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>values</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
</tag>
|
||||
|
@@ -559,3 +559,15 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl
|
||||
{
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.selectListTable
|
||||
{
|
||||
border: 1px solid #999999;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.selectListItem
|
||||
{
|
||||
background-color: #eeeeee;
|
||||
border-bottom: 2px solid #ffffff;
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading">
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.create_website_title}"/>
|
||||
<h:outputText value="#{msg.website_details}"/>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
|
46
source/web/jsp/wcm/create-website-wizard/forms.jsp
Normal file
46
source/web/jsp/wcm/create-website-wizard/forms.jsp
Normal file
@@ -0,0 +1,46 @@
|
||||
<%--
|
||||
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" %>
|
||||
|
||||
<h:panelGrid columns="1" cellpadding="2" cellpadding="3" width="100%">
|
||||
<h:outputText styleClass="mainSubText" value="#{msg.website_select_form}:" />
|
||||
<a:selectList multiSelect="true" activeSelect="false" value="#{WizardManager.bean.formsSelectedValue}"
|
||||
styleClass="selectListTable" itemStyleClass="selectListItem">
|
||||
<a:listItems value="#{WizardManager.bean.formsList}" />
|
||||
</a:selectList>
|
||||
|
||||
<h:outputText styleClass="mainSubText" value="#{msg.website_select_form}:" />
|
||||
<a:selectList multiSelect="false" activeSelect="false"
|
||||
styleClass="selectListTable" itemStyleClass="selectListItem">
|
||||
<a:listItems value="#{WizardManager.bean.formsList}" />
|
||||
</a:selectList>
|
||||
|
||||
<h:outputText styleClass="mainSubText" value="#{msg.website_select_form}:" />
|
||||
<a:selectList var="r" multiSelect="false" activeSelect="true"
|
||||
styleClass="selectListTable" itemStyleClass="selectListItem">
|
||||
<a:listItems value="#{WizardManager.bean.formsList}" />
|
||||
<h:commandButton value="Add to List" styleClass="dialogControls">
|
||||
<f:param name="id" value="#{r.value}" />
|
||||
</h:commandButton>
|
||||
</a:selectList>
|
||||
</h:panelGrid>
|
Reference in New Issue
Block a user