Welcome Guest Search | Active Topics | Sign In | Register

File Explorer: children nodes expanded Options
kronns
Posted: Thursday, January 29, 2009 10:11:13 AM
Rank: Newbie
Groups: Member

Joined: 9/18/2008
Posts: 9
Hello. I'd like to know how could I change the default template for the FileExplorer where the directory tree has all its children nodes expanded. Additionally, it would be useful to be allowed to change the name of the root folder so the path can be hidden. Thanks.
eo_support
Posted: Thursday, January 29, 2009 2:33:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

I believe can do that by recursively search the FileExplorer's children control to find the TreeView control first, then use whatever interface available on the TreeView to expand/collapses node. You can also do so on the client side through the client side TreeView object. The TreeView ID is "FolderTree".

Thanks!
kronns
Posted: Thursday, January 29, 2009 4:04:15 PM
Rank: Newbie
Groups: Member

Joined: 9/18/2008
Posts: 9
can you give me a server sample please?
thanks
eo_support
Posted: Thursday, January 29, 2009 4:38:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Actually I take it back....while you can get the TreeView from the server side, you won't be able to expand the TreeNodes because it only has a single root node. All child nodes are populated on demand at runtime after user expands a node. So the server side TreeView object has no use to you.

You can use the following JavaScript code to expand the root node for you:

Code: JavaScript
var treeView = eo_GetObject("FolderTree");
var rootNode = treeView.getTopGroup().getItemByIndex(0);
rootNode.populateOnDemand();


Hope this helps.

Thanks
kronns
Posted: Thursday, January 29, 2009 5:26:38 PM
Rank: Newbie
Groups: Member

Joined: 9/18/2008
Posts: 9
thanks. This code work in IE, but dont work in firefox... "loading..."
thanks
eo_support
Posted: Thursday, January 29, 2009 5:36:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
We added the code to Demos -> File Explorer -> Features -> All Features -> Demo.aspx at the end of the page and verified it works fine on both IE and FireFox. If you continue to have problem with FireFox, please post a test page that can reproduce the problem and we will be happy to take a look (Make sure the test page runs independently.)

Thanks
kronns
Posted: Friday, January 30, 2009 3:45:58 AM
Rank: Newbie
Groups: Member

Joined: 9/18/2008
Posts: 9
Please find a testing URL. works in IE but not in Firefox (http://www.datonet.es/test.aspx), i have tried to insert the script in many different places around the page and it fails all the same. BEsides"rename folder" doesn't work very well. There are some more comments about queires over this control

1) is there any way for the FileExplorer to show the file's date?

2) The folderrenamed server-side event is not triggering and the client-side has random erratic behavior like erases the folder name, creates new ones. Is there a known problem with this event?

3) Subfolder icon. I have noticed that the Treeview always shows the “+” icon next to all folders, as if there were subfolders underneath even if there were not, making the navigation rather annoying as the user believes there are subfolders., making them click over them more than once to be sure. Is there any way to display this icon only where there are subfolders underneath?

4) how can change the name of the root folder so the path can be hidden?

5) Is it possible to locate (or address) the root directory in an area other than "webroot"? we'd like to have it completely isolated for security reasons

thanks
eo_support
Posted: Friday, January 30, 2009 8:44:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

The loading and rename issues might have to do with timing. For example, when you tried to perform those actions when the page has not been fully loaded. We will look into it and see what we can find. As for your other questions:

1. No. It makes perfect sense to have that though. So we will see if we can add it;

2. We are not aware of this problem. We will look into it and see what we can find;

3. This behavior is by design. The TreeView always shows + for a folder because it does not know whether it has sub folders underneath it until user clicks it. Once user clicks it, the TreeView would check whether it has sub folders and expands the node. At that time the "+" will become "-";

4. No. We understand it makes sense to have this feature though, so we will see what we can do;

5. No. The main purpose of the FileExplorer is for user to browse and use file on the client side. In order for user to use it on the client side, the Url must be relative to your web root. If you wish to have a server side browser, you can implement it by yourself with the TreeView and the Grid as well. Here is a sample that you might be able to use to get started:

http://demo.essentialobjects.com/Default.aspx?path=Splitter\features\_i6

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.