mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
fixing caching issues with edit of forms. need to carefully trash FormProcessorSessions when user navigates away from a form. call reset in AVMEditBean when the user clicks cancel.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4797 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -292,6 +292,11 @@ public class AVMEditBean
|
||||
*/
|
||||
public void setFormProcessorSession(final FormProcessor.Session formProcessorSession)
|
||||
{
|
||||
if (this.formProcessorSession != null &&
|
||||
this.formProcessorSession != formProcessorSession)
|
||||
{
|
||||
this.formProcessorSession.destroy();
|
||||
}
|
||||
this.formProcessorSession = formProcessorSession;
|
||||
}
|
||||
|
||||
@@ -354,8 +359,11 @@ public class AVMEditBean
|
||||
MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
|
||||
{
|
||||
// make content available to the editing screen
|
||||
setEditorOutput(reader.getContentString());
|
||||
|
||||
this.setEditorOutput(reader.getContentString());
|
||||
this.setFormProcessorSession(null);
|
||||
this.instanceDataDocument = null;
|
||||
this.form = null;
|
||||
|
||||
// navigate to appropriate screen
|
||||
outcome = ((MimetypeMap.MIMETYPE_XML.equals(mimetype) &&
|
||||
this.avmService.hasAspect(-1, avmPath, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
|
||||
@@ -546,8 +554,8 @@ public class AVMEditBean
|
||||
clearUpload();
|
||||
setDocumentContent(null);
|
||||
setEditorOutput(null);
|
||||
this.setFormProcessorSession(null);
|
||||
this.instanceDataDocument = null;
|
||||
this.formProcessorSession = null;
|
||||
this.form = null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user