Yet another merge from head to WCM-DEV2.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3774 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-12 18:55:07 +00:00
parent cac41478d2
commit f20136237d
27 changed files with 6524 additions and 6061 deletions

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext;
import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.NavigationBean;
import org.alfresco.web.bean.repository.Node;
/**
* UI Action Evaluator - Start workflow on a node.
*
* @author gavinc
*/
public class StartWorkflowEvaluator implements ActionEvaluator
{
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
NavigationBean nav =
(NavigationBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "NavigationBean");
return (nav.getIsGuest() == false);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -53,14 +53,14 @@ import org.alfresco.web.app.servlet.FacesHelper;
*/
public class CreateContentWizard extends BaseContentWizard
{
protected String content = null;
protected String content = null;
protected String templateTypeName;
protected List<SelectItem> createMimeTypes;
protected List<SelectItem> createMimeTypes;
private static final Log LOGGER =
LogFactory.getLog(CreateContentWizard.class);
// ------------------------------------------------------------------------------
// Wizard implementation
@@ -69,7 +69,7 @@ public class CreateContentWizard extends BaseContentWizard
throws Exception
{
LOGGER.debug("saving file content to " + this.fileName);
saveContent(null, this.content);
saveContent(null, this.content);
if (this.templateTypeName != null)
{
LOGGER.debug("generating template output for " + this.templateTypeName);
@@ -87,9 +87,9 @@ public class CreateContentWizard extends BaseContentWizard
this.contentService,
this.nodeService);
}
// return the default outcome
return outcome;
// return the default outcome
return outcome;
}
@Override
@@ -162,7 +162,7 @@ public class CreateContentWizard extends BaseContentWizard
{
this.content = content;
}
public List<SelectItem> getCreateTemplateTypes()
{
Collection<TemplateType> ttl = TemplatingService.getInstance().getTemplateTypes();
@@ -225,7 +225,7 @@ public class CreateContentWizard extends BaseContentWizard
return this.createMimeTypes;
}
public String getTemplateTypeName()
{
return this.templateTypeName;

View File

@@ -42,8 +42,9 @@ public class DashboardManager
private static Log logger = LogFactory.getLog(DashboardManager.class);
private static final String PREF_DASHBOARD = "dashboard";
static final String LAYOUT_DEFAULT = "default";
static final String DASHLET_DEFAULT = "getting-started";
private static final String LAYOUT_DEFAULT = "default";
private static final String DASHLET_STARTEDDEFAULT = "getting-started";
private static final String DASHLET_TASKSDEFAULT = "tasks-todo";
private static final String JSP_DUMMY = "/jsp/dashboards/dummy.jsp";
@@ -150,13 +151,22 @@ public class DashboardManager
{
Page page = new Page("default", layout);
Column defaultColumn = new Column();
DashletDefinition dashlet = config.getDashletDefinition(DASHLET_DEFAULT);
// add the default dashlet(s) to the column
DashletDefinition dashlet = config.getDashletDefinition(DASHLET_STARTEDDEFAULT);
if (dashlet != null)
{
defaultColumn.addDashlet(dashlet);
page.addColumn(defaultColumn);
pageConfig.addPage(page);
}
dashlet = config.getDashletDefinition(DASHLET_TASKSDEFAULT);
if (dashlet != null)
{
defaultColumn.addDashlet(dashlet);
}
// add the column to the page and we are done
page.addColumn(defaultColumn);
pageConfig.addPage(page);
}
}

View File

@@ -447,6 +447,17 @@ public class StartWorkflowWizard extends BaseWizardBean
new String[] {workflowName});
}
/**
* Determines whether there are any workflows to start
* @return
*/
public boolean getHasStartableWorkflows()
{
// get the list of startable workflow, this will intialise the list if necessary
List<SelectItem> workflows = getStartableWorkflows();
return (workflows.size() > 0);
}
/**
* Returns a list of workflows that can be started.
*

View File

@@ -25,6 +25,7 @@ import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.el.PropertyNotFoundException;
import org.alfresco.config.Config;
import org.alfresco.config.ConfigElement;
@@ -162,34 +163,46 @@ public class ImagePickerRadioRenderer extends BaseRenderer
}
else
{
// get the child components
for (Iterator i = imagePicker.getChildren().iterator(); i.hasNext(); /**/)
try
{
UIComponent child = (UIComponent)i.next();
if (child instanceof UIListItems)
// get the child components
for (Iterator i = imagePicker.getChildren().iterator(); i.hasNext(); /**/)
{
// get the value of the list items component and iterate
// through it's collection
Object listItems = ((UIListItems)child).getValue();
if (listItems instanceof Collection)
UIComponent child = (UIComponent)i.next();
if (child instanceof UIListItems)
{
Iterator iter = ((Collection)listItems).iterator();
while (iter.hasNext())
// get the value of the list items component and iterate
// through it's collection
Object listItems = ((UIListItems)child).getValue();
if (listItems instanceof Collection)
{
UIListItem item = (UIListItem)iter.next();
if (item.isRendered())
Iterator iter = ((Collection)listItems).iterator();
while (iter.hasNext())
{
renderItem(context, out, imagePicker, item, onclick);
UIListItem item = (UIListItem)iter.next();
if (item.isRendered())
{
renderItem(context, out, imagePicker, item, onclick);
}
}
}
}
else if (child instanceof UIListItem && child.isRendered() == true)
{
// found a valid UIListItem child to render
UIListItem item = (UIListItem)child;
renderItem(context, out, imagePicker, item, onclick);
}
}
else if (child instanceof UIListItem && child.isRendered() == true)
{
// found a valid UIListItem child to render
UIListItem item = (UIListItem)child;
renderItem(context, out, imagePicker, item, onclick);
}
}
catch (PropertyNotFoundException pnfe)
{
// handle the scenario where the bean does not have the
// method specified in the value binding expression
if (logger.isWarnEnabled())
logger.warn("Failed to retrieve icons: " + pnfe.toString());
out.write(Application.getMessage(context, "no_icons_found"));
}
}