Merge V1.3 to HEAD (3045:3063)

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3045 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3063 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3340 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-07-18 15:22:09 +00:00
parent b56cc82043
commit 1147bcf949
25 changed files with 185 additions and 125 deletions

View File

@@ -768,7 +768,7 @@ public class AdminNodeBrowseBean
/** /**
* Permission representing the fact that "Read Permissions" has not been granted * Permission representing the fact that "Read Permissions" has not been granted
*/ */
public class NoReadPermissionGranted public static class NoReadPermissionGranted
{ {
public String getPermission() public String getPermission()
{ {

View File

@@ -1531,10 +1531,14 @@ public class AdvancedSearchBean
AspectDefinition aspectDef = dd.getAspect(aspect); AspectDefinition aspectDef = dd.getAspect(aspect);
propDef = aspectDef.getProperties().get(propQName); propDef = aspectDef.getProperties().get(propQName);
} }
if (propQName != null && propDef != null)
{
customPropertyLookup.put(propQName.toString(), propDef.getDataType()); customPropertyLookup.put(propQName.toString(), propDef.getDataType());
} }
} }
} }
}
return customPropertyLookup; return customPropertyLookup;
} }

View File

@@ -58,6 +58,14 @@ public class CheckinCheckoutBean
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Bean property getters and setters // Bean property getters and setters
/**
* @param navigator The NavigationBean to set.
*/
public void setNavigator(NavigationBean navigator)
{
this.navigator = navigator;
}
/** /**
* @return Returns the BrowseBean. * @return Returns the BrowseBean.
*/ */
@@ -535,6 +543,7 @@ public class CheckinCheckoutBean
String id = params.get("id"); String id = params.get("id");
if (id != null && id.length() != 0) if (id != null && id.length() != 0)
{ {
boolean editingInline = false;
Node node = setupContentDocument(id); Node node = setupContentDocument(id);
// detect the inline editing aspect to see which edit mode to use // detect the inline editing aspect to see which edit mode to use
@@ -544,6 +553,9 @@ public class CheckinCheckoutBean
{ {
// retrieve the content reader for this node // retrieve the content reader for this node
ContentReader reader = getContentService().getReader(node.getNodeRef(), ContentModel.PROP_CONTENT); ContentReader reader = getContentService().getReader(node.getNodeRef(), ContentModel.PROP_CONTENT);
if (reader != null)
{
editingInline = true;
String mimetype = reader.getMimetype(); String mimetype = reader.getMimetype();
// calculate which editor screen to display // calculate which editor screen to display
@@ -553,41 +565,32 @@ public class CheckinCheckoutBean
MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype)) MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
{ {
// make content available to the editing screen // make content available to the editing screen
if (reader != null)
{
setEditorOutput(reader.getContentString()); setEditorOutput(reader.getContentString());
}
else
{
setEditorOutput("");
}
// navigate to appropriate screen // navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editTextInline"); fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editTextInline");
} }
else else
{ {
// make content available to the editing screen // make content available to the editing screen
if (reader != null)
{
setDocumentContent(reader.getContentString()); setDocumentContent(reader.getContentString());
}
else
{
setDocumentContent("");
}
setEditorOutput(null); setEditorOutput(null);
// navigate to appropriate screen // navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editHtmlInline"); fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editHtmlInline");
} }
} }
else }
if (editingInline == false)
{ {
// normal downloadable document // normal downloadable document
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editFile"); fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editFile");
} }
} }
@@ -750,7 +753,6 @@ public class CheckinCheckoutBean
// we can either checkin the content from the current working copy node // we can either checkin the content from the current working copy node
// which would have been previously updated by the user // which would have been previously updated by the user
String contentUrl; String contentUrl;
String mimetype;
if (getCopyLocation().equals(COPYLOCATION_CURRENT)) if (getCopyLocation().equals(COPYLOCATION_CURRENT))
{ {
ContentData contentData = (ContentData) node.getProperties().get(ContentModel.PROP_CONTENT); ContentData contentData = (ContentData) node.getProperties().get(ContentModel.PROP_CONTENT);
@@ -785,11 +787,9 @@ public class CheckinCheckoutBean
props.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR); props.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);
} }
NodeRef originalDoc = this.versionOperationsService.checkin( // perform the checkin
node.getNodeRef(), this.versionOperationsService.checkin(node.getNodeRef(),
props, props, contentUrl, this.keepCheckedOut);
contentUrl,
this.keepCheckedOut);
// commit the transaction // commit the transaction
tx.commit(); tx.commit();
@@ -941,6 +941,9 @@ public class CheckinCheckoutBean
/** The BrowseBean to be used by the bean */ /** The BrowseBean to be used by the bean */
protected BrowseBean browseBean; protected BrowseBean browseBean;
/** The NavigationBean bean reference */
protected NavigationBean navigator;
/** The NodeService to be used by the bean */ /** The NodeService to be used by the bean */
protected NodeService nodeService; protected NodeService nodeService;

View File

@@ -103,7 +103,7 @@ public class ExportBean
params.put(ExporterActionExecuter.PARAM_PACKAGE_NAME, this.packageName); params.put(ExporterActionExecuter.PARAM_PACKAGE_NAME, this.packageName);
params.put(ExporterActionExecuter.PARAM_ENCODING, this.encoding); params.put(ExporterActionExecuter.PARAM_ENCODING, this.encoding);
params.put(ExporterActionExecuter.PARAM_DESTINATION_FOLDER, this.destination); params.put(ExporterActionExecuter.PARAM_DESTINATION_FOLDER, this.destination);
params.put(ExporterActionExecuter.PARAM_INCLUDE_CHILDREN, new Boolean(includeChildren)); params.put(ExporterActionExecuter.PARAM_INCLUDE_CHILDREN, Boolean.valueOf(includeChildren));
params.put(ExporterActionExecuter.PARAM_INCLUDE_SELF, new Boolean(includeSelf)); params.put(ExporterActionExecuter.PARAM_INCLUDE_SELF, new Boolean(includeSelf));
action = this.actionService.createAction(ExporterActionExecuter.NAME, params); action = this.actionService.createAction(ExporterActionExecuter.NAME, params);
} }

View File

@@ -137,7 +137,7 @@ public class LinkPropertiesBean
Map<String, Object> props = this.editableNode.getProperties(); Map<String, Object> props = this.editableNode.getProperties();
// get the name and move the node as necessary // get the name and move the node as necessary
String name = (String)props.get(ContentModel.PROP_NAME); //String name = (String)props.get(ContentModel.PROP_NAME);
//if (name != null) //if (name != null)
//{ //{
// fileFolderService.rename(nodeRef, name); // fileFolderService.rename(nodeRef, name);

View File

@@ -36,6 +36,7 @@ import org.alfresco.repo.node.archive.RestoreNodeReport.RestoreStatus;
import org.alfresco.repo.search.impl.lucene.QueryParser; import org.alfresco.repo.search.impl.lucene.QueryParser;
import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.NodeService;
@@ -537,6 +538,20 @@ public class TrashcanBean implements IContextListener
} }
}; };
private NodePropertyResolver resolverMimetype = new NodePropertyResolver() {
public Object get(Node node) {
ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
return (content != null ? content.getMimetype() : null);
}
};
private NodePropertyResolver resolverSize = new NodePropertyResolver() {
public Object get(Node node) {
ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
return (content != null ? new Long(content.getSize()) : 0L);
}
};
private NodePropertyResolver resolverDeletedDate = new NodePropertyResolver() { private NodePropertyResolver resolverDeletedDate = new NodePropertyResolver() {
public Object get(Node node) { public Object get(Node node) {
return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE); return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE);
@@ -613,6 +628,8 @@ public class TrashcanBean implements IContextListener
node.addPropertyResolver("deletedDate", resolverDeletedDate); node.addPropertyResolver("deletedDate", resolverDeletedDate);
node.addPropertyResolver("deletedBy", resolverDeletedBy); node.addPropertyResolver("deletedBy", resolverDeletedBy);
node.addPropertyResolver("isFolder", resolverIsFolder); node.addPropertyResolver("isFolder", resolverIsFolder);
node.addPropertyResolver("mimetype", resolverMimetype);
node.addPropertyResolver("size", resolverSize);
if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true && if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true &&
this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false) this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false)

View File

@@ -124,7 +124,7 @@ public class WorkflowUtil
// first we need to take off the simpleworkflow aspect // first we need to take off the simpleworkflow aspect
nodeService.removeAspect(ref, ContentModel.ASPECT_SIMPLE_WORKFLOW); nodeService.removeAspect(ref, ContentModel.ASPECT_SIMPLE_WORKFLOW);
if (rejectMove.booleanValue()) if (rejectMove != null && rejectMove.booleanValue())
{ {
// move the document to the specified folder // move the document to the specified folder
String qname = QName.createValidLocalName(docNode.getName()); String qname = QName.createValidLocalName(docNode.getName());

View File

@@ -230,6 +230,8 @@ public abstract class BaseActionWizard extends BaseWizardBean
{ {
QName idQName = Repository.resolveToQName(child.getAttribute("name")); QName idQName = Repository.resolveToQName(child.getAttribute("name"));
if (idQName != null)
{
// try and get the display label from config // try and get the display label from config
String label = Utils.getDisplayLabel(context, child); String label = Utils.getDisplayLabel(context, child);
@@ -249,6 +251,11 @@ public abstract class BaseActionWizard extends BaseWizardBean
this.aspects.add(new SelectItem(idQName.toString(), label)); this.aspects.add(new SelectItem(idQName.toString(), label));
} }
else
{
logger.warn("Failed to resolve aspect '" + child.getAttribute("name") + "'");
}
}
// make sure the list is sorted by the label // make sure the list is sorted by the label
QuickSort sorter = new QuickSort(this.aspects, "label", true, IDataContainer.SORT_CASEINSENSITIVE); QuickSort sorter = new QuickSort(this.aspects, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
@@ -875,6 +882,11 @@ public abstract class BaseActionWizard extends BaseWizardBean
} }
} }
public int hashCode()
{
return authority.hashCode();
}
private String name; private String name;
private String authority; private String authority;
} }

View File

@@ -10,6 +10,7 @@ import java.util.ResourceBundle;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem; import javax.faces.model.SelectItem;
import org.alfresco.repo.action.executer.CheckInActionExecuter;
import org.alfresco.service.cmr.action.Action; import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionDefinition; import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
@@ -26,9 +27,19 @@ import org.alfresco.web.data.QuickSort;
*/ */
public class RunActionWizard extends BaseActionWizard public class RunActionWizard extends BaseActionWizard
{ {
protected boolean checkinActionPresent = false;
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Wizard implementation // Wizard implementation
@Override
public void init(Map<String, String> parameters)
{
super.init(parameters);
this.checkinActionPresent = false;
}
protected String finishImpl(FacesContext context, String outcome) protected String finishImpl(FacesContext context, String outcome)
throws Exception throws Exception
{ {
@@ -40,6 +51,12 @@ public class RunActionWizard extends BaseActionWizard
String actionName = (String)actionParams.get(PROP_ACTION_NAME); String actionName = (String)actionParams.get(PROP_ACTION_NAME);
this.action = actionName; this.action = actionName;
// remember the fact we have a checkin action
if (actionName.equals(CheckInActionExecuter.NAME))
{
this.checkinActionPresent = true;
}
// get the action handler to prepare for the save // get the action handler to prepare for the save
Map<String, Serializable> repoActionParams = new HashMap<String, Serializable>(); Map<String, Serializable> repoActionParams = new HashMap<String, Serializable>();
IHandler handler = this.actionHandlers.get(this.action); IHandler handler = this.actionHandlers.get(this.action);
@@ -104,6 +121,14 @@ public class RunActionWizard extends BaseActionWizard
space.reset(); space.reset();
} }
// special case handling for checkin - if it was successful the working
// copy node the Run Action Wizard was launched against will no longer
// exist, we therefore need the client to go back to the main browse view.
if (this.checkinActionPresent)
{
outcome = "browse";
}
return outcome; return outcome;
} }

View File

@@ -23,7 +23,7 @@ public class CheckInHandler extends BaseActionHandler
@Override @Override
public void setupUIDefaults(Map<String, Serializable> actionProps) public void setupUIDefaults(Map<String, Serializable> actionProps)
{ {
actionProps.put(PROP_CHECKIN_MINOR, new Boolean(true)); actionProps.put(PROP_CHECKIN_MINOR, Boolean.TRUE);
} }
public String getJSPPath() public String getJSPPath()

View File

@@ -311,6 +311,13 @@ public class ClipboardBean
dd.isSubClass(item.Node.getType(), ContentModel.TYPE_FOLDER)) dd.isSubClass(item.Node.getType(), ContentModel.TYPE_FOLDER))
{ {
// copy the file/folder // copy the file/folder
// first check that we are not attempting to copy a duplicate into the same parent
if (destRef.equals(assocRef.getParentRef()) && name.equals(item.Node.getName()))
{
// manually change the name if this occurs
String copyOf = Application.getMessage(FacesContext.getCurrentInstance(), MSG_COPY_OF);
name = copyOf + ' ' + name;
}
this.fileFolderService.copy( this.fileFolderService.copy(
item.Node.getNodeRef(), item.Node.getNodeRef(),
destRef, destRef,

View File

@@ -24,10 +24,7 @@ import org.alfresco.service.cmr.dictionary.AssociationDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.cmr.dictionary.TypeDefinition; import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/** /**
* Lighweight client side representation of the repository data dictionary. * Lighweight client side representation of the repository data dictionary.
@@ -38,9 +35,7 @@ import org.apache.commons.logging.LogFactory;
*/ */
public final class DataDictionary public final class DataDictionary
{ {
private static Log logger = LogFactory.getLog(DataDictionary.class);
private DictionaryService dictionaryService; private DictionaryService dictionaryService;
private NamespaceService namespaceService;
private Map<QName, TypeDefinition> types = new HashMap<QName, TypeDefinition>(11, 1.0f); private Map<QName, TypeDefinition> types = new HashMap<QName, TypeDefinition>(11, 1.0f);
/** /**

View File

@@ -48,7 +48,7 @@ public class Node implements Serializable
{ {
private static final long serialVersionUID = 3544390322739034169L; private static final long serialVersionUID = 3544390322739034169L;
protected static Log logger = LogFactory.getLog(Node.class); protected static final Log logger = LogFactory.getLog(Node.class);
protected NodeRef nodeRef; protected NodeRef nodeRef;
private String name; private String name;

View File

@@ -327,7 +327,7 @@ public class RulesBean implements IContextListener
* Inner class to wrap the Rule objects so we can expose a flag to indicate whether * Inner class to wrap the Rule objects so we can expose a flag to indicate whether
* the rule is a local or inherited rule * the rule is a local or inherited rule
*/ */
public class WrappedRule public static class WrappedRule
{ {
private Rule rule; private Rule rule;
private NodeRef ruleNode; private NodeRef ruleNode;

View File

@@ -289,14 +289,9 @@ public class UsersBean implements IContextListener
*/ */
public String deleteOK() public String deleteOK()
{ {
UserTransaction tx = null; FacesContext context = FacesContext.getCurrentInstance();
try try
{ {
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context);
tx.begin();
String userName = (String)getPerson().getProperties().get("userName"); String userName = (String)getPerson().getProperties().get("userName");
// we only delete the user auth if Alfresco is managing the authentication // we only delete the user auth if Alfresco is managing the authentication
@@ -310,25 +305,21 @@ public class UsersBean implements IContextListener
} }
catch (AuthenticationException authErr) catch (AuthenticationException authErr)
{ {
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), ERROR_USER_DELETE)); Utils.addErrorMessage(Application.getMessage(context, ERROR_USER_DELETE));
} }
} }
// delete the associated Person // delete the associated Person
this.personService.deletePerson(userName); this.personService.deletePerson(userName);
// commit the transaction
tx.commit();
// re-do the search to refresh the list // re-do the search to refresh the list
search(); search();
} }
catch (Throwable e) catch (Throwable e)
{ {
// rollback the transaction // rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} Utils.addErrorMessage(MessageFormat.format(Application.getMessage(context,
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext ERROR_DELETE), e.getMessage()), e);
.getCurrentInstance(), ERROR_DELETE), e.getMessage()), e);
} }
return DIALOG_CLOSE; return DIALOG_CLOSE;

View File

@@ -94,6 +94,7 @@ public abstract class Sort
* *
* @param collator the Collator object to use to build String keys * @param collator the Collator object to use to build String keys
*/ */
@SuppressWarnings("unchecked")
protected List buildCollationKeys(Collator collator) protected List buildCollationKeys(Collator collator)
{ {
List data = this.data; List data = this.data;
@@ -260,6 +261,7 @@ public abstract class Sort
* Given the array and two indices, swap the two items in the * Given the array and two indices, swap the two items in the
* array. * array.
*/ */
@SuppressWarnings("unchecked")
protected void swap(final List v, final int a, final int b) protected void swap(final List v, final int a, final int b)
{ {
Object temp = v.get(a); Object temp = v.get(a);
@@ -294,7 +296,7 @@ public abstract class Sort
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Inner classes for data type comparison // Inner classes for data type comparison
private class SimpleComparator implements Comparator private static class SimpleComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -308,7 +310,7 @@ public abstract class Sort
} }
} }
private class SimpleStringComparator implements Comparator private static class SimpleStringComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -322,7 +324,7 @@ public abstract class Sort
} }
} }
private class StringComparator implements Comparator private static class StringComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -336,7 +338,7 @@ public abstract class Sort
} }
} }
private class IntegerComparator implements Comparator private static class IntegerComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -350,7 +352,7 @@ public abstract class Sort
} }
} }
private class FloatComparator implements Comparator private static class FloatComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -364,7 +366,7 @@ public abstract class Sort
} }
} }
private class LongComparator implements Comparator private static class LongComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -378,7 +380,7 @@ public abstract class Sort
} }
} }
private class BooleanComparator implements Comparator private static class BooleanComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -392,7 +394,7 @@ public abstract class Sort
} }
} }
private class DateComparator implements Comparator private static class DateComparator implements Comparator
{ {
/** /**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object) * @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)

View File

@@ -19,9 +19,6 @@ package org.alfresco.web.ui.common.component;
import javax.faces.component.UIInput; import javax.faces.component.UIInput;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/** /**
* Component to represent a selectable list of images * Component to represent a selectable list of images
* *
@@ -29,8 +26,6 @@ import org.apache.commons.logging.LogFactory;
*/ */
public class UIImagePicker extends UIInput public class UIImagePicker extends UIInput
{ {
private static Log logger = LogFactory.getLog(UIImagePicker.class);
/** /**
* Default constructor * Default constructor
*/ */

View File

@@ -65,7 +65,7 @@ public class UISortLink extends UICommand
boolean bPreviouslySorted = false; boolean bPreviouslySorted = false;
boolean descending = true; boolean descending = true;
String lastSortedColumn = dataContainer.getCurrentSortColumn(); String lastSortedColumn = dataContainer.getCurrentSortColumn();
if (lastSortedColumn == (String)getValue()) if (lastSortedColumn.equals(getValue()))
{ {
descending = !dataContainer.isCurrentSortDescending(); descending = !dataContainer.isCurrentSortDescending();
bPreviouslySorted = true; bPreviouslySorted = true;

View File

@@ -28,8 +28,6 @@ import javax.faces.el.ValueBinding;
import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.SelfRenderingComponent; import org.alfresco.web.ui.common.component.SelfRenderingComponent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/** /**
* Dynamic description component that switches text based on the events * Dynamic description component that switches text based on the events
@@ -39,7 +37,6 @@ import org.apache.commons.logging.LogFactory;
*/ */
public class UIDynamicDescription extends SelfRenderingComponent public class UIDynamicDescription extends SelfRenderingComponent
{ {
private static Log logger = LogFactory.getLog(UIDynamicDescription.class);
private String selected; private String selected;
private String functionName; private String functionName;
@@ -141,6 +138,7 @@ public class UIDynamicDescription extends SelfRenderingComponent
/** /**
* @see javax.faces.component.UIComponent#encodeChildren(javax.faces.context.FacesContext) * @see javax.faces.component.UIComponent#encodeChildren(javax.faces.context.FacesContext)
*/ */
@SuppressWarnings("unchecked")
public void encodeChildren(FacesContext context) throws IOException public void encodeChildren(FacesContext context) throws IOException
{ {
if (this.isRendered() == false) if (this.isRendered() == false)
@@ -240,6 +238,7 @@ public class UIDynamicDescription extends SelfRenderingComponent
* @param context The faces context * @param context The faces context
* @param descriptions The descriptions to render * @param descriptions The descriptions to render
*/ */
@SuppressWarnings("unchecked")
private void renderDescriptions(FacesContext context, UIDescriptions descriptions) private void renderDescriptions(FacesContext context, UIDescriptions descriptions)
throws IOException throws IOException
{ {

View File

@@ -129,7 +129,7 @@ public abstract class BaseEvaluator extends SelfRenderingComponent
public abstract boolean evaluate(); public abstract boolean evaluate();
protected static Logger s_logger = Logger.getLogger(BaseEvaluator.class); protected static final Logger s_logger = Logger.getLogger(BaseEvaluator.class);
/** the value to be evaluated against */ /** the value to be evaluated against */
private Object value; private Object value;

View File

@@ -739,6 +739,8 @@ public class UIPropertySheet extends UIPanel implements NamingContainer
} }
// now setup the common stuff across all component types // now setup the common stuff across all component types
if (propSheetItem != null)
{
FacesHelper.setupComponentId(context, propSheetItem, id); FacesHelper.setupComponentId(context, propSheetItem, id);
propSheetItem.setName(item.getName()); propSheetItem.setName(item.getName());
propSheetItem.setConverter(item.getConverter()); propSheetItem.setConverter(item.getConverter());
@@ -772,6 +774,7 @@ public class UIPropertySheet extends UIPanel implements NamingContainer
"' and added it to property sheet " + this); "' and added it to property sheet " + this);
} }
} }
}
/** /**
* Inner class representing a validation case that must be enforced. * Inner class representing a validation case that must be enforced.

View File

@@ -103,7 +103,7 @@ public class DefaultModelHelper
} }
/** Template Image resolver helper */ /** Template Image resolver helper */
public static TemplateImageResolver imageResolver = new TemplateImageResolver() public static final TemplateImageResolver imageResolver = new TemplateImageResolver()
{ {
public String resolveImagePathForName(String filename, boolean small) public String resolveImagePathForName(String filename, boolean small)
{ {

View File

@@ -67,7 +67,6 @@ public class NodeDescendantsLinkRenderer extends BaseRenderer
int separatorIndex = value.indexOf(NamingContainer.SEPARATOR_CHAR); int separatorIndex = value.indexOf(NamingContainer.SEPARATOR_CHAR);
String selectedNodeId = value.substring(0, separatorIndex); String selectedNodeId = value.substring(0, separatorIndex);
boolean isParent = Boolean.parseBoolean(value.substring(separatorIndex + 1)); boolean isParent = Boolean.parseBoolean(value.substring(separatorIndex + 1));
NodeService service = getNodeService(context);
NodeRef ref = new NodeRef(Repository.getStoreRef(), selectedNodeId); NodeRef ref = new NodeRef(Repository.getStoreRef(), selectedNodeId);
UINodeDescendants.NodeSelectedEvent event = new UINodeDescendants.NodeSelectedEvent(component, ref, isParent); UINodeDescendants.NodeSelectedEvent event = new UINodeDescendants.NodeSelectedEvent(component, ref, isParent);

View File

@@ -883,6 +883,10 @@
<property-name>browseBean</property-name> <property-name>browseBean</property-name>
<value>#{BrowseBean}</value> <value>#{BrowseBean}</value>
</managed-property> </managed-property>
<managed-property>
<property-name>navigator</property-name>
<value>#{NavigationBean}</value>
</managed-property>
<managed-property> <managed-property>
<property-name>nodeService</property-name> <property-name>nodeService</property-name>
<value>#{NodeService}</value> <value>#{NodeService}</value>

View File

@@ -21,3 +21,7 @@
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:outputText value="#{WizardManager.bean.summary}" escape="false"/> <h:outputText value="#{WizardManager.bean.summary}" escape="false"/>
<script type="text/javascript">
window.onload = function() { document.getElementById("wizard:finish-button").focus(); }
</script>