mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- using server side includes in the sample website, both from jsp and xsl.
- using the form data functions from the press release xsl rather than the document() function - adding lots of comments to the sample website code - removing the company_footer subdirectory. we can lump press release and company-footer xmls in the same content directory. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4186 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,6 +23,8 @@ import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
@@ -34,6 +36,8 @@ import org.springframework.web.jsf.FacesContextUtils;
|
||||
public abstract class AbstractRenderingEngine
|
||||
implements RenderingEngine
|
||||
{
|
||||
private static final Log LOGGER = LogFactory.getLog(AbstractRenderingEngine.class);
|
||||
|
||||
protected static final String ALFRESCO_NS = "http://www.alfresco.org/alfresco";
|
||||
protected static final String ALFRESCO_NS_PREFIX = "alfresco";
|
||||
|
||||
@@ -76,16 +80,25 @@ public abstract class AbstractRenderingEngine
|
||||
return new FormDataFunctions(AbstractRenderingEngine.getAVMRemote());
|
||||
}
|
||||
|
||||
protected static String toAVMPath(String parentAVMPath, String path)
|
||||
protected static String toAVMPath(final String parentAVMPath, final String path)
|
||||
{
|
||||
String parent = parentAVMPath;
|
||||
if (path != null && path.length() != 0 && path.charAt(0) == '/')
|
||||
{
|
||||
parentAVMPath = parentAVMPath.substring(0,
|
||||
parentAVMPath.indexOf(':') +
|
||||
('/' + AVMConstants.DIR_APPBASE +
|
||||
'/' + AVMConstants.DIR_WEBAPPS).length() + 1);
|
||||
parent = parentAVMPath.substring(0,
|
||||
parentAVMPath.indexOf(':') +
|
||||
('/' + AVMConstants.DIR_APPBASE +
|
||||
'/' + AVMConstants.DIR_WEBAPPS).length() + 1);
|
||||
}
|
||||
return parentAVMPath + (parentAVMPath.endsWith("/") ? path : '/' + path);
|
||||
if (parent.endsWith("/"))
|
||||
{
|
||||
parent = parent.substring(0, parent.length() - 1);
|
||||
}
|
||||
final String result = parent + '/' + path;
|
||||
LOGGER.debug("built full avmPath " + result +
|
||||
" for parent " + parentAVMPath +
|
||||
" and request path " + path);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user