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,21 +371,28 @@ public class PageTag extends TagSupport
|
||||
*/
|
||||
private String getWindowOnloadCode()
|
||||
{
|
||||
CCProperties ccProps = (CCProperties) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "CCProperties");
|
||||
|
||||
StringBuffer onloadCode = new StringBuffer();
|
||||
if (ccProps.getWebdavUrl() != null || ccProps.getCifsPath() != null)
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
if (fc != null)
|
||||
{
|
||||
String webdavUrl = (ccProps.getWebdavUrl() != null) ? (ccProps.getWebdavUrl()) : ("");
|
||||
String cifsPath = (ccProps.getCifsPath() != null) ? (ccProps.getCifsPath()) : ("");
|
||||
|
||||
onloadCode.append("window.onload=onloadFunc('").append(webdavUrl).append("','").append(cifsPath).append("');");
|
||||
|
||||
ccProps.setCifsPath(null); // we need reset cifsPath flag
|
||||
ccProps.setWebdavUrl(null); // we need reset webdavUrl flag
|
||||
CCProperties ccProps = (CCProperties) FacesHelper.getManagedBean(fc, "CCProperties");
|
||||
|
||||
StringBuilder onloadCode = new StringBuilder();
|
||||
if (ccProps.getWebdavUrl() != null || ccProps.getCifsPath() != null)
|
||||
{
|
||||
String webdavUrl = (ccProps.getWebdavUrl() != null) ? (ccProps.getWebdavUrl()) : ("");
|
||||
String cifsPath = (ccProps.getCifsPath() != null) ? (ccProps.getCifsPath()) : ("");
|
||||
|
||||
onloadCode.append("window.onload=onloadFunc('").append(webdavUrl).append("','").append(cifsPath).append("');");
|
||||
|
||||
ccProps.setCifsPath(null); // we need reset cifsPath flag
|
||||
ccProps.setWebdavUrl(null); // we need reset webdavUrl flag
|
||||
}
|
||||
|
||||
return onloadCode.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return onloadCode.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user