mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Workaround added to WebScript status template to handle very strange proxied Hibernate Exception objects.
Fix to PageTag to work outside of a valid FacesContext scope. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10122 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -371,9 +371,12 @@ public class PageTag extends TagSupport
|
||||
*/
|
||||
private String getWindowOnloadCode()
|
||||
{
|
||||
CCProperties ccProps = (CCProperties) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "CCProperties");
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
if (fc != null)
|
||||
{
|
||||
CCProperties ccProps = (CCProperties) FacesHelper.getManagedBean(fc, "CCProperties");
|
||||
|
||||
StringBuffer onloadCode = new StringBuffer();
|
||||
StringBuilder onloadCode = new StringBuilder();
|
||||
if (ccProps.getWebdavUrl() != null || ccProps.getCifsPath() != null)
|
||||
{
|
||||
String webdavUrl = (ccProps.getWebdavUrl() != null) ? (ccProps.getWebdavUrl()) : ("");
|
||||
@@ -387,5 +390,9 @@ public class PageTag extends TagSupport
|
||||
|
||||
return onloadCode.toString();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user