Eliminated web-client-config-edit-properties.xml

Fixed AWC-474 and AWC-475

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-02-07 15:09:27 +00:00
parent ce283a2f01
commit 9a50b7d471
11 changed files with 178 additions and 111 deletions

View File

@@ -30,7 +30,6 @@ import javax.faces.model.SelectItem;
import javax.transaction.UserTransaction;
import org.alfresco.config.Config;
import org.alfresco.config.ConfigLookupContext;
import org.alfresco.config.ConfigService;
import org.alfresco.model.ContentModel;
import org.alfresco.service.ServiceRegistry;
@@ -312,10 +311,18 @@ public class DocumentPropertiesBean
// we need to use the config service to see whether there are any
// editable properties configured for this document.
ConfigService configSvc = Application.getConfigService(FacesContext.getCurrentInstance());
Config configProps = configSvc.getConfig(this.editableNode, new ConfigLookupContext("edit-properties"));
Config configProps = configSvc.getConfig(this.editableNode);
PropertySheetConfigElement propsToDisplay = (PropertySheetConfigElement)configProps.
getConfigElement("property-sheet");
this.hasOtherProperties = Boolean.valueOf(propsToDisplay != null);
if (propsToDisplay != null && propsToDisplay.getEditableItemNamesToShow().size() > 0)
{
this.hasOtherProperties = Boolean.TRUE;
}
else
{
this.hasOtherProperties = Boolean.FALSE;
}
}
return this.hasOtherProperties.booleanValue();