Alfresco YUI Refresh Page.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2013 05:02 AM
Hello Everyone!
I have made a webscript for moving a docuemnt from userhome folder to another folder.When i click on button and ajax call the document is moved but change are reflected after manually reloading the page.
Any solution for this? i do not want to reload the page.
If any body have any idea than please reply as early as possible.
my code for yui lies here:
I have made a webscript for moving a docuemnt from userhome folder to another folder.When i click on button and ajax call the document is moved but change are reflected after manually reloading the page.
Any solution for this? i do not want to reload the page.
If any body have any idea than please reply as early as possible.
my code for yui lies here:
onUploadToKb:function DLTB_onFileUploadWithTooltip(e, p_obj) { var uniqueIdOfFolder=this.doclistMetadata.parent.nodeRef; Alfresco.util.PopupManager.displayMessage( { text: "Show Document"+uniqueIdOfFolder }); Alfresco.util.Ajax.request( { url:"http://127.0.0.1:8080/alfresco/service'+'/components/alfresco/uploadToKb?parentNode='+uniqueIdOfFold..., method: Alfresco.util.Ajax.GET, successCallback: { fn :this.onTemplateLoaded, obj: this, scope:this }, scope: this, execScripts: true, failureMessage: "Could not Upload the Document" }); }, onTemplateLoaded : function() { Alfresco.util.PopupManager.displayMessage( { text: "Document is Moved Successfully" }); },
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2013 10:49 PM
Hi,
Anyhow you have to refresh the page because the response of the repository websscript need to be updated once your file has been moved to other folder.
Try to recall only webscript which lists the contents rather than reloading whole page.
Anyhow you have to refresh the page because the response of the repository websscript need to be updated once your file has been moved to other folder.
Try to recall only webscript which lists the contents rather than reloading whole page.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2016 02:40 AM
I know its a late reply but if it can help someone
replace the successcallback with
success:
{
event:
{
name: "metadataRefresh"
},
callback:
{
fn: function tt(response){
Alfresco.util.PopupManager.displayPrompt(
{
title: "Success Message",
text: response.serverResponse.responseText
});
},
scope: this
}
}
replace the successcallback with
success:
{
event:
{
name: "metadataRefresh"
},
callback:
{
fn: function tt(response){
Alfresco.util.PopupManager.displayPrompt(
{
title: "Success Message",
text: response.serverResponse.responseText
});
},
scope: this
}
}
