Merged 3.1 to HEAD

13841: Build fix
   13988: Applied patch for ETHREEOH-1620 (webdav issues with WebSphere)
   13993: Partial (UI portion) fix for ETHREEOH-1500: Remove visibility of Workflow items
   13995: Fix for ETHREEOH-1883: Start advanced workflow wizard lists the WCM 'Direct Submit to Staging' workflow as one of the selectable workflows
   14061: Fix for ETHREEOH-1891: Form repeat element not working in 3.1

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14070 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-04-23 14:07:20 +00:00
parent 30ce335c4c
commit 76dcb743a2
3 changed files with 28 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
</workflows>
<admin-workflows>
wcmwf:changerequest
wcmwf:changerequest, wcmwf:submitdirect
</admin-workflows>
<views>

View File

@@ -27,9 +27,12 @@ package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.workflow.BPMEngineRegistry;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.NavigationBean;
import org.alfresco.web.bean.repository.Node;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
/**
* UI Action Evaluator - Start workflow on a node.
@@ -38,6 +41,7 @@ import org.alfresco.web.bean.repository.Node;
*/
public class StartWorkflowEvaluator extends BaseActionEvaluator
{
private static final String BPM_ENGINE_BEAN_NAME = "bpm_engineRegistry";
private static final long serialVersionUID = 3110333488835027710L;
/**
@@ -45,12 +49,21 @@ public class StartWorkflowEvaluator extends BaseActionEvaluator
*/
public boolean evaluate(Node node)
{
FacesContext facesContext = FacesContext.getCurrentInstance();
NavigationBean nav =
(NavigationBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), NavigationBean.BEAN_NAME);
(NavigationBean)FacesHelper.getManagedBean(facesContext, NavigationBean.BEAN_NAME);
return (
nav.getIsGuest() == false
&& node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false
);
// determine whether the workflow services are active
boolean workflowPresent = false;
WebApplicationContext springContext = FacesContextUtils.getRequiredWebApplicationContext(facesContext);
BPMEngineRegistry bpmReg = (BPMEngineRegistry)springContext.getBean(BPM_ENGINE_BEAN_NAME);
if (bpmReg != null)
{
String[] components = bpmReg.getWorkflowComponents();
workflowPresent = (components != null && components.length > 0);
}
return (workflowPresent && nav.getIsGuest() == false &&
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false);
}
}

View File

@@ -412,8 +412,14 @@ alfresco.xforms.Widget = new Class({
/** Returns the widget's label. */
getLabel: function()
{
var result = "";
var node = this._getChildXFormsNode("label");
var result = node ? node.firstChild.nodeValue : "";
if (node && node.firstChild !== null)
{
result = node.firstChild.nodeValue;
}
if (alfresco.constants.DEBUG)
{
result += " [" + this.id + "]";
@@ -1259,7 +1265,7 @@ alfresco.xforms.CheckboxSelect = alfresco.xforms.AbstractSelectWidget.extend({
{
this.parent(value, forceCommit);
this._selectedValues = value.split(' ');
var checkboxes = this.widgets.getElementsByTagName("input");
var checkboxes = this.widget.getElementsByTagName("input");
for (var i = 0; i < checkboxes.length; i++)
{
checkboxes[i].checked =
@@ -1341,7 +1347,7 @@ alfresco.xforms.ListSelect = alfresco.xforms.AbstractSelectWidget.extend({
{
this.parent(value, forceCommit);
this._selectedValues = value.split(' ');
var options = this.widgets.getElementsByTagName("option");
var options = this.widget.getElementsByTagName("option");
for (var i = 0; i < options.length; i++)
{
options[i].selected =