mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6338: Some WCM-435. 6344: Fix for AWC-1452 (dialog close navigation issue) 6345: Fix for AR-1611 and other related CIFS and NFS fixes 6346: Minor javadoc fix for ReplicatingContentStore 6347: Handle exceptions arising from UserTransaction.begin(). 6348: Many WCM fixes in one Conflicts resolved on faces-config-beans.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6722 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -51,6 +51,7 @@ import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
@@ -85,9 +86,11 @@ public class WebProject
|
||||
private Form baseForm;
|
||||
private NodeRef defaultWorkflowNodeRef;
|
||||
|
||||
private FormWrapper(final Form form, final NodeRef formNodeRef)
|
||||
private FormWrapper(final Form form,
|
||||
final NodeRef formNodeRef,
|
||||
final FormsService formsService)
|
||||
{
|
||||
super(((FormImpl)form).getNodeRef());
|
||||
super(((FormImpl)form).getNodeRef(), formsService);
|
||||
this.formNodeRef = formNodeRef;
|
||||
}
|
||||
|
||||
@@ -160,7 +163,8 @@ public class WebProject
|
||||
allRets.get(renderingEngineTemplateName);
|
||||
result.put(ret.getName(),
|
||||
new RenderingEngineTemplateImpl(ret.getNodeRef(),
|
||||
ret.getRenditionPropertiesNodeRef())
|
||||
ret.getRenditionPropertiesNodeRef(),
|
||||
this.formsService)
|
||||
{
|
||||
@Override
|
||||
public String getOutputPathPattern()
|
||||
@@ -308,8 +312,14 @@ public class WebProject
|
||||
throw new NullPointerException();
|
||||
}
|
||||
final Form result = this.getFormsImpl().get(name);
|
||||
if (result == null)
|
||||
if (result == null || !name.equals(result.getName()))
|
||||
{
|
||||
if (result != null)
|
||||
{
|
||||
LOGGER.debug("removing " + name +
|
||||
" from cache as it doesn't match mapped form " + result.getName());
|
||||
this.getFormsImpl().remove(name);
|
||||
}
|
||||
throw new FormNotFoundException(name, this);
|
||||
}
|
||||
return result;
|
||||
@@ -420,7 +430,7 @@ public class WebProject
|
||||
{
|
||||
final ServiceRegistry serviceRegistry = this.getServiceRegistry();
|
||||
final NodeService nodeService = serviceRegistry.getNodeService();
|
||||
final FormsService formsService = FormsService.getInstance();
|
||||
final FormsService formsService = WebProject.getFormsService();
|
||||
final List<ChildAssociationRef> formRefs =
|
||||
nodeService.getChildAssocs(this.nodeRef,
|
||||
WCMAppModel.ASSOC_WEBFORM,
|
||||
@@ -433,16 +443,23 @@ public class WebProject
|
||||
try
|
||||
{
|
||||
final Form baseForm = formsService.getForm(formName);
|
||||
result.put(formName, new FormWrapper(baseForm, ref.getChildRef()));
|
||||
result.put(formName, new FormWrapper(baseForm, ref.getChildRef(), formsService));
|
||||
}
|
||||
catch (FormNotFoundException fnfe)
|
||||
{
|
||||
LOGGER.debug(fnfe);
|
||||
LOGGER.debug("got exception " + fnfe.getMessage() +
|
||||
" while loading web forms for project " + this.getName());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static FormsService getFormsService()
|
||||
{
|
||||
return (FormsService)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(),
|
||||
"FormsService");
|
||||
}
|
||||
|
||||
private static ServiceRegistry getServiceRegistry()
|
||||
{
|
||||
final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
Reference in New Issue
Block a user