Merged V1.4 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3925 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3965 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-09-29 07:45:33 +00:00
parent d4c5c3562a
commit cba5171884
23 changed files with 386 additions and 197 deletions

View File

@@ -963,6 +963,7 @@ select_reject_step=Do you want to provide a reject step?
choose_copy_move_location=Choose whether you want to move or copy the content and also the location. choose_copy_move_location=Choose whether you want to move or copy the content and also the location.
start_workflow=Start Advanced Workflow start_workflow=Start Advanced Workflow
start_workflow_wizard=Start Advanced Workflow Wizard start_workflow_wizard=Start Advanced Workflow Wizard
start_named_workflow_wizard=Start {0} Workflow Wizard
start_workflow_desc=This wizard helps you start an advanced workflow for an item in the repository. start_workflow_desc=This wizard helps you start an advanced workflow for an item in the repository.
available_workflows=Available workflows available_workflows=Available workflows
step_choose_workflow=Choose Workflow step_choose_workflow=Choose Workflow
@@ -1207,6 +1208,7 @@ status_space_updated=Successfully updated space ''{0}''.
# Validation Messages # Validation Messages
validation_mandatory={0} is a mandatory field. validation_mandatory={0} is a mandatory field.
validation_string_length={0} must be between {1} and {2} characters in length. validation_string_length={0} must be between {1} and {2} characters in length.
validation_is_number={0} must contain a number.
validation_regex={0} is invalid. validation_regex={0} is invalid.
validation_regex_not_match={0} is invalid. validation_regex_not_match={0} is invalid.
validation_numeric_range={0} must be between {1} and {2}. validation_numeric_range={0} must be between {1} and {2}.

View File

@@ -184,8 +184,7 @@
<!-- Definition of the Start Workflow wizard --> <!-- Definition of the Start Workflow wizard -->
<wizard name="startWorkflow" managed-bean="StartWorkflowWizard" <wizard name="startWorkflow" managed-bean="StartWorkflowWizard"
title-id="start_workflow_wizard" description-id="start_workflow_desc" description-id="start_workflow_desc" icon="/images/icons/new_workflow_large.gif">
icon="/images/icons/new_workflow_large.gif">
<step name="choose-workflow" title-id="step_choose_workflow" <step name="choose-workflow" title-id="step_choose_workflow"
description-id="start_workflow_choose_desc"> description-id="start_workflow_choose_desc">
<page path="/jsp/workflow/start-workflow-wizard/choose-workflow.jsp" <page path="/jsp/workflow/start-workflow-wizard/choose-workflow.jsp"

View File

@@ -535,6 +535,9 @@ public class BrowseBean implements IContextListener
// push the view mode into the lists // push the view mode into the lists
setBrowseViewMode(viewMode); setBrowseViewMode(viewMode);
// setup dispatch context for custom views
this.navigator.setupDispatchContext(this.navigator.getCurrentNode());
navigateBrowseScreen(); navigateBrowseScreen();
} }
else else
@@ -666,7 +669,7 @@ public class BrowseBean implements IContextListener
catch (InvalidNodeRefException refErr) catch (InvalidNodeRefException refErr)
{ {
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {refErr.getNodeRef()}) ); FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {refErr.getNodeRef()}), refErr );
this.containerNodes = Collections.<Node>emptyList(); this.containerNodes = Collections.<Node>emptyList();
this.contentNodes = Collections.<Node>emptyList(); this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
@@ -840,7 +843,7 @@ public class BrowseBean implements IContextListener
catch (InvalidNodeRefException refErr) catch (InvalidNodeRefException refErr)
{ {
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {refErr.getNodeRef()}) ); FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {refErr.getNodeRef()}), refErr );
this.containerNodes = Collections.<Node>emptyList(); this.containerNodes = Collections.<Node>emptyList();
this.contentNodes = Collections.<Node>emptyList(); this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}

View File

@@ -157,6 +157,8 @@ public class TrashcanBean implements IContextListener
/** User filter search box text */ /** User filter search box text */
private String userSearchText = null; private String userSearchText = null;
private boolean inProgress = false;
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Bean property getters and setters // Bean property getters and setters
@@ -783,6 +785,12 @@ public class TrashcanBean implements IContextListener
* Action handler to recover the list items * Action handler to recover the list items
*/ */
public String recoverListedItemsOK() public String recoverListedItemsOK()
{
if (inProgress == true) return null;
inProgress = true;
try
{ {
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
@@ -822,6 +830,11 @@ public class TrashcanBean implements IContextListener
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg); FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
fc.addMessage(null, facesMsg); fc.addMessage(null, facesMsg);
} }
}
finally
{
inProgress = false;
}
return OUTCOME_RECOVERY_REPORT; return OUTCOME_RECOVERY_REPORT;
} }
@@ -830,6 +843,12 @@ public class TrashcanBean implements IContextListener
* Action handler called to recover all items from the store (Admin only) * Action handler called to recover all items from the store (Admin only)
*/ */
public String recoverAllItemsOK() public String recoverAllItemsOK()
{
if (inProgress == true) return null;
inProgress = true;
try
{ {
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
@@ -864,6 +883,11 @@ public class TrashcanBean implements IContextListener
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg); FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
fc.addMessage(null, facesMsg); fc.addMessage(null, facesMsg);
} }
}
finally
{
inProgress = false;
}
return OUTCOME_RECOVERY_REPORT; return OUTCOME_RECOVERY_REPORT;
} }
@@ -883,6 +907,10 @@ public class TrashcanBean implements IContextListener
*/ */
public String deleteListedItemsOK() public String deleteListedItemsOK()
{ {
if (inProgress == true) return null;
inProgress = true;
try try
{ {
List<NodeRef> nodeRefs = new ArrayList<NodeRef>(this.listedItems.size()); List<NodeRef> nodeRefs = new ArrayList<NodeRef>(this.listedItems.size());
@@ -897,6 +925,10 @@ public class TrashcanBean implements IContextListener
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
} }
finally
{
inProgress = false;
}
return OUTCOME_DIALOGCLOSE; return OUTCOME_DIALOGCLOSE;
} }
@@ -906,6 +938,10 @@ public class TrashcanBean implements IContextListener
*/ */
public String deleteAllItemsOK() public String deleteAllItemsOK()
{ {
if (inProgress == true) return null;
inProgress = true;
try try
{ {
this.nodeArchiveService.purgeAllArchivedNodes(Repository.getStoreRef()); this.nodeArchiveService.purgeAllArchivedNodes(Repository.getStoreRef());
@@ -915,6 +951,10 @@ public class TrashcanBean implements IContextListener
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
} }
finally
{
inProgress = false;
}
return OUTCOME_DIALOGCLOSE; return OUTCOME_DIALOGCLOSE;
} }

View File

@@ -48,13 +48,27 @@ public final class DialogManager
*/ */
public void setCurrentDialog(DialogConfig config) public void setCurrentDialog(DialogConfig config)
{ {
// make sure the managed bean is present
String beanName = config.getManagedBean(); String beanName = config.getManagedBean();
IDialogBean dialog = (IDialogBean)FacesHelper.getManagedBean(
FacesContext.getCurrentInstance(), beanName);
if (dialog == null) Object bean = FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), beanName);
if (bean == null)
{ {
throw new AlfrescoRuntimeException("Failed to find managed bean '" + beanName + "'"); throw new AlfrescoRuntimeException("Failed to start dialog as managed bean '" + beanName +
"' has not been defined");
}
// make sure the bean implements the IDialogBean interface
IDialogBean dialog = null;
if (bean instanceof IDialogBean)
{
dialog = (IDialogBean)bean;
}
else
{
throw new AlfrescoRuntimeException("Failed to start dialog as managed bean '" + beanName +
"' does not implement the required IDialogBean interface");
} }
// initialise the managed bean // initialise the managed bean

View File

@@ -5,6 +5,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.ui.repo.RepoConstants; import org.alfresco.web.ui.repo.RepoConstants;
import org.alfresco.web.ui.repo.component.UIMultiValueEditor;
import org.alfresco.web.ui.repo.component.property.PropertySheetItem; import org.alfresco.web.ui.repo.component.property.PropertySheetItem;
import org.alfresco.web.ui.repo.component.property.UIPropertySheet; import org.alfresco.web.ui.repo.component.property.UIPropertySheet;
@@ -36,6 +37,20 @@ public class CategorySelectorGenerator extends BaseComponentGenerator
@Override @Override
protected void setupMandatoryValidation(FacesContext context, UIPropertySheet propertySheet, protected void setupMandatoryValidation(FacesContext context, UIPropertySheet propertySheet,
PropertySheetItem item, UIComponent component, boolean realTimeChecking, String idSuffix) PropertySheetItem item, UIComponent component, boolean realTimeChecking, String idSuffix)
{
if (component instanceof UIMultiValueEditor)
{
// Override the setup of the mandatory validation
// so we can send the _current_value id suffix.
// We also enable real time so the page load
// check disables the ok button if necessary, as the user
// adds or removes items from the multi value list the
// page will be refreshed and therefore re-check the status.
super.setupMandatoryValidation(context, propertySheet, item,
component, true, "_current_value");
}
else
{ {
// Override the setup of the mandatory validation // Override the setup of the mandatory validation
// so we can send the _selected id suffix. // so we can send the _selected id suffix.
@@ -46,6 +61,7 @@ public class CategorySelectorGenerator extends BaseComponentGenerator
super.setupMandatoryValidation(context, propertySheet, item, super.setupMandatoryValidation(context, propertySheet, item,
component, true, "_selected"); component, true, "_selected");
} }
}
@Override @Override
protected ControlType getControlType() protected ControlType getControlType()

View File

@@ -1,5 +1,6 @@
package org.alfresco.web.bean.generator; package org.alfresco.web.bean.generator;
import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -12,12 +13,15 @@ import javax.faces.model.SelectItem;
import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint; import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
import org.alfresco.service.cmr.dictionary.Constraint; import org.alfresco.service.cmr.dictionary.Constraint;
import org.alfresco.service.cmr.dictionary.ConstraintDefinition; import org.alfresco.service.cmr.dictionary.ConstraintDefinition;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.ui.common.ComponentConstants; import org.alfresco.web.ui.common.ComponentConstants;
import org.alfresco.web.ui.repo.component.UIMultiValueEditor; import org.alfresco.web.ui.repo.component.UIMultiValueEditor;
import org.alfresco.web.ui.repo.component.property.PropertySheetItem; import org.alfresco.web.ui.repo.component.property.PropertySheetItem;
import org.alfresco.web.ui.repo.component.property.UIPropertySheet; import org.alfresco.web.ui.repo.component.property.UIPropertySheet;
import org.alfresco.web.ui.repo.component.property.UIPropertySheet.ClientValidation;
/** /**
* Generates a text field component. * Generates a text field component.
@@ -166,6 +170,47 @@ public class TextFieldGenerator extends BaseComponentGenerator
} }
} }
@Override
@SuppressWarnings("unchecked")
protected void setupConstraints(FacesContext context,
UIPropertySheet propertySheet, PropertySheetItem property,
PropertyDefinition propertyDef, UIComponent component)
{
// do the default processing first
super.setupConstraints(context, propertySheet, property,
propertyDef, component);
// if the property type is a number based type and the property
// sheet is in edit mode and validation is turned, on add the
// validateIsNumber validation function
if (propertySheet.inEditMode() && propertySheet.isValidationEnabled() &&
propertyDef != null)
{
// check the type of the property is a number
if (propertyDef.getDataType().getName().equals(DataTypeDefinition.DOUBLE) ||
propertyDef.getDataType().getName().equals(DataTypeDefinition.FLOAT) ||
propertyDef.getDataType().getName().equals(DataTypeDefinition.INT) ||
propertyDef.getDataType().getName().equals(DataTypeDefinition.LONG))
{
List<String> params = new ArrayList<String>(3);
// add the value parameter
String value = "document.getElementById('" +
component.getClientId(context) + "')";
params.add(value);
// add the validation failed message to show
String msg = Application.getMessage(context, "validation_is_number");
addStringConstraintParam(params,
MessageFormat.format(msg, new Object[] {property.getResolvedDisplayLabel()}));
// add the validation case to the property sheet
propertySheet.addClientValidation(new ClientValidation("validateIsNumber",
params, false));
}
}
}
/** /**
* Retrieves the list of values constraint for the item, if it has one * Retrieves the list of values constraint for the item, if it has one
* *
@@ -174,8 +219,8 @@ public class TextFieldGenerator extends BaseComponentGenerator
* @param item The item being generated * @param item The item being generated
* @return The constraint if the item has one, null otherwise * @return The constraint if the item has one, null otherwise
*/ */
protected ListOfValuesConstraint getListOfValuesConstraint(FacesContext context, UIPropertySheet propertySheet, protected ListOfValuesConstraint getListOfValuesConstraint(FacesContext context,
PropertySheetItem item) UIPropertySheet propertySheet, PropertySheetItem item)
{ {
ListOfValuesConstraint lovConstraint = null; ListOfValuesConstraint lovConstraint = null;

View File

@@ -16,7 +16,9 @@
*/ */
package org.alfresco.web.bean.repository; package org.alfresco.web.bean.repository;
import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
@@ -213,4 +215,21 @@ public final class User
return prefRef; return prefRef;
} }
/**
* Returns the full name of the user represented by the given NodeRef
*
* @param nodeService The node service instance
* @param user The user to get the full name for
* @return The full name
*/
public static String getFullName(NodeService nodeService, NodeRef user)
{
Map<QName, Serializable> props = nodeService.getProperties(user);
String firstName = (String)props.get(ContentModel.PROP_FIRSTNAME);
String lastName = (String)props.get(ContentModel.PROP_LASTNAME);
String fullName = firstName + " " + (lastName != null ? lastName : "");
return fullName;
}
} }

View File

@@ -56,13 +56,27 @@ public final class WizardManager
*/ */
public void setCurrentWizard(WizardConfig config) public void setCurrentWizard(WizardConfig config)
{ {
// make sure the managed bean is present
String beanName = config.getManagedBean(); String beanName = config.getManagedBean();
IWizardBean wizard = (IWizardBean)FacesHelper.getManagedBean(
FacesContext.getCurrentInstance(), beanName);
if (wizard == null) Object bean = FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), beanName);
if (bean == null)
{ {
throw new AlfrescoRuntimeException("Failed to find managed bean '" + beanName + "'"); throw new AlfrescoRuntimeException("Failed to start wizard as managed bean '" + beanName +
"' has not been defined");
}
// make sure the bean implements the IWizardBean interface
IWizardBean wizard = null;
if (bean instanceof IWizardBean)
{
wizard = (IWizardBean)bean;
}
else
{
throw new AlfrescoRuntimeException("Failed to start wizard as managed bean '" + beanName +
"' does not implement the required IWizardBean interface");
} }
// initialise the managed bean // initialise the managed bean

View File

@@ -5,6 +5,7 @@ import java.util.Map;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import org.alfresco.service.cmr.workflow.WorkflowInstance;
import org.alfresco.service.cmr.workflow.WorkflowService; import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.dialog.BaseDialogBean;
@@ -18,7 +19,7 @@ import org.apache.commons.logging.LogFactory;
*/ */
public class CancelWorkflowDialog extends BaseDialogBean public class CancelWorkflowDialog extends BaseDialogBean
{ {
protected String workflowInstanceId; protected WorkflowInstance workflowInstance;
protected WorkflowService workflowService; protected WorkflowService workflowService;
private static final Log logger = LogFactory.getLog(CancelWorkflowDialog.class); private static final Log logger = LogFactory.getLog(CancelWorkflowDialog.class);
@@ -32,11 +33,17 @@ public class CancelWorkflowDialog extends BaseDialogBean
super.init(parameters); super.init(parameters);
// make sure the workflow instance id has been passed // make sure the workflow instance id has been passed
this.workflowInstanceId = this.parameters.get("workflow-instance-id"); String workflowInstanceId = this.parameters.get("workflow-instance-id");
if (this.workflowInstanceId == null || this.workflowInstanceId.length() == 0) if (workflowInstanceId == null || workflowInstanceId.length() == 0)
{ {
throw new IllegalArgumentException("Cancel workflow dialog called without workflow instance id"); throw new IllegalArgumentException("Cancel workflow dialog called without workflow instance id");
} }
this.workflowInstance = workflowService.getWorkflowById(workflowInstanceId);
if (this.workflowInstance == null)
{
throw new IllegalArgumentException("Failed to find workflow instance for id: " + workflowInstanceId);
}
} }
@Override @Override
@@ -44,13 +51,13 @@ public class CancelWorkflowDialog extends BaseDialogBean
throws Exception throws Exception
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Cancelling workflow with id: " + this.workflowInstanceId); logger.debug("Cancelling workflow with id: " + this.workflowInstance.id);
// cancel the workflow // cancel the workflow
this.workflowService.cancelWorkflow(this.workflowInstanceId); this.workflowService.cancelWorkflow(this.workflowInstance.id);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Cancelled workflow with id: " + this.workflowInstanceId); logger.debug("Cancelled workflow with id: " + this.workflowInstance.id);
return outcome; return outcome;
} }
@@ -67,6 +74,18 @@ public class CancelWorkflowDialog extends BaseDialogBean
return false; return false;
} }
@Override
public String getCancelButtonLabel()
{
return Application.getMessage(FacesContext.getCurrentInstance(), "no");
}
@Override
public String getFinishButtonLabel()
{
return Application.getMessage(FacesContext.getCurrentInstance(), "yes");
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Bean Getters and Setters // Bean Getters and Setters
@@ -80,8 +99,13 @@ public class CancelWorkflowDialog extends BaseDialogBean
String confirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), String confirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
"cancel_workflow_confirm"); "cancel_workflow_confirm");
return MessageFormat.format(confirmMsg, String workflowLabel = this.workflowInstance.definition.title;
new Object[] {this.parameters.get("workflow-instance-name")}); if (this.workflowInstance.description != null && this.workflowInstance.description.length() > 0)
{
workflowLabel = workflowLabel + " (" + this.workflowInstance.description + ")";
}
return MessageFormat.format(confirmMsg, new Object[] {workflowLabel});
} }
/** /**

View File

@@ -15,10 +15,6 @@ import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.security.PersonService; import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.cmr.workflow.WorkflowService; import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.NamespaceService;

View File

@@ -233,6 +233,28 @@ public class StartWorkflowWizard extends BaseWizardBean
return this.nextButtonDisabled; return this.nextButtonDisabled;
} }
@Override
public String getContainerTitle()
{
String wizTitle = null;
ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
String stepName = Application.getWizardManager().getCurrentStepName();
if ("choose-workflow".equals(stepName) == false && this.selectedWorkflow != null)
{
String titlePattern = bundle.getString("start_named_workflow_wizard");
WorkflowDefinition workflowDef = this.workflows.get(this.selectedWorkflow);
wizTitle = MessageFormat.format(titlePattern, new Object[] {workflowDef.title});
}
else
{
wizTitle = bundle.getString("start_workflow_wizard");
}
return wizTitle;
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Event Handlers // Event Handlers

View File

@@ -260,7 +260,6 @@ public class WorkflowBean
// add the workflow instance id and name this taks belongs to // add the workflow instance id and name this taks belongs to
node.getProperties().put("workflowInstanceId", task.path.instance.id); node.getProperties().put("workflowInstanceId", task.path.instance.id);
node.getProperties().put("workflowInstanceName", task.path.instance.definition.title);
} }
return node; return node;

View File

@@ -21,6 +21,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.User;
import org.alfresco.web.ui.common.component.SelfRenderingComponent; import org.alfresco.web.ui.common.component.SelfRenderingComponent;
/** /**
@@ -305,27 +306,25 @@ public class UINodeWorkflowInfo extends SelfRenderingComponent
{ {
out.write("<li>"); out.write("<li>");
out.write(wi.definition.title); out.write(wi.definition.title);
if (wi.definition.description != null && wi.definition.description.length() > 0) if (wi.description != null && wi.description.length() > 0)
{ {
out.write(" ("); out.write("&nbsp;(");
out.write(wi.definition.description); out.write(wi.description);
out.write(")"); out.write(")");
} }
out.write("&nbsp;"); out.write(" ");
if (wi.startDate != null) if (wi.startDate != null)
{ {
out.write(bundle.getString("started_on").toLowerCase()); out.write(bundle.getString("started_on").toLowerCase());
out.write("&nbsp;"); out.write("&nbsp;");
out.write(format.format(wi.startDate)); out.write(format.format(wi.startDate));
out.write("&nbsp;"); out.write(" ");
} }
if (wi.initiator != null) if (wi.initiator != null)
{ {
out.write(bundle.getString("by")); out.write(bundle.getString("by"));
out.write("&nbsp;"); out.write("&nbsp;");
String userName = (String)nodeService.getProperty(wi.initiator, out.write(User.getFullName(nodeService, wi.initiator));
ContentModel.PROP_USERNAME);
out.write(userName);
out.write("."); out.write(".");
} }
out.write("</li>"); out.write("</li>");

View File

@@ -8,11 +8,10 @@ import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter; import javax.faces.context.ResponseWriter;
import javax.faces.el.ValueBinding; import javax.faces.el.ValueBinding;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.workflow.WorkflowInstance; import org.alfresco.service.cmr.workflow.WorkflowInstance;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.User;
import org.alfresco.web.ui.common.component.SelfRenderingComponent; import org.alfresco.web.ui.common.component.SelfRenderingComponent;
/** /**
@@ -87,20 +86,19 @@ public class UIWorkflowSummary extends SelfRenderingComponent
out.write(bundle.getString("title")); out.write(bundle.getString("title"));
out.write(":</td><td>"); out.write(":</td><td>");
out.write(wi.definition.title); out.write(wi.definition.title);
out.write("</td></tr><tr><td>"); if (wi.definition.description != null && wi.definition.description.length() > 0)
out.write(bundle.getString("description")); {
out.write(":</td><td>"); out.write("&nbsp;(");
out.write(wi.definition.description); out.write(wi.definition.description);
out.write(")");
}
out.write("</td></tr><tr><td>"); out.write("</td></tr><tr><td>");
out.write(bundle.getString("initiated_by")); out.write(bundle.getString("initiated_by"));
out.write(":</td><td>"); out.write(":</td><td>");
if (wi.initiator != null) if (wi.initiator != null)
{ {
NodeService nodeService = Repository.getServiceRegistry( out.write(User.getFullName(Repository.getServiceRegistry(
context).getNodeService(); context).getNodeService(), wi.initiator));
String userName = (String)nodeService.getProperty(
wi.initiator, ContentModel.PROP_USERNAME);
out.write(userName);
} }
out.write("</td></tr><tr><td>"); out.write("</td></tr><tr><td>");
out.write(bundle.getString("started_on")); out.write(bundle.getString("started_on"));

View File

@@ -18,7 +18,6 @@
package org.alfresco.web.ui.repo.component.property; package org.alfresco.web.ui.repo.component.property;
import java.io.IOException; import java.io.IOException;
import java.io.Serializable;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -47,6 +46,7 @@ import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.DataDictionary; import org.alfresco.web.bean.repository.DataDictionary;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.User;
import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -704,12 +704,7 @@ public abstract class BaseAssociationEditor extends UIInput
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetRef))) if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetRef)))
{ {
//out.write((String)nodeService.getProperty(targetRef, ContentModel.PROP_USERNAME)); out.write(User.getFullName(nodeService, targetRef));
Map<QName, Serializable> props = nodeService.getProperties(targetRef);
String firstName = (String)props.get(ContentModel.PROP_FIRSTNAME);
String lastName = (String)props.get(ContentModel.PROP_LASTNAME);
String fullName = firstName + " " + (lastName != null ? lastName : "");
out.write(fullName);
} }
else else
{ {
@@ -832,17 +827,13 @@ public abstract class BaseAssociationEditor extends UIInput
// if the node represents a person, show the username instead of the name // if the node represents a person, show the username instead of the name
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(item))) if (ContentModel.TYPE_PERSON.equals(nodeService.getType(item)))
{ {
Map<QName, Serializable> props = nodeService.getProperties(item); String userName = (String)nodeService.getProperty(item, ContentModel.PROP_USERNAME);
String userName = (String)props.get(ContentModel.PROP_USERNAME);
if (userName != null && (userName.equals(PermissionService.GUEST_AUTHORITY) == false)) if (userName != null && (userName.equals(PermissionService.GUEST_AUTHORITY) == false))
{ {
out.write("<option value='"); out.write("<option value='");
out.write(item.getId()); out.write(item.getId());
out.write("'>"); out.write("'>");
String firstName = (String)props.get(ContentModel.PROP_FIRSTNAME); out.write(User.getFullName(nodeService, item));
String lastName = (String)props.get(ContentModel.PROP_LASTNAME);
String fullName = firstName + " " + (lastName != null ? lastName : "");
out.write(fullName);
out.write("</option>"); out.write("</option>");
} }
} }

View File

@@ -33,6 +33,7 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.User;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -157,7 +158,7 @@ public class UIAssociationEditor extends BaseAssociationEditor
// if the node represents a person, show the username instead of the name // if the node represents a person, show the username instead of the name
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode))) if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode)))
{ {
out.write((String)nodeService.getProperty(targetNode, ContentModel.PROP_USERNAME)); out.write(User.getFullName(nodeService, targetNode));
} }
else else
{ {

View File

@@ -33,6 +33,7 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.User;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -157,7 +158,7 @@ public class UIChildAssociationEditor extends BaseAssociationEditor
// if the node represents a person, show the username instead of the name // if the node represents a person, show the username instead of the name
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode))) if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode)))
{ {
out.write((String)nodeService.getProperty(targetNode, ContentModel.PROP_USERNAME)); out.write(User.getFullName(nodeService, targetNode));
} }
else else
{ {

View File

@@ -54,7 +54,7 @@
</a:column> </a:column>
<%-- Description column --%> <%-- Description column --%>
<a:column id="col2" style="text-align:left"> <a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.description}" value="description" styleClass="header"/> <a:sortLink id="col2-sort" label="#{msg.description}" value="description" styleClass="header"/>
</f:facet> </f:facet>
@@ -62,7 +62,7 @@
</a:column> </a:column>
<%-- Path column --%> <%-- Path column --%>
<a:column id="col3" style="text-align:left"> <a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/> <a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/>
</f:facet> </f:facet>
@@ -71,7 +71,7 @@
</a:column> </a:column>
<%-- Created Date column --%> <%-- Created Date column --%>
<a:column id="col4" style="text-align:left"> <a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/> <a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet> </f:facet>
@@ -81,7 +81,7 @@
</a:column> </a:column>
<%-- Modified Date column --%> <%-- Modified Date column --%>
<a:column id="col5" style="text-align:left"> <a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.modified}" value="modified" styleClass="header"/> <a:sortLink id="col5-sort" label="#{msg.modified}" value="modified" styleClass="header"/>
</f:facet> </f:facet>
@@ -91,25 +91,13 @@
</a:column> </a:column>
<%-- Actions column --%> <%-- Actions column --%>
<a:column id="col6" actions="true" style="text-align:left"> <a:column id="col6" actions="true" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<h:outputText id="col6-txt" value="#{msg.actions}"/> <h:outputText id="col6-txt" value="#{msg.actions}"/>
</f:facet> </f:facet>
<r:actions id="col6-actions" value="#{DialogManager.bean.packageItemActionGroup}" <r:actions id="col6-actions" value="#{DialogManager.bean.packageItemActionGroup}"
context="#{r}" showLink="false" styleClass="inlineAction" /> context="#{r}" showLink="false" styleClass="inlineAction" />
</a:column> </a:column>
<%-- Completed column --%>
<%--
<a:column style="text-align:left">
<f:facet name="header">
<h:outputText value="#{msg.completed}" />
</f:facet>
<a:actionLink value="#{r.completed}" actionListener="#{DialogManager.bean.togglePackageItemComplete}">
<f:param name="id" value="#{r.id}" />
</a:actionLink>
</a:column>
--%>
</a:richList> </a:richList>
<h:panelGrid id="package-actions-group" columns="1" styleClass="paddingRow"> <h:panelGrid id="package-actions-group" columns="1" styleClass="paddingRow">

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%> <%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left"> <a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.title}" value="name" mode="case-insensitive" styleClass="header"/> <a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<f:facet name="small-icon"> <f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/completed_workflow_task.gif" showLink="false" <a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/completed_workflow_task.gif" showLink="false"
@@ -28,67 +28,67 @@
</a:actionLink> </a:actionLink>
</a:column> </a:column>
<%-- Task id column --%> <%-- Task type --%>
<a:column id="col2" style="padding:2px;text-align:left"> <a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.id}" value="bpm:taskId" styleClass="header"/> <a:sortLink id="col2-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col2-txt" value="#{r['bpm:taskId']}" /> <h:outputText id="col2-txt" value="#{r.name}" />
</a:column> </a:column>
<%-- Task type --%> <%-- Task id column --%>
<a:column id="col2a" style="padding:2px;text-align:left"> <a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2a-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/> <a:sortLink id="col3-sort" label="#{msg.id}" value="bpm:taskId" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col2a-txt" value="#{r.name}" /> <h:outputText id="col3-txt" value="#{r['bpm:taskId']}" />
</a:column> </a:column>
<%-- Source column --%> <%-- Source column --%>
<a:column id="col3" style="padding:2px;text-align:left"> <a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.source}" value="sourceSpaceName" styleClass="header"/> <a:sortLink id="col4-sort" label="#{msg.source}" value="sourceSpaceName" styleClass="header"/>
</f:facet> </f:facet>
<a:actionLink id="col3-act1" value="#{r.sourceSpaceName}" <a:actionLink id="col4-act1" value="#{r.sourceSpaceName}"
actionListener="#{BrowseBean.clickSpace}" action="browse"> actionListener="#{BrowseBean.clickSpace}" action="browse">
<f:param name="id" value="#{r.sourceSpaceId}" /> <f:param name="id" value="#{r.sourceSpaceId}" />
</a:actionLink> </a:actionLink>
</a:column> </a:column>
<%-- Created Date column --%> <%-- Created Date column --%>
<a:column id="col4" style="padding:2px;text-align:left"> <a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/> <a:sortLink id="col5-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col4-txt" value="#{r.created}"> <h:outputText id="col5-txt" value="#{r.created}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" /> <a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText> </h:outputText>
</a:column> </a:column>
<%-- Completed date column --%> <%-- Completed date column --%>
<a:column id="col5" style="padding:2px;text-align:left"> <a:column id="col6" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.completed_on}" value="bpm:completionDate" styleClass="header"/> <a:sortLink id="col6-sort" label="#{msg.completed_on}" value="bpm:completionDate" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col5-txt" value="#{r['bpm:completionDate']}"> <h:outputText id="col6-txt" value="#{r['bpm:completionDate']}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" /> <a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</h:outputText> </h:outputText>
</a:column> </a:column>
<%-- Outcome column --%> <%-- Outcome column --%>
<a:column id="col6" style="padding:2px;text-align:left"> <a:column id="col7" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col6-sort" label="#{msg.outcome}" value="outcome" styleClass="header"/> <a:sortLink id="col7-sort" label="#{msg.outcome}" value="outcome" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col6-txt" value="#{r.outcome}" /> <h:outputText id="col7-txt" value="#{r.outcome}" />
</a:column> </a:column>
<%-- Actions column --%> <%-- Actions column --%>
<a:column id="col7" actions="true" style="padding:2px;text-align:left"> <a:column id="col8" actions="true" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<h:outputText id="col7-txt" value="#{msg.actions}"/> <h:outputText id="col8-txt" value="#{msg.actions}"/>
</f:facet> </f:facet>
<r:actions id="col7-actions" value="dashlet_completed_actions" context="#{r}" showLink="false" <r:actions id="col8-actions" value="dashlet_completed_actions" context="#{r}" showLink="false"
styleClass="inlineAction" /> styleClass="inlineAction" />
</a:column> </a:column>

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%> <%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left"> <a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.title}" value="name" mode="case-insensitive" styleClass="header"/> <a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<f:facet name="small-icon"> <f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false" <a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false"
@@ -28,75 +28,75 @@
</a:actionLink> </a:actionLink>
</a:column> </a:column>
<%-- Task id column --%> <%-- Task type --%>
<a:column id="col2" style="padding:2px;text-align:left"> <a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.id}" value="bpm:taskId" styleClass="header"/> <a:sortLink id="col2-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col2-txt" value="#{r['bpm:taskId']}" /> <h:outputText id="col2-txt" value="#{r.name}" />
</a:column> </a:column>
<%-- Task type --%> <%-- Task id column --%>
<a:column id="col2a" style="padding:2px;text-align:left"> <a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2a-sort" label="#{msg.type}" value="name" mode="case-insensitive" styleClass="header"/> <a:sortLink id="col3-sort" label="#{msg.id}" value="bpm:taskId" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col2a-txt" value="#{r.name}" /> <h:outputText id="col3-txt" value="#{r['bpm:taskId']}" />
</a:column> </a:column>
<%-- Source column --%> <%-- Source column --%>
<a:column id="col3" style="padding:2px;text-align:left"> <a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.source}" value="sourceSpaceName" styleClass="header"/> <a:sortLink id="col4-sort" label="#{msg.source}" value="sourceSpaceName" styleClass="header"/>
</f:facet> </f:facet>
<a:actionLink id="col3-act1" value="#{r.sourceSpaceName}" <a:actionLink id="col4-act1" value="#{r.sourceSpaceName}"
actionListener="#{BrowseBean.clickSpace}" action="browse"> actionListener="#{BrowseBean.clickSpace}" action="browse">
<f:param name="id" value="#{r.sourceSpaceId}" /> <f:param name="id" value="#{r.sourceSpaceId}" />
</a:actionLink> </a:actionLink>
</a:column> </a:column>
<%-- Created Date column --%> <%-- Created Date column --%>
<a:column id="col4" style="padding:2px;text-align:left"> <a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/> <a:sortLink id="col5-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col4-txt" value="#{r.created}"> <h:outputText id="col5-txt" value="#{r.created}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" /> <a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText> </h:outputText>
</a:column> </a:column>
<%-- Due date column --%> <%-- Due date column --%>
<a:column id="col5" style="padding:2px;text-align:left"> <a:column id="col6" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.due_date}" value="bpm:dueDate" styleClass="header"/> <a:sortLink id="col6-sort" label="#{msg.due_date}" value="bpm:dueDate" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col5-txt" value="#{r['bpm:dueDate']}"> <h:outputText id="col6-txt" value="#{r['bpm:dueDate']}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" /> <a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</h:outputText> </h:outputText>
</a:column> </a:column>
<%-- Status column --%> <%-- Status column --%>
<a:column id="col6" style="padding:2px;text-align:left"> <a:column id="col7" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col6-sort" label="#{msg.status}" value="bpm:status" styleClass="header"/> <a:sortLink id="col7-sort" label="#{msg.status}" value="bpm:status" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col6-txt" value="#{r['bpm:status']}" /> <h:outputText id="col7-txt" value="#{r['bpm:status']}" />
</a:column> </a:column>
<%-- Priority column --%> <%-- Priority column --%>
<a:column id="col7" style="padding:2px;text-align:left"> <a:column id="col8" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col7-sort" label="#{msg.priority}" value="bpm:priority" styleClass="header"/> <a:sortLink id="col8-sort" label="#{msg.priority}" value="bpm:priority" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="col7-txt" value="#{r['bpm:priority']}" /> <h:outputText id="col8-txt" value="#{r['bpm:priority']}" />
</a:column> </a:column>
<%-- Actions column --%> <%-- Actions column --%>
<a:column id="col8" actions="true" style="padding:2px;text-align:left"> <a:column id="col9" actions="true" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<h:outputText id="col8-txt" value="#{msg.actions}"/> <h:outputText id="col9-txt" value="#{msg.actions}"/>
</f:facet> </f:facet>
<r:actions id="col8-actions" value="dashlet_todo_actions" context="#{r}" showLink="false" <r:actions id="col9-actions" value="dashlet_todo_actions" context="#{r}" showLink="false"
styleClass="inlineAction" /> styleClass="inlineAction" />
</a:column> </a:column>

View File

@@ -54,7 +54,7 @@
</a:column> </a:column>
<%-- Description column --%> <%-- Description column --%>
<a:column id="col2" style="text-align:left"> <a:column id="col2" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col2-sort" label="#{msg.description}" value="description" styleClass="header"/> <a:sortLink id="col2-sort" label="#{msg.description}" value="description" styleClass="header"/>
</f:facet> </f:facet>
@@ -62,7 +62,7 @@
</a:column> </a:column>
<%-- Path column --%> <%-- Path column --%>
<a:column id="col3" style="text-align:left"> <a:column id="col3" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/> <a:sortLink id="col3-sort" label="#{msg.path}" value="path" styleClass="header"/>
</f:facet> </f:facet>
@@ -71,7 +71,7 @@
</a:column> </a:column>
<%-- Created Date column --%> <%-- Created Date column --%>
<a:column id="col4" style="text-align:left"> <a:column id="col4" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/> <a:sortLink id="col4-sort" label="#{msg.created}" value="created" styleClass="header"/>
</f:facet> </f:facet>
@@ -81,7 +81,7 @@
</a:column> </a:column>
<%-- Modified Date column --%> <%-- Modified Date column --%>
<a:column id="col5" style="text-align:left"> <a:column id="col5" style="padding:2px;text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink id="col5-sort" label="#{msg.modified}" value="modified" styleClass="header"/> <a:sortLink id="col5-sort" label="#{msg.modified}" value="modified" styleClass="header"/>
</f:facet> </f:facet>

View File

@@ -52,6 +52,24 @@ function validateNumberRange(control, min, max, message, showMessage)
return result; return result;
} }
/**
* Ensures the value of the 'control' is a number.
*
* @return true if the value is a number
*/
function validateIsNumber(control, message, showMessage)
{
var result = true;
if (isNaN(control.value))
{
informUser(control, message, showMessage);
result = false;
}
return result;
}
/** /**
* Ensures the value of the 'control' has a string length more than 'min' and less than 'max'. * Ensures the value of the 'control' has a string length more than 'min' and less than 'max'.
* *