mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- some improved error handling for editing of renditions when the form instance data has been reverted
- not caching the forms list within the web project as it is not being properly refreshed when the web project is edited - better error handling in create web content for when the workflow has not properly been configured. - more work on getting edit and preview working from manage tasks screen. it should all be in place now though i am completely unable to preview right now - need to hear back from jon. had to reduce reliance on AVMBrowseBean from actions since the current path is not necessarily properly set since it's outside of a browse context. - some error handling in rendition if the primary form instance data is not there. - adding a backward webproject noderef reference to the staging store to make it possible to get web project properties without an avmbrowsebean context git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4708 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.alfresco.web.forms;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import javax.faces.context.FacesContext;
|
||||
@@ -23,7 +24,10 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.WCMAppModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||
@@ -89,17 +93,21 @@ public class RenditionImpl
|
||||
}
|
||||
|
||||
public FormInstanceData getPrimaryFormInstanceData()
|
||||
throws FileNotFoundException
|
||||
{
|
||||
final AVMService avmService = this.getServiceRegistry().getAVMService();
|
||||
final NodeService nodeService = this.getServiceRegistry().getNodeService();
|
||||
final String fidAVMStoreRelativePath = (String)
|
||||
nodeService.getProperty(this.nodeRef,
|
||||
WCMAppModel.PROP_PRIMARY_FORM_INSTANCE_DATA);
|
||||
String avmStore = AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond();
|
||||
avmStore = avmStore.substring(0, avmStore.indexOf(':'));
|
||||
|
||||
final NodeRef fidNodeRef =
|
||||
AVMNodeConverter.ToNodeRef(-1, avmStore + ':' + fidAVMStoreRelativePath);
|
||||
return new FormInstanceDataImpl(fidNodeRef);
|
||||
final String path = avmStore + ':' + fidAVMStoreRelativePath;
|
||||
if (avmService.lookup(-1, path) == null)
|
||||
{
|
||||
throw new FileNotFoundException("unable to find primary form instance data " + path);
|
||||
}
|
||||
return new FormInstanceDataImpl(AVMNodeConverter.ToNodeRef(-1, path));
|
||||
}
|
||||
|
||||
/** the rendering engine template that generated this rendition */
|
||||
|
Reference in New Issue
Block a user