How to use/interact with embedded 'Files' Web Part?

LabKey Support Forum (Inactive)
How to use/interact with embedded 'Files' Web Part? Leo Dashevskiy  2013-07-23 14:28
Status: Closed
 
Hi, guys!

I was in need for our project of a files/folders browser for a user to select an uploaded folder.

It was suggested that I can use the already existing and rich 'Files' web part for it, which is what I did:

        var wikiWebPartRenderer = new LABKEY.WebPart({
            frame: 'none',
            partName: 'Files',
            renderTo: pnlImport.getId()
        });
        wikiWebPartRenderer.render();

where pnlImport is just my container panel and part of the overall UI.

My question now is: how can I obtain the selected file/folder and have it available in JS for further work?
A related question is: can this 'Files' web part be customized (suppose to only display folders and not to show the 'Import workspace' button)?

Thanks.
-Leo
 
 
Leo Dashevskiy responded:  2013-07-24 14:30
Anyone?

What would be the point of having these embedded web parts then? If one cannot interact with them...
 
Nick Kerr responded:  2013-07-24 15:33
Hi Leo,

The original intent of providing a files web part is to allow users to interact with the server's file system. If you'd like to develop against a FilesWebPart I'd recommend looking at the LABKEY.FilesWebPartPanel which is the class that backs the rendered 'Files' LABKEY.WebPart. However, note that the LABKEY.FilesWebPartPanel is not a part of the Client API and is subject to change/deprecation/removal.

I can point you to an example usage of this in one of our custom modules if you'd find that helpful.

Thanks,
Nick
 
Leo Dashevskiy responded:  2013-08-07 15:15
No longer relevant.