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:
Ariel Backenroth
2007-01-11 18:00:45 +00:00
parent ebae3000cf
commit d13abef6ec
4 changed files with 41 additions and 26 deletions

View File

@@ -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;
}