diff --git a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java index 2ad4b4983e..5640fc79fb 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java @@ -1341,6 +1341,22 @@ public class AVMBrowseBean implements IContextListener return AVMUtil.isMainStore(this.sandbox); } + /** + * Indicates whether link validation is available (virtualization server is accessible). + * It can be used in the 'rendered' attribute in some tags. + * @see org.alfresco.linkvalidation.LinkValidationServiceImpl#isLinkValidationDisabled() + * + * @return TRUE if link validation is ENABLED (virtualization server IS ACCESSIBLE) + */ + public boolean getLinkValidationEnabled() + { + boolean enabled = !linkValidationService.isLinkValidationDisabled(); + if (logger.isDebugEnabled()) + { + logger.debug("Link validation enabled:" + String.valueOf(enabled).toUpperCase()); + } + return enabled; + } // ------------------------------------------------------------------------------ // Action event handlers diff --git a/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java b/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java index aa66e6f86c..d0d15ab1b9 100644 --- a/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java +++ b/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java @@ -102,7 +102,7 @@ public class SubmitDialog extends BaseDialogBean private String[] workflowSelectedValue; private boolean enteringExpireDate = false; private boolean loadSelectedNodesFromBrowseBean = false; - private boolean validateLinks = true; + private boolean validateLinks = false; private boolean autoDeploy = false; private Date defaultExpireDate; private Date launchDate; @@ -289,7 +289,7 @@ public class SubmitDialog extends BaseDialogBean this.defaultExpireDate = new Date(); this.workflowSelectedValue = null; this.launchDate = null; - this.validateLinks = true; + this.validateLinks = this.avmBrowseBean.getLinkValidationEnabled(); this.autoDeploy = false; this.workflowParams = null; this.sandboxInfo = null; @@ -826,6 +826,17 @@ public class SubmitDialog extends BaseDialogBean this.autoDeploy = autoDeploy; } + /** + * + * @return linkValidationEnabled flag to indicate whether link validation is turned on + * and virtualization server is available. + * + */ + public boolean getLinkValidationEnabled() + { + return this.avmBrowseBean.getLinkValidationEnabled(); + } + /** * @return List of UIListItem object representing the available workflows for the website */ diff --git a/source/web/jsp/wcm/browse-website.jsp b/source/web/jsp/wcm/browse-website.jsp index 3393800888..0c8f0bfb37 100644 --- a/source/web/jsp/wcm/browse-website.jsp +++ b/source/web/jsp/wcm/browse-website.jsp @@ -139,7 +139,7 @@