This is a migrated thread and some comments may be shown as answers.

this._folderCache JS error

2 Answers 35 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Absolute Data Group
Top achievements
Rank 1
Absolute Data Group asked on 23 Nov 2009, 06:26 AM
I keep getting the following error:

this._folderCache is undefined

It appears to be coming from the _changeCurrentFolder function: this line in the RadFileExplorer javascript:

if(this._folderCache[e]!=null&&!f){this._onCallbackResponse(this._folderCache[e],j);} 

Now, this perplexes me because it appears that the FileExplorer works correctly in all other regards except when I initiate some action that refreshes the left hand tree view pane. (Which by the way, loads correctly as I interact with opening folders...)

Deleting a file, folder, or even clicking the refresh icon causes the above error.

So my question is - How could this variable not be defined (it appears to be defined in the initialization of the object, javascript side)? Is there some way for me to debug this on my end that isn't apparent to me? I am using a custom content provider for this and so far I am happy with everything else other than this!

Thanks

2 Answers, 1 is accepted

Sort by
0
Absolute Data Group
Top achievements
Rank 1
answered on 23 Nov 2009, 06:39 AM
I actually figured out what was causing this problem, but not a solution for it sadly.

I had my FileExplorer inside a RadMultiView that was being ajaxified via the AjaxManager on a click event from a RadTabStrip. For some reason this was causing problems with the javascript for the RadFileExplorer.

When I took out the AjaxSetting from the AjaxManager, my FileExplorer went back to behaving how I would have expected.

Right now I'm not positive if this is a "bug" or if it's a known limitation of the control, or my implementation/approach to ajaxifying the FileExplorer was incorrect.
0
Fiko
Telerik team
answered on 25 Nov 2009, 08:30 AM
Hello John,

This error is caused by the fact that the RadFileExplorer control is updated with AJAX. This scenario, however, is not supported by RadFileExplorer, because of the embedded Ajax control. The nested AJAX scenarios produce unpredictable results, such as in your case, and we recommend you avoid them. The solution in your case is to use a standard postback to open the RadFileExplorer control. As an alternative you could use the client-side approach shown in the attached demo.

I hope this helps.

Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
FileExplorer
Asked by
Absolute Data Group
Top achievements
Rank 1
Answers by
Absolute Data Group
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or