mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Reverted HEAD revision 5141
svn merge svn://svn.alfresco.com:3691/alfresco/HEAD@5141 svn://svn.alfresco.com:3691/alfresco/HEAD@5140 . - 5141 was carried to V2.0 prior to this - No other actions are required git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5145 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -282,15 +282,6 @@ public class AVMEditBean
|
||||
return this.instanceDataDocument;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the form instance data for display purposes.
|
||||
*/
|
||||
public String getFormInstanceDataName()
|
||||
{
|
||||
final FormInstanceData fid = new FormInstanceDataImpl(-1, this.getAvmNode().getPath());
|
||||
return fid.getName().replaceAll("(.+)\\..*", "$1");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the form processor session.
|
||||
*/
|
||||
@@ -450,7 +441,30 @@ public class AVMEditBean
|
||||
// regenerate form content
|
||||
if (this.avmService.hasAspect(-1, avmPath, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
|
||||
{
|
||||
this.regenerateRenditions();
|
||||
final FormInstanceData fid = new FormInstanceDataImpl(AVMNodeConverter.ToNodeRef(-1, avmPath))
|
||||
{
|
||||
@Override
|
||||
public Form getForm() { return AVMEditBean.this.getForm(); }
|
||||
};
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("regenerating renditions of " + fid);
|
||||
|
||||
for (Rendition rendition : fid.getRenditions())
|
||||
{
|
||||
try
|
||||
{
|
||||
rendition.regenerate(fid);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Utils.addErrorMessage("error regenerating " + rendition.getName() +
|
||||
" using " + rendition.getRenderingEngineTemplate().getName() +
|
||||
": " + e.getMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
final NodeRef[] uploadedFiles = this.formProcessorSession.getUploadedFiles();
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
@@ -513,10 +527,7 @@ public class AVMEditBean
|
||||
|
||||
// commit the transaction
|
||||
tx.commit();
|
||||
if (this.avmService.hasAspect(-1, node.getPath(), WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
|
||||
{
|
||||
this.regenerateRenditions();
|
||||
}
|
||||
|
||||
// Possibly notify virt server
|
||||
AVMConstants.updateVServerWebapp(node.getPath(), false);
|
||||
|
||||
@@ -577,32 +588,4 @@ public class AVMEditBean
|
||||
FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
ctx.getExternalContext().getSessionMap().remove(FileUploadBean.FILE_UPLOAD_BEAN_NAME);
|
||||
}
|
||||
|
||||
private void regenerateRenditions()
|
||||
{
|
||||
final String avmPath = this.getAvmNode().getPath();
|
||||
final FormInstanceData fid = new FormInstanceDataImpl(AVMNodeConverter.ToNodeRef(-1, avmPath))
|
||||
{
|
||||
@Override
|
||||
public Form getForm() { return AVMEditBean.this.getForm(); }
|
||||
};
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("regenerating renditions of " + fid);
|
||||
|
||||
for (Rendition rendition : fid.getRenditions())
|
||||
{
|
||||
try
|
||||
{
|
||||
rendition.regenerate(fid);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.addErrorMessage("error regenerating " + rendition.getName() +
|
||||
" using " + rendition.getRenderingEngineTemplate().getName() +
|
||||
": " + e.getMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user